Example usage for javafx.scene.control Tooltip Tooltip

List of usage examples for javafx.scene.control Tooltip Tooltip

Introduction

In this page you can find the example usage for javafx.scene.control Tooltip Tooltip.

Prototype

public Tooltip(String text) 

Source Link

Document

Creates a tooltip with the specified text.

Usage

From source file:editeurpanovisu.EquiCubeDialogController.java

/**
 *
 * @param strTypeTransf/*from   w  w  w .  ja  v a 2  s  .  c  om*/
 * @throws Exception Exceptions
 */
public void afficheFenetre(String strTypeTransf) throws Exception {
    lvListeFichier.getItems().clear();
    stTransformations = new Stage(StageStyle.UTILITY);
    apTransformations = new AnchorPane();
    stTransformations.initModality(Modality.APPLICATION_MODAL);
    stTransformations.setResizable(true);
    apTransformations.setStyle("-fx-background-color : #ff0000;");

    VBox vbFenetre = new VBox();
    HBox hbChoix = new HBox();
    Pane paneChoixFichier = new Pane();
    btnAjouteFichiers = new Button("Ajouter des Fichiers");
    paneChoixTypeFichier = new Pane();
    Label lblType = new Label("Type des Fichiers de sortie");
    rbJpeg = new RadioButton("JPEG (.jpg)");
    rbBmp = new RadioButton("BMP (.bmp)");
    rbTiff = new RadioButton("TIFF (.tif)");
    cbSharpen = new CheckBox("Masque de nettet");
    cbSharpen.setSelected(EditeurPanovisu.isbNetteteTransf());
    slSharpen = new Slider(0, 2, EditeurPanovisu.getNiveauNetteteTransf());
    lblSharpen = new Label();
    double lbl = (Math.round(EditeurPanovisu.getNiveauNetteteTransf() * 20.d) / 20.d);
    lblSharpen.setText(lbl + "");
    slSharpen.setDisable(!EditeurPanovisu.isbNetteteTransf());
    lblSharpen.setDisable(!EditeurPanovisu.isbNetteteTransf());
    Pane paneboutons = new Pane();
    btnAnnuler = new Button("Fermer la fentre");
    btnValider = new Button("Lancer le traitement");

    strTypeTransformation = strTypeTransf;
    Image imgTransf;
    if (strTypeTransf.equals(EquiCubeDialogController.EQUI2CUBE)) {
        stTransformations.setTitle("Transformation d'quirectangulaire en faces de cube");
        imgTransf = new Image(
                "file:" + EditeurPanovisu.getStrRepertAppli() + File.separator + "images/equi2cube.png");
    } else {
        stTransformations.setTitle("Transformation de faces de cube en quirectangulaire");
        imgTransf = new Image(
                "file:" + EditeurPanovisu.getStrRepertAppli() + File.separator + "images/cube2equi.png");
    }
    ImageView ivTypeTransfert = new ImageView(imgTransf);
    ivTypeTransfert.setLayoutX(35);
    ivTypeTransfert.setLayoutY(280);
    paneChoixTypeFichier.getChildren().add(ivTypeTransfert);
    apTransformations.setPrefHeight(EditeurPanovisu.getHauteurE2C());
    apTransformations.setPrefWidth(EditeurPanovisu.getLargeurE2C());

    paneChoixFichier.setPrefHeight(350);
    paneChoixFichier.setPrefWidth(410);
    paneChoixFichier.setStyle("-fx-background-color: #d0d0d0; -fx-border-color: #bbb;");
    paneChoixTypeFichier.setPrefHeight(350);
    paneChoixTypeFichier.setPrefWidth(180);
    paneChoixTypeFichier.setStyle("-fx-background-color: #d0d0d0; -fx-border-color: #bbb;");
    hbChoix.getChildren().addAll(paneChoixFichier, paneChoixTypeFichier);
    vbFenetre.setPrefHeight(400);
    vbFenetre.setPrefWidth(600);
    apTransformations.getChildren().add(vbFenetre);
    hbChoix.setPrefHeight(350);
    hbChoix.setPrefWidth(600);
    hbChoix.setStyle("-fx-background-color: #d0d0d0;");
    paneboutons.setPrefHeight(50);
    paneboutons.setPrefWidth(600);
    paneboutons.setStyle("-fx-background-color: #d0d0d0;");
    vbFenetre.setStyle("-fx-background-color: #d0d0d0;");
    btnAnnuler.setLayoutX(296);
    btnAnnuler.setLayoutY(10);
    btnValider.setLayoutX(433);
    btnValider.setLayoutY(10);
    lvListeFichier.setPrefHeight(290);
    lvListeFichier.setPrefWidth(380);
    lvListeFichier.setEditable(true);
    lvListeFichier.setLayoutX(14);
    lvListeFichier.setLayoutY(14);
    btnAjouteFichiers.setLayoutX(259);
    btnAjouteFichiers.setLayoutY(319);
    paneChoixFichier.getChildren().addAll(lvListeFichier, btnAjouteFichiers);
    if (strTypeTransf.equals(EquiCubeDialogController.EQUI2CUBE)) {
        lblDragDropE2C = new Label(rbLocalisation.getString("transformation.dragDropE2C"));
    } else {
        lblDragDropE2C = new Label(rbLocalisation.getString("transformation.dragDropC2E"));
    }
    lblDragDropE2C.setMinHeight(lvListeFichier.getPrefHeight());
    lblDragDropE2C.setMaxHeight(lvListeFichier.getPrefHeight());
    lblDragDropE2C.setMinWidth(lvListeFichier.getPrefWidth());
    lblDragDropE2C.setMaxWidth(lvListeFichier.getPrefWidth());
    lblDragDropE2C.setLayoutX(14);
    lblDragDropE2C.setLayoutY(14);
    lblDragDropE2C.setAlignment(Pos.CENTER);
    lblDragDropE2C.setTextFill(Color.web("#c9c7c7"));
    lblDragDropE2C.setTextAlignment(TextAlignment.CENTER);
    lblDragDropE2C.setWrapText(true);
    lblDragDropE2C.setStyle("-fx-font-size : 24px");
    lblDragDropE2C.setStyle("-fx-background-color : rgba(128,128,128,0.1)");
    paneChoixFichier.getChildren().add(lblDragDropE2C);

    lblType.setLayoutX(14);
    lblType.setLayoutY(14);
    rbBmp.setLayoutX(43);
    rbBmp.setLayoutY(43);
    rbBmp.setUserData("bmp");
    if (EditeurPanovisu.getStrTypeFichierTransf().equals("bmp")) {
        rbBmp.setSelected(true);
    }
    rbBmp.setToggleGroup(tgTypeFichier);
    rbJpeg.setLayoutX(43);
    rbJpeg.setLayoutY(71);
    rbJpeg.setUserData("jpg");
    if (EditeurPanovisu.getStrTypeFichierTransf().equals("jpg")) {
        rbJpeg.setSelected(true);
    }
    rbJpeg.setToggleGroup(tgTypeFichier);
    if (EditeurPanovisu.getStrTypeFichierTransf().equals("tif")) {
        rbTiff.setSelected(true);
    }
    rbTiff.setLayoutX(43);
    rbTiff.setLayoutY(99);
    rbTiff.setToggleGroup(tgTypeFichier);
    rbTiff.setUserData("tif");
    tgTypeFichier.selectedToggleProperty().addListener((ov, old_toggle, new_toggle) -> {
        EditeurPanovisu.setStrTypeFichierTransf(tgTypeFichier.getSelectedToggle().getUserData().toString());
    });
    cbSharpen.setLayoutX(43);
    cbSharpen.setLayoutY(127);
    cbSharpen.selectedProperty().addListener((ov, old_val, new_val) -> {
        slSharpen.setDisable(!new_val);
        lblSharpen.setDisable(!new_val);
        EditeurPanovisu.setbNetteteTransf(new_val);
    });

    slSharpen.setShowTickMarks(true);
    slSharpen.setShowTickLabels(true);
    slSharpen.setMajorTickUnit(0.5f);
    slSharpen.setMinorTickCount(4);
    slSharpen.setBlockIncrement(0.05f);
    slSharpen.setSnapToTicks(true);
    slSharpen.setLayoutX(23);
    slSharpen.setLayoutY(157);
    slSharpen.setTooltip(new Tooltip("Choisissez le niveau d'accentuation de l'image"));
    slSharpen.valueProperty().addListener((observableValue, oldValue, newValue) -> {
        if (newValue == null) {
            lblSharpen.setText("");
            return;
        }
        DecimalFormat dfArrondi = new DecimalFormat();
        dfArrondi.setMaximumFractionDigits(2); //arrondi  2 chiffres apres la virgules
        dfArrondi.setMinimumFractionDigits(2);
        dfArrondi.setDecimalSeparatorAlwaysShown(true);

        lblSharpen.setText(dfArrondi.format(Math.round(newValue.floatValue() * 20.f) / 20.f) + "");
        EditeurPanovisu.setNiveauNetteteTransf(newValue.doubleValue());
    });

    slSharpen.setPrefWidth(120);
    lblSharpen.setLayoutX(150);
    lblSharpen.setLayoutY(150);
    lblSharpen.setMinWidth(30);
    lblSharpen.setMaxWidth(30);
    lblSharpen.setTextAlignment(TextAlignment.RIGHT);

    paneChoixTypeFichier.getChildren().addAll(lblType, rbBmp, rbJpeg, rbTiff, cbSharpen, slSharpen, lblSharpen);
    pbBarreImage.setLayoutX(40);
    pbBarreImage.setLayoutY(190);
    pbBarreImage.setStyle("-fx-accent : #0000bb");
    pbBarreImage.setVisible(false);
    paneChoixTypeFichier.getChildren().add(pbBarreImage);
    pbBarreAvancement = new ProgressBar();
    pbBarreAvancement.setLayoutX(40);
    pbBarreAvancement.setLayoutY(220);
    pbBarreImage.setStyle("-fx-accent : #00bb00");
    paneChoixTypeFichier.getChildren().add(pbBarreAvancement);
    pbBarreAvancement.setVisible(false);

    paneboutons.getChildren().addAll(btnAnnuler, btnValider);
    vbFenetre.getChildren().addAll(hbChoix, paneboutons);
    Scene scnTransformations = new Scene(apTransformations);
    stTransformations.setScene(scnTransformations);
    stTransformations.show();

    btnAnnuler.setOnAction((e) -> {
        annulerE2C();
    });
    btnValider.setOnAction((e) -> {
        if (!bTraitementEffectue) {
            validerE2C();
        }
    });
    btnAjouteFichiers.setOnAction((e) -> {
        lblTermine.setText("");
        fileLstFichier = choixFichiers();
        if (fileLstFichier != null) {
            if (bTraitementEffectue) {
                lvListeFichier.getItems().clear();
                bTraitementEffectue = false;
            }
            for (File fileLstFichier1 : fileLstFichier) {
                String strNomFich = fileLstFichier1.getAbsolutePath();
                lvListeFichier.getItems().add(strNomFich);
            }
        }
    });
    lvListeFichier.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {
        @Override
        public ListCell<String> call(ListView<String> list) {
            return new ListeTransformationCouleur();
        }
    });
    apTransformations.setOnDragOver((event) -> {
        Dragboard dbFichiersTransformation = event.getDragboard();
        if (dbFichiersTransformation.hasFiles()) {
            event.acceptTransferModes(TransferMode.ANY);
        } else {
            event.consume();
        }
    });
    stTransformations.widthProperty().addListener((arg0, arg1, arg2) -> {
        EditeurPanovisu.setLargeurE2C(stTransformations.getWidth());
        apTransformations.setPrefWidth(stTransformations.getWidth());
        vbFenetre.setPrefWidth(stTransformations.getWidth());
        btnAnnuler.setLayoutX(stTransformations.getWidth() - 314);
        btnValider.setLayoutX(stTransformations.getWidth() - 157);
        paneChoixFichier.setPrefWidth(stTransformations.getWidth() - 200);
        lvListeFichier.setPrefWidth(stTransformations.getWidth() - 240);
        lblDragDropE2C.setMinWidth(lvListeFichier.getPrefWidth());
        lblDragDropE2C.setMaxWidth(lvListeFichier.getPrefWidth());

        btnAjouteFichiers.setLayoutX(stTransformations.getWidth() - 341);
    });

    stTransformations.heightProperty().addListener((arg0, arg1, arg2) -> {
        EditeurPanovisu.setHauteurE2C(stTransformations.getHeight());
        apTransformations.setPrefHeight(stTransformations.getHeight());
        vbFenetre.setPrefHeight(stTransformations.getHeight());
        paneChoixFichier.setPrefHeight(stTransformations.getHeight() - 80);
        hbChoix.setPrefHeight(stTransformations.getHeight() - 80);
        lvListeFichier.setPrefHeight(stTransformations.getHeight() - 140);
        lblDragDropE2C.setMinHeight(lvListeFichier.getPrefHeight());
        lblDragDropE2C.setMaxHeight(lvListeFichier.getPrefHeight());
        btnAjouteFichiers.setLayoutY(stTransformations.getHeight() - 121);
    });
    stTransformations.setWidth(EditeurPanovisu.getLargeurE2C());
    stTransformations.setHeight(EditeurPanovisu.getHauteurE2C());
    apTransformations.setOnDragDropped((event) -> {
        Dragboard dbFichiersTransformation = event.getDragboard();
        boolean bSucces = false;
        File[] fileLstFich;
        fileLstFich = null;
        if (dbFichiersTransformation.hasFiles()) {
            lblTermine.setText("");
            bSucces = true;
            String[] stringFichiersPath = new String[200];
            int i = 0;
            for (File file1 : dbFichiersTransformation.getFiles()) {
                stringFichiersPath[i] = file1.getAbsolutePath();
                i++;
            }
            int iNb = i;
            i = 0;
            boolean bAttention = false;
            File[] fileLstFich1 = new File[stringFichiersPath.length];
            for (int j = 0; j < iNb; j++) {

                String strNomfich = stringFichiersPath[j];
                File fileTransf = new File(strNomfich);
                String strExtension = strNomfich.substring(strNomfich.lastIndexOf(".") + 1, strNomfich.length())
                        .toLowerCase();
                if (strExtension.equals("bmp") || strExtension.equals("jpg") || strExtension.equals("tif")) {
                    if (i == 0) {
                        strRepertFichier = fileTransf.getParent();
                    }
                    Image img = null;
                    if (strExtension != "tif") {
                        img = new Image("file:" + fileTransf.getAbsolutePath());
                    } else {
                        try {
                            img = ReadWriteImage.readTiff(strNomfich);
                        } catch (ImageReadException ex) {
                            Logger.getLogger(EquiCubeDialogController.class.getName()).log(Level.SEVERE, null,
                                    ex);
                        } catch (IOException ex) {
                            Logger.getLogger(EquiCubeDialogController.class.getName()).log(Level.SEVERE, null,
                                    ex);
                        }
                    }
                    if (strTypeTransformation.equals(EquiCubeDialogController.EQUI2CUBE)) {
                        if (img.getWidth() == 2 * img.getHeight()) {
                            fileLstFich1[i] = fileTransf;
                            i++;
                        } else {
                            bAttention = true;
                        }
                    } else {
                        if (img.getWidth() == img.getHeight()) {
                            String strNom = fileTransf.getAbsolutePath().substring(0,
                                    fileTransf.getAbsolutePath().length() - 6);
                            boolean bTrouve = false;
                            for (int ik = 0; ik < i; ik++) {
                                String strNom1 = fileLstFich1[ik].getAbsolutePath().substring(0,
                                        fileTransf.getAbsolutePath().length() - 6);
                                if (strNom.equals(strNom1)) {
                                    bTrouve = true;
                                }
                            }
                            if (!bTrouve) {
                                fileLstFich1[i] = fileTransf;
                                i++;
                            }
                        } else {
                            bAttention = true;
                        }

                    }
                }
            }
            if (bAttention) {
                Alert alert = new Alert(AlertType.ERROR);
                alert.setTitle(rbLocalisation.getString("transformation.traiteImages"));
                alert.setHeaderText(null);
                alert.setContentText(rbLocalisation.getString("transformation.traiteImagesType"));
                alert.showAndWait();
            }
            fileLstFichier = new File[i];
            System.arraycopy(fileLstFich1, 0, fileLstFichier, 0, i);
        }
        if (fileLstFichier != null) {
            if (bTraitementEffectue) {
                lvListeFichier.getItems().clear();
                bTraitementEffectue = false;
            }
            for (File lstFichier1 : fileLstFichier) {
                String nomFich = lstFichier1.getAbsolutePath();
                lvListeFichier.getItems().add(nomFich);
            }
        }
        lblDragDropE2C.setVisible(false);
        event.setDropCompleted(bSucces);
        event.consume();
    });

}

From source file:gov.va.isaac.gui.preferences.plugins.ViewCoordinatePreferencesPluginViewController.java

public Region getContent() {
    Task<Void> task = new Task<Void>() {
        @Override/*from w  w  w. j  ava  2s.c  o  m*/
        protected Void call() throws Exception {
            log.debug("initializing content");

            try {
                if (!contentLoaded) {
                    contentLoaded = true;

                    // Populate selectableModules
                    final ConceptVersionBI moduleRootConcept = OTFUtility.getConceptVersion(
                            IsaacMetadataAuxiliaryBinding.MODULE.getPrimodialUuid(), panelViewCoordinate);
                    final Set<ConceptVersionBI> moduleConcepts = new HashSet<>();
                    try {
                        moduleConcepts.addAll(OTFUtility.getAllChildrenOfConcept(moduleRootConcept.getNid(),
                                panelViewCoordinate, false));
                    } catch (Exception e) {
                        log.error("Failed loading module concepts as children of " + moduleRootConcept, e);
                        e.printStackTrace();
                        AppContext.getCommonDialogs()
                                .showErrorDialog("Failed loading module concepts as children of "
                                        + moduleRootConcept + ". See logs.", e);
                    }
                    List<SelectableModule> modules = new ArrayList<>();
                    for (ConceptVersionBI cv : moduleConcepts) {
                        modules.add(new SelectableModule(cv.getNid()));
                    }
                    selectableModules.clear();
                    selectableModules.addAll(modules);

                    allModulesMarker.selected.addListener((observable, oldValue, newValue) -> {
                        if (newValue) {
                            for (SelectableModule module : selectableModules) {
                                module.selectedProperty().set(false);
                            }
                        }
                    });
                    selectableModules.forEach(selectableModule -> selectableModule.selectedProperty()
                            .addListener((observable, wasSelected, isSelected) -> {
                                if (isSelected) {
                                    if (!wasSelected) {
                                        //log.debug("Adding module nid={}, uuid={}, desc={}", selectableModule.getNid(), selectableModule.getUuid(), selectableModule.getDescription());
                                        selectedModules.add(selectableModule.getUuid());
                                        allModulesMarker.selectedProperty().set(false);
                                    }
                                } else {
                                    if (wasSelected) {
                                        //log.debug("Removing module nid={}, uuid={}, desc={}", selectableModule.getNid(), selectableModule.getUuid(), selectableModule.getDescription());
                                        selectedModules.remove(selectableModule.getUuid());

                                        if (selectedModules.size() == 0) {
                                            allModulesMarker.selectedProperty().set(true);
                                        }
                                    }
                                }
                            }));
                    selectableModuleListView.getItems().clear();
                    selectableModuleListView.getItems().add(allModulesMarker);
                    Collections.sort(selectableModules);
                    selectableModuleListView.getItems().addAll(selectableModules);

                    runLaterIfNotFXApplicationThread(
                            () -> pathComboBox.setTooltip(new Tooltip("Default path is \""
                                    + OTFUtility.getDescription(getDefaultPath(), panelViewCoordinate)
                                    + "\"")));

                    pathComboBox.getItems().clear();
                    pathComboBox.getItems().addAll(getPathOptions());
                }

                // Reload persisted values every time

                UserProfile loggedIn = ExtendedAppContext.getCurrentlyLoggedInUserProfile();
                pathComboBox.getSelectionModel().select(loggedIn.getViewCoordinatePath());

                // Reload storedStatedInferredOption
                loadStoredStatedInferredOption();

                // Reload storedStatuses
                loadStoredStatuses();

                // Reload storedModules
                final Set<UUID> storedModuleUuids = getStoredModules();
                if (storedModuleUuids.size() == 0) {
                    allModulesMarker.setSelected(true);
                } else {
                    // Check to make sure that stored UUID refers to an existing, known module
                    for (UUID storedModuleUuid : storedModuleUuids) {
                        boolean foundStoredUuidModuleInSelectableModules = false;
                        for (SelectableModule selectableModule : selectableModules) {
                            if (storedModuleUuid.equals(selectableModule.getUuid())) {
                                foundStoredUuidModuleInSelectableModules = true;
                                break;
                            }
                        }

                        if (!foundStoredUuidModuleInSelectableModules) {
                            log.error(
                                    "Loaded module (uuid={}) from user preferences that does not currently exist",
                                    storedModuleUuid);
                            AppContext.getCommonDialogs().showErrorDialog("Unsupported Module",
                                    "Loaded a module UUID from UserProfile that does not correspond to existing module",
                                    "Concept (UUID=" + storedModuleUuid
                                            + ") not a valid module.  Must be one of "
                                            + Arrays.toString(selectableModules.toArray()));
                        }
                    }
                    for (SelectableModule module : selectableModules) {
                        if (storedModuleUuids.contains(module.getUuid())) {
                            module.setSelected(true);
                        } else {
                            module.setSelected(false);
                        }
                    }
                }

                Long storedTime = getStoredTime();
                if (storedTime.equals(Long.MAX_VALUE)) {
                    dateSelectionMethodComboBox.getSelectionModel().select(DateSelectionMethod.USE_LATEST);
                    currentTimeProperty.set(Long.MAX_VALUE);
                    runLaterIfNotFXApplicationThread(() -> datePicker.setValue(LocalDate.now()));
                } else {
                    dateSelectionMethodComboBox.getSelectionModel().select(DateSelectionMethod.SPECIFY);
                    currentTimeProperty.set(storedTime);
                    setDatePickerFromCurrentTimeProperty();
                }

                return null;
            } catch (Exception e) {
                log.error("initContent() task caught " + e.getClass().getName() + " " + e.getLocalizedMessage(),
                        e);
                e.printStackTrace();
                throw e;
            }
        }

        @Override
        protected void succeeded() {
            log.debug("Content initialization succeeded");

            removeProgressIndicator();
        }

        @Override
        protected void failed() {
            removeProgressIndicator();

            Throwable ex = getException();
            log.error("loadContent() caught " + ex.getClass().getName() + " " + ex.getLocalizedMessage(), ex);
            AppContext.getCommonDialogs().showErrorDialog("Failed loading content. See logs.", ex);
        }
    };

    addProgressIndicator();

    Utility.execute(task);

    return gridPaneInRootStackPane;
}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @return// www  .  j  a  va2  s .  c  o m
 */
private Task<Void> createWorker() {
    return new Task<Void>() {

        /* (non-Javadoc)
         * @see javafx.concurrent.Task#call()
         */
        @Override
        protected Void call() throws Exception {

            /* Start the scanning of viruses. */
            //            virusDetectedMap = handler.startScanning(progressBar, 
            //                                           textArea,
            //                                           textForThreatsFound,
            //                                           virusScanning,
            //                                           workerThread);

            javafx.application.Platform.runLater(new Runnable() {

                /* (non-Javadoc)
                 * @see java.lang.Runnable#run()
                 */
                @Override
                public void run() {
                    /* Set the status to Scanning in Dashboard */
                    if (statusValInDash.getStyle() != null) {
                        statusValInDash.setStyle("");
                    }
                    statusValInDash.setText(POTENTIALLY_UNPROTECTED);
                }
            });

            /* Start Scanning */
            int index = 1;
            boolean isNextVirus = false;
            isPageProtected = false;

            final Calendar c = Calendar.getInstance();
            timestamp = simpleDateFormat.format(c.getTime());

            if (isScanCancelled) {
                isScanCancelled = false;
            }

            final Map<String, String> virusDetectedMap = new HashMap<String, String>();
            final List<String> detectedViruses = new ArrayList<String>();

            /* Cancel the Scan */
            q.setOnMouseClicked(new EventHandler<Event>() {

                /**
                 * @param me
                 */
                @Override
                public void handle(Event me) {
                    isScanCancelled = true;
                }
            });

            if (isScanCancelled) {
                handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                setVirusScanHistoryIfScanIsStopped(handler);
                return null;
            }

            javafx.application.Platform.runLater(new Runnable() {

                /* (non-Javadoc)
                 * @see java.lang.Runnable#run()
                 */
                @Override
                public void run() {

                    if (textArea != null) {
                        textArea.setFont(Font.font("Verdana", FontWeight.BOLD, 10));
                        if (textArea.getText() != null && !textArea.getText().isEmpty()) {
                            textArea.clear();
                        }
                    }

                    if (StringUtils.equals(drop.getText(), "English")) {
                        virusScanning.setText("Scanning...");
                        timerTextForThreats.setText("Virus Timer: 15 seconds");
                    } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                        virusScanning.setText("Exploracin...");
                        timerTextForThreats.setText("Timer Virus: 15 segundos");
                    } else if (drop.getText().equals("French")) {
                        virusScanning.setText("Balayage...");
                        timerTextForThreats.setText("Virus Timer: 15 secondes");
                    } else if (drop.getText().equals("Portuguese")) {
                        virusScanning.setText("Digitalizao...");
                        timerTextForThreats.setText("Temporizador Vrus: 15 segundos");
                    }

                    progressBar.setTooltip(new Tooltip("Virus scan in progress"));

                    if (textForThreatsFound != null && textForThreatsFound.getText() != null
                            && !textForThreatsFound.getText().isEmpty()) {
                        textForThreatsFound.setText("");
                    }
                    if (textForThreatsRemoved != null && textForThreatsRemoved.getText() != null
                            && !textForThreatsRemoved.getText().isEmpty()) {
                        textForThreatsRemoved.setText("");
                    }

                    if (isScanCancelled) {
                        isScanCancelled = false;
                    }
                }
            });

            System.out.println("Scan in progress..!!");
            System.out.println();

            /* Cancel the Scan */
            q.setOnMouseClicked(new EventHandler<Event>() {

                /**
                 * @param me
                 */
                @Override
                public void handle(Event me) {
                    isScanCancelled = true;
                }
            });

            if (isScanCancelled) {
                handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                setVirusScanHistoryIfScanIsStopped(handler);
                return null;
            }

            if (virusRegistry != null) {
                virusSearchList.clear();
                virusSearchList = virusRegistry.getVirusSearchList();
            }
            if (virusCache != null) {
                viruses = virusCache.getAllViruses();
            }
            if (rkm == null) {
                rkm = RegistryKeyManager.getInstance();
            }

            /* Wait for sometime */
            try {
                Thread.sleep(5000);
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }

            javafx.application.Platform.runLater(new Runnable() {

                /* (non-Javadoc)
                 * @see java.lang.Runnable#run()
                 */
                @Override
                public void run() {
                    textArea.appendText("Currently Scanning:");
                    textArea.appendText("\n");
                    textArea.appendText("----------------------");
                    textArea.appendText("\n");

                    /* Cancel the Scan */
                    q.setOnMouseClicked(new EventHandler<Event>() {

                        /**
                         * @param me
                         */
                        @Override
                        public void handle(Event me) {
                            isScanCancelled = true;
                        }
                    });
                }
            });

            if (isScanCancelled) {
                handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                setVirusScanHistoryIfScanIsStopped(handler);
                return null;
            }

            for (final String virus : viruses) {

                /* Cancel the Scan */
                q.setOnMouseClicked(new EventHandler<Event>() {

                    /**
                     * @param me
                     */
                    @Override
                    public void handle(Event me) {
                        isScanCancelled = true;
                    }
                });

                if (isScanCancelled) {
                    handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                    setVirusScanHistoryIfScanIsStopped(handler);
                    return null;
                }

                if (rkm == null) {
                    System.out.println("Scan is stopped due to: " + REGISTRY_KEY_MANEGER_EMPTY);
                    handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                    return null;
                }

                if (isNextVirus) {
                    javafx.application.Platform.runLater(new Runnable() {

                        /* (non-Javadoc)
                         * @see java.lang.Runnable#run()
                         */
                        @Override
                        public void run() {
                            textArea.appendText("\n\n");
                        }
                    });
                }

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        textArea.appendText(virus);
                        textArea.appendText("\n");
                    }
                });

                for (final String virusSearchUsingReg : virusSearchList) {

                    /* Cancel the Scan */
                    q.setOnMouseClicked(new EventHandler<Event>() {

                        /**
                         * @param me
                         */
                        @Override
                        public void handle(Event me) {
                            isScanCancelled = true;
                        }
                    });

                    if (isScanCancelled) {
                        handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                        setVirusScanHistoryIfScanIsStopped(handler);
                        return null;
                    }

                    javafx.application.Platform.runLater(new Runnable() {

                        /* (non-Javadoc)
                         * @see java.lang.Runnable#run()
                         */
                        @Override
                        public void run() {
                            textArea.appendText("\n");
                            textArea.appendText(virusSearchUsingReg);
                        }
                    });

                    try {
                        if (virus != null && !virus.isEmpty() && virusSearchUsingReg != null
                                && !virusSearchUsingReg.isEmpty()) {
                            if (rkm != null) {
                                rkm.query(virusSearchUsingReg, virus);
                                if (rkm.getKey() != null && !rkm.getKey().isEmpty()) {

                                    javafx.application.Platform.runLater(new Runnable() {

                                        /* (non-Javadoc)
                                         * @see java.lang.Runnable#run()
                                         */
                                        @Override
                                        public void run() {
                                            textArea.appendText("\n");
                                        }
                                    });

                                    detectedViruses.add(virusSearchUsingReg + "\\" + virus);
                                    System.out
                                            .println("Found the virus: " + virusSearchUsingReg + "\\" + virus);
                                    virusDetectedMap.put(String.valueOf(index++) + virusSearchUsingReg, virus);
                                }
                            } else {
                                System.out.println("Scan is stopped due to: " + REGISTRY_KEY_MANEGER_EMPTY);
                                handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                                return null;
                            }
                        }
                    } catch (final Exception e) {
                        System.out.println("Failed to scan due to: " + e.getMessage());
                        handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                        return null;
                    }
                    isNextVirus = true;
                }

            }

            System.out.println("Virus scanning is completed");
            handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_COMPLETED);

            javafx.application.Platform.runLater(new Runnable() {

                /* (non-Javadoc)
                 * @see java.lang.Runnable#run()
                 */
                @Override
                public void run() {
                    virusScanning.setText("");
                    timerTextForThreats.setText("");
                }
            });

            /* Cancel the Scan */
            q.setOnMouseClicked(new EventHandler<Event>() {

                /**
                 * @param me
                 */
                @Override
                public void handle(final Event me) {
                    isScanCancelled = true;
                }
            });

            if (isScanCancelled) {
                handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                setVirusScanHistoryIfScanIsStopped(handler);
                return null;
            }

            noOfThreats = virusDetectedMap.size();

            if (handler.getVirusScanStatus() == VirusScanStatus.VIRUS_SCAN_COMPLETED && virusDetectedMap != null
                    && virusDetectedMap.size() > 0) {

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        if (StringUtils.equals(drop.getText(), "English")) {
                            textForThreatsFound.setText("Found Threats: " + noOfThreats);
                        } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                            textForThreatsFound.setText("Las amenazas que se encuentran: " + noOfThreats);
                        } else if (drop.getText().equals("French")) {
                            textForThreatsFound.setText("Menaces trouvs: " + noOfThreats);
                        } else if (drop.getText().equals("Portuguese")) {
                            textForThreatsFound.setText("Ameaas encontradas: " + noOfThreats);
                        }
                        textArea.appendText("\n\n");
                        textArea.appendText("Found one or more viruses:");
                        textArea.appendText("\n");
                        textArea.appendText("--------------------------------");
                        textArea.appendText("\n");
                        for (final String detectedVirus : detectedViruses) {
                            textArea.appendText(detectedVirus);
                            textArea.appendText("\n");
                        }
                    }
                });

                /* Wait for sometime */
                try {
                    Thread.sleep(1000);
                } catch (Exception e) {
                    System.out.println(e.getMessage());
                }
            } else {

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        if (StringUtils.equals(drop.getText(), "English")) {
                            textForThreatsFound.setText("Found Threats: " + noOfThreats);
                        } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                            textForThreatsFound.setText("Las amenazas que se encuentran: " + noOfThreats);
                        } else if (drop.getText().equals("French")) {
                            textForThreatsFound.setText("Menaces trouvs: " + noOfThreats);
                        } else if (drop.getText().equals("Portuguese")) {
                            textForThreatsFound.setText("Ameaas encontradas: " + noOfThreats);
                        }
                        textArea.appendText("\n\n");
                        textArea.appendText("No viruses are found");
                    }
                });

                /* Update the progress */
                updateProgress(1, 1);

                VirusScanHistory virusScanHistory = new VirusScanHistory();
                virusScanHistory.setScanDate(timestamp);
                virusScanHistory.setScanStatus("SUCCESSFUL");
                virusScanHistory.setPcName(System.getenv("COMPUTERNAME"));
                virusScanHistory.setThreatsFound(0);

                virusScanHistoryList.add(virusScanHistory);

                /* Wait for sometime */
                try {
                    Thread.sleep(1000);
                } catch (Exception e) {
                    System.out.println(e.getMessage());
                }

            }

            if (handler.getVirusScanStatus() == VirusScanStatus.VIRUS_SCAN_COMPLETED && noOfThreats > 0) {

                /* Delete the viruses found in scanning. */
                //               final boolean virusesDeleted = handler.deleteViruses(progressBar, 
                //                                                       textArea,
                //                                                       textForThreatsFound,
                //                                                       virusScanning);

                /* Start killing viruses */

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        textArea.appendText("\n\n");
                        textArea.appendText("Killing:");
                        textArea.appendText("\n");
                        textArea.appendText("--------");
                        textArea.appendText("\n");
                    }
                });

                /* Cancel the Scan */
                q.setOnMouseClicked(new EventHandler<Event>() {

                    /**
                     * @param me
                     */
                    @Override
                    public void handle(Event me) {
                        isScanCancelled = true;
                    }
                });

                if (isScanCancelled) {
                    handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                    setVirusScanHistoryIfScanIsStopped(handler);
                    return null;
                }

                System.out.println("\n");

                removedThreats = 0;
                final Map<String, String> tempVirusDetectedMap = new HashMap<String, String>(virusDetectedMap);
                for (final Map.Entry<String, String> virusEntry : tempVirusDetectedMap.entrySet()) {
                    try {
                        if (rkm != null) {
                            rkm.deleteKey(virusEntry.getKey().substring(1), virusEntry.getValue());
                            javafx.application.Platform.runLater(new Runnable() {

                                /* (non-Javadoc)
                                 * @see java.lang.Runnable#run()
                                 */
                                @Override
                                public void run() {
                                    textArea.appendText("Removed the virus: " + virusEntry.getKey().substring(1)
                                            + "\\" + virusEntry.getValue());
                                    virusScanning.setText("");
                                    timerTextForThreats.setText("");
                                }
                            });
                            removedThreats++;
                            System.out.println("Removed the virus: " + virusEntry.getKey().substring(1) + "\\"
                                    + virusEntry.getValue());
                            virusDetectedMap.remove(virusEntry.getKey());
                        } else {
                            System.out.println("Scan is stopped due to: " + REGISTRY_KEY_MANEGER_EMPTY);
                            handler.setVirusScanStatus(VirusScanStatus.VIRUS_SCAN_STOPPED);
                            return null;
                        }
                    } catch (Exception e) {
                        System.out.println(e.getLocalizedMessage());
                    }

                    if (progressCount == tempVirusDetectedMap.size()) {
                        updateProgress(1, 1);
                    }

                    progressCount++;
                }

                if (StringUtils.equals(drop.getText(), "English")) {
                    textForThreatsRemoved.setText("Removed Threats: " + removedThreats);
                } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                    textForThreatsFound.setText("Amenazas eliminados: " + noOfThreats);
                } else if (drop.getText().equals("French")) {
                    textForThreatsFound.setText("Menaces supprimes: " + noOfThreats);
                } else if (drop.getText().equals("Portuguese")) {
                    textForThreatsFound.setText("Ameaas removidos: " + noOfThreats);
                }

                /* Update the progress */
                updateProgress(1, 1);

                /* Wait for sometime */
                try {
                    Thread.sleep(1000);
                } catch (Exception e) {
                    System.out.println(e.getMessage());
                }

                System.out.println();
                System.out.println("Virus removal is completed");

                if (tempVirusDetectedMap != null) {
                    tempVirusDetectedMap.clear();
                }

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        if (textForScanInProgress.getText() != null) {
                            textForScanInProgress.clear();
                        }
                        textForScanInProgress.appendText("Virus scanning is completed");
                    }
                });

                if (virusDetectedMap.size() == 0) {

                    /* Display the protected screen. */
                    showTheProtectedPage();
                    isPageProtected = true;

                    javafx.application.Platform.runLater(new Runnable() {

                        /* (non-Javadoc)
                         * @see java.lang.Runnable#run()
                         */
                        @Override
                        public void run() {
                            /* Set the status */
                            statusValInDash.setStyle("-fx-text-fill: green;");

                            if (drop.getText().equals("English")) {
                                statusValInDash.setText("Potentially Protected");
                            } else if (drop.getText().equals("Spanish")
                                    || drop.getText().equals("Portuguese")) {
                                statusValInDash.setText("Potencialmente Protegido");
                            } else if (drop.getText().equals("French")) {
                                statusValInDash.setText("Potentiellement Protg");
                            }

                            VirusScanHistory virusScanHistory = new VirusScanHistory();
                            virusScanHistory.setScanDate(timestamp);
                            virusScanHistory.setScanStatus("SUCCESSFUL");
                            virusScanHistory.setPcName(System.getenv("COMPUTERNAME"));
                            virusScanHistory.setThreatsFound(noOfThreats);

                            virusScanHistoryList.add(virusScanHistory);
                        }
                    });
                } else {
                    c2.setStyle("-fx-background-color:#DF4444");
                    b1.setStyle("-fx-background-color:#373E48");
                    c1.setStyle("-fx-background-color:transparent");
                    b2.setStyle("-fx-background-color:transparent");
                    c3.setStyle("-fx-background-color:transparent");
                    b3.setStyle("-fx-background-color:transparent");
                    c4.setStyle("-fx-background-color:transparent");
                    b4.setStyle("-fx-background-color:transparent");
                    b5.setStyle("-fx-background-color:transparent");
                    b6.setStyle("-fx-background-color:transparent");

                    unprotected.setVisible(true);
                    unprotected.setManaged(true);

                    isProtected.setVisible(false);
                    isProtected.setManaged(false);

                    general.setVisible(false);
                    general.setManaged(false);

                    scann.setVisible(false);
                    scann.setManaged(false);

                    dash.setVisible(false);
                    dash.setManaged(false);

                    his.setVisible(false);
                    his.setManaged(false);

                    about.setVisible(false);
                    about.setManaged(false);

                    update.setVisible(false);
                    update.setManaged(false);

                    javafx.application.Platform.runLater(new Runnable() {

                        /* (non-Javadoc)
                         * @see java.lang.Runnable#run()
                         */
                        @Override
                        public void run() {
                            /* Set the text */
                            statusValInDash.setStyle("-fx-text-fill: red;");

                            if (drop.getText().equals("English")) {
                                statusValInDash.setText(POTENTIALLY_UNPROTECTED);
                            } else if (drop.getText().equals("Spanish")
                                    || drop.getText().equals("Portuguese")) {
                                statusValInDash.setText("Potencialmente Desprotegido");
                            } else if (drop.getText().equals("French")) {
                                statusValInDash.setText("Potentiellement non protg");
                            }

                            VirusScanHistory virusScanHistory = new VirusScanHistory();
                            virusScanHistory.setScanDate(timestamp);
                            virusScanHistory.setScanStatus("FAILED");
                            virusScanHistory.setPcName(System.getenv("COMPUTERNAME"));
                            virusScanHistory.setThreatsFound(noOfThreats);

                            virusScanHistoryList.add(virusScanHistory);
                        }
                    });
                }
                if (virusDetectedMap != null) {
                    virusDetectedMap.clear();
                }
            } else if (handler.getVirusScanStatus() == VirusScanStatus.VIRUS_SCAN_COMPLETED) {

                javafx.application.Platform.runLater(new Runnable() {

                    /* (non-Javadoc)
                     * @see java.lang.Runnable#run()
                     */
                    @Override
                    public void run() {
                        if (textForScanInProgress.getText() != null) {
                            textForScanInProgress.clear();
                        }
                        textForScanInProgress.appendText("Virus scanning is completed");
                        statusValInDash.setStyle("-fx-text-fill: green;");
                        if (drop.getText().equals("English")) {
                            statusValInDash.setText("Potentially Protected");
                        } else if (drop.getText().equals("Spanish") || drop.getText().equals("Portuguese")) {
                            statusValInDash.setText("Potencialmente Protegido");
                        } else if (drop.getText().equals("French")) {
                            statusValInDash.setText("Potentiellement Protg");
                        }
                    }
                });

                showTheProtectedPage();
                isPageProtected = true;

                System.out.println("No viruses are found in scanning");
            }

            handler.setVirusScanStatus(VirusScanStatus.VIRUS_JOB_COMPLETED);

            javafx.application.Platform.runLater(new Runnable() {

                /* (non-Javadoc)
                 * @see java.lang.Runnable#run()
                 */
                @Override
                public void run() {

                    /* Set the values like last-scan, build in Dashboard based on the virus scan results. */
                    if (handler.getVirusScanStatus() == VirusScanStatus.VIRUS_JOB_COMPLETED) {

                        lastScanValInDash.setText(timestamp);
                        if (StringUtils.equals(drop.getText(), "English")) {
                            textForLastScanInHistory.setText("Last Scan: " + timestamp);
                        } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                            textForLastScanInHistory.setText("ltimo escaneo: " + timestamp);
                        } else if (StringUtils.equals(drop.getText(), "French")) {
                            textForLastScanInHistory.setText("Dernier scan: " + timestamp);
                        } else if (StringUtils.equals(drop.getText(), "Portuguese")) {
                            textForLastScanInHistory.setText("ltima anlise: " + timestamp);
                        }

                    } else if (handler.getVirusScanStatus() == VirusScanStatus.VIRUS_SCAN_STOPPED) {

                        statusValInDash.setStyle("-fx-text-fill: red;");

                        if (drop.getText().equals("English")) {
                            statusValInDash.setText(POTENTIALLY_UNPROTECTED);
                        } else if (drop.getText().equals("Spanish") || drop.getText().equals("Portuguese")) {
                            statusValInDash.setText("Potencialmente Desprotegido");
                        } else if (drop.getText().equals("French")) {
                            statusValInDash.setText("Potentiellement non protg");
                        }

                        lastScanValInDash.setText(timestamp);

                    }
                }

            });

            /* Add the scan results to history. */
            processHistoryData();

            return null;
        }
    };
}

From source file:dsfixgui.view.DSFGraphicsPane.java

private void recheckTextInput(TextField field) {
    String newText = field.getText();
    if (field.equals(renderWidthField)) {
        if (!NumberUtils.isParsable(newText)
                || (NumberUtils.isParsable(newText) && Integer.parseInt(newText) < 1)) {
            renderWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
            renderWidthField.setTooltip(new Tooltip(POSITIVE_INTEGER));
        } else if (Integer.parseInt(newText) >= 1280) {
            if (NumberUtils.isParsable(presentWidthField.getText())
                    && (Integer.parseInt(newText) == Integer.parseInt(presentWidthField.getText()))) {
                renderWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
                renderWidthField.setTooltip(new Tooltip(SAME_RESOLUTIONS));
            } else {
                renderWidthField.pseudoClassStateChanged(INVALID_INPUT, false);
                renderWidthField.setTooltip(new Tooltip(""));
                config.setRenderWidth(Integer.parseInt(newText));
                if (config.disableDOF) {
                    config.setPresentWidth(Integer.parseInt(newText));
                }//from   w w  w. j  a  v  a  2  s .  co m
            }
            //If input is a positive integer that is less than 1280, present width comes into play
        } else if (NumberUtils.isParsable(presentWidthField.getText())
                && Integer.parseInt(presentWidthField.getText()) >= 1280) {
            renderWidthField.pseudoClassStateChanged(INVALID_INPUT, false);
            renderWidthField.setTooltip(new Tooltip(""));
            config.setRenderWidth(Integer.parseInt(newText));
        } else {
            renderWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
            renderWidthField.setTooltip(new Tooltip(PRES_WIDTH_TOO_LOW));
        }
    } else if (field.equals(renderHeightField)) {
        if (!NumberUtils.isParsable(newText)
                || (NumberUtils.isParsable(newText) && Integer.parseInt(newText) < 1)) {
            renderHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
            renderHeightField.setTooltip(new Tooltip(POSITIVE_INTEGER));
        } else if (Integer.parseInt(newText) >= 720) {
            if (NumberUtils.isParsable(presentHeightField.getText())
                    && (Integer.parseInt(newText) == Integer.parseInt(presentHeightField.getText()))) {
                renderHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
                renderHeightField.setTooltip(new Tooltip(SAME_RESOLUTIONS));
            } else {
                renderHeightField.pseudoClassStateChanged(INVALID_INPUT, false);
                renderHeightField.setTooltip(new Tooltip(""));
                config.setRenderHeight(Integer.parseInt(newText));
                if (config.disableDOF) {
                    config.setPresentHeight(Integer.parseInt(newText));
                    config.setDOFOverride(Integer.parseInt(newText));
                }
            }
            //If input is a positive integer that is less than 720, present height comes into play
        } else if (NumberUtils.isParsable(presentHeightField.getText())
                && Integer.parseInt(presentHeightField.getText()) >= 720) {
            renderHeightField.pseudoClassStateChanged(INVALID_INPUT, false);
            renderHeightField.setTooltip(new Tooltip(""));
            config.setRenderHeight(Integer.parseInt(newText));
        } else {
            renderHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
            renderHeightField.setTooltip(new Tooltip(PRES_HEIGHT_TOO_LOW));
        }
    } else if (field.equals(presentWidthField) && !presentWidthField.isDisabled()) {
        if (!NumberUtils.isParsable(newText)
                || (NumberUtils.isParsable(newText) && Integer.parseInt(newText) < 1)) {
            presentWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
            presentWidthField.setTooltip(new Tooltip(POSITIVE_INTEGER));
        } else if (Integer.parseInt(newText) < 1280) {
            presentWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
            presentWidthField.setTooltip(new Tooltip(INPUT_GREATER_THAN + 1280));
        } else if (Integer.parseInt(newText) >= 1280) {
            if (NumberUtils.isParsable(renderWidthField.getText())
                    && (Integer.parseInt(newText) == Integer.parseInt(renderWidthField.getText()))) {
                presentWidthField.pseudoClassStateChanged(INVALID_INPUT, true);
                presentWidthField.setTooltip(new Tooltip(SAME_RESOLUTIONS));
            } else {
                presentWidthField.pseudoClassStateChanged(INVALID_INPUT, false);
                presentWidthField.setTooltip(null);
                config.setPresentWidth(Integer.parseInt(newText));
            }
        }
    } else if (field.equals(presentWidthField) && presentWidthField.isDisabled()) {
        presentWidthField.pseudoClassStateChanged(INVALID_INPUT, false);
        presentWidthField.setTooltip(null);
    } else if (field.equals(presentHeightField) && !presentHeightField.isDisabled()) {
        if (!NumberUtils.isParsable(newText)
                || (NumberUtils.isParsable(newText) && Integer.parseInt(newText) < 1)) {
            presentHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
            presentHeightField.setTooltip(new Tooltip(POSITIVE_INTEGER));
        } else if (Integer.parseInt(newText) < 720) {
            presentHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
            presentHeightField.setTooltip(new Tooltip(INPUT_GREATER_THAN + 720));
        } else if (Integer.parseInt(newText) >= 720) {
            if (NumberUtils.isParsable(renderHeightField.getText())
                    && (Integer.parseInt(newText) == Integer.parseInt(renderHeightField.getText()))) {
                presentHeightField.pseudoClassStateChanged(INVALID_INPUT, true);
                presentHeightField.setTooltip(new Tooltip(SAME_RESOLUTIONS));
            } else {
                presentHeightField.pseudoClassStateChanged(INVALID_INPUT, false);
                presentHeightField.setTooltip(null);
                config.setPresentHeight(Integer.parseInt(newText));
            }
        }
    } else if (field.equals(presentHeightField) && presentHeightField.isDisabled()) {
        presentHeightField.pseudoClassStateChanged(INVALID_INPUT, false);
        presentHeightField.setTooltip(null);
    } else if (field.equals(fpsLimitField) && !fpsLimitField.isDisabled()) {
        if (!NumberUtils.isParsable(newText) || Integer.parseInt(newText) < 1) {
            fpsLimitField.pseudoClassStateChanged(INVALID_INPUT, true);
            fpsLimitField.setTooltip(new Tooltip(POSITIVE_INTEGER));
        } else if (Integer.parseInt(newText) > 70) {
            fpsLimitField.pseudoClassStateChanged(INVALID_INPUT, true);
            fpsLimitField.setTooltip(new Tooltip(INPUT_FPS_TOO_HIGH));
        } else {
            fpsLimitField.pseudoClassStateChanged(INVALID_INPUT, false);
            fpsLimitField.setTooltip(new Tooltip(FPS_LIMIT_LABEL.substring(0, FPS_LIMIT_LABEL.length() - 2)));
            config.FPSlimit.set(Integer.parseInt(newText));
        }
    } else if (field.equals(fpsLimitField) && fpsLimitField.isDisabled()) {
        fpsLimitField.pseudoClassStateChanged(INVALID_INPUT, false);
        fpsLimitField.setTooltip(new Tooltip(""));
    }
}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @param event//  w  ww  . ja v a  2s  .c  o m
 */
@FXML
private void clearHistory(final ActionEvent event) {

    c3.setStyle("-fx-background-color:#DF4444");
    b3.setStyle("-fx-background-color:#373E48");

    c1.setStyle("-fx-background-color:transparent");
    b1.setStyle("-fx-background-color:transparent");

    c2.setStyle("-fx-background-color:transparent");
    b2.setStyle("-fx-background-color:transparent");

    c4.setStyle("-fx-background-color:transparent");
    b4.setStyle("-fx-background-color:transparent");

    b5.setStyle("-fx-background-color:transparent");
    b6.setStyle("-fx-background-color:transparent");

    his.setVisible(true);
    his.setManaged(true);

    isProtected.setVisible(false);
    isProtected.setManaged(false);

    scann.setVisible(false);
    scann.setManaged(false);

    dash.setVisible(false);
    dash.setManaged(false);

    about.setVisible(false);
    about.setManaged(false);

    update.setVisible(false);
    update.setManaged(false);

    general.setVisible(false);
    general.setManaged(false);

    unprotected.setVisible(false);
    unprotected.setManaged(false);

    javafx.application.Platform.runLater(new Runnable() {

        /* (non-Javadoc)
         * @see java.lang.Runnable#run()
         */
        @Override
        public void run() {
            textAreaForHistory.clear();
            clearHistory.setDisable(true);

            textAreaForHistory
                    .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");

            if (StringUtils.equals(drop.getText(), "English")) {
                textAreaForHistory.appendText(HISTORY_UNAVAILABLE);
                textForLastScanInHistory.setText("Last Scan: Please perform a scan.");
            } else if (StringUtils.equals(drop.getText(), "Spanish")) {
                textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_SPANISH);
                textForLastScanInHistory.setText("ltimo escaneo: Por favor, haga un escaneo.");
            } else if (StringUtils.equals(drop.getText(), "French")) {
                textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_FRENCH);
                textForLastScanInHistory.setText("Dernier scan: Veuillez effectuer un scan.");
            } else if (StringUtils.equals(drop.getText(), "Portuguese")) {
                textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_PORTUGUESE);
                textForLastScanInHistory.setText("ltima anlise: Por-favor faa uma anlise.");
            }

            textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));

            virusScanHistoryCount = 0;
        }
    });

    clearHistory.setTooltip(new Tooltip("Clear the history"));

}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @param event//from www  . ja  v  a 2s  .  c  o  m
 */
@FXML
private void ee(final ActionEvent event) {
    drop.setText("English");

    /* Dashboard */
    b2.setText("   Dashboard                   ");
    b2.setTooltip(new Tooltip("Dashboard"));

    b2.setLayoutX(1.0);
    b2.setLayoutY(109.0);

    d1.setText("Dashboard");
    d2.setText("Version: Adware & Toolbar Removal Tool");
    d3.setText("Demo");

    statusTextInDash.setText("Status:");
    lastScanTextInDash.setText("Last Scan:");
    buildTextInDash.setText("Build:");

    statusValInDash.setText(POTENTIALLY_UNPROTECTED);
    lastScanValInDash.setText("Please perform a scan");
    buildValInDash.setText("01.01.193");

    scan.setText("Scan Now");
    scan.setTooltip(new Tooltip("Scan Now"));

    /* Scan */
    b1.setText("   Scan                             ");
    b1.setTooltip(new Tooltip("Scan"));

    b1.setLayoutX(1.0);
    b1.setLayoutY(167.0);

    /* Unprotected after scan is completed */
    s1.setText("Potentially Unprotected!");
    s2.setText("Your computer may be at risk, please perform a scan.");
    s3.setText("Virus Scan");

    s4.setText("Adware Cleaner");
    s5.setText("Toolbar Cleaner");
    s6.setText("Demo");

    scan1.setText("Not up to date");
    scan2.setText("Not checked");
    scan3.setText("Not checked");

    /* Protected after scan is completed */
    protect1.setText("Potentially Protected!");
    protect2.setText("Your computer has been scanned and protected.");
    protect3.setText("Virus Scan");

    protect4.setText("Adware Cleaner");
    protect5.setText("Toolbar Cleaner");
    protect6.setText("Demo");

    scan4.setText("Up to date");
    scan5.setText("Checked");
    scan6.setText("Checked");

    u.setText("Start Scanning");
    u.setTooltip(new Tooltip("Start Scanning"));

    q.setText("Cancel Scan");

    /* History */
    b3.setText(" History                        ");
    b3.setTooltip(new Tooltip("History"));

    b3.setLayoutX(1.0);
    b3.setLayoutY(228.0);

    textForLastScanInHistory.setText("Last Scan: Please perform a scan.");
    textForDemo.setText("Demo");

    clearHistory.setText("Clear history");
    clearHistory.setTooltip(new Tooltip("Clear history"));

    if (StringUtils.isNotBlank(textAreaForHistory.getText())
            && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_SPANISH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_FRENCH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) {
        textAreaForHistory.clear();
        textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;");
        textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
        textAreaForHistory
                .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
        textAreaForHistory.appendText(HISTORY_UNAVAILABLE);
        clearHistory.setDisable(true);
    }

    /* General Settings */
    b5.setText("General Settings      ");
    b5.setTooltip(new Tooltip("General Settings"));

    b5.setLayoutX(6.0);
    b5.setLayoutY(27.0);

    g1.setText("General Settings:");
    g2.setText("Version: Adware & Toolbar Removal Tool");
    g3.setText("Build: 01.01.193");
    g4.setText("Demo");

    w.setText("Apply");
    e.setText("Cancel");

    if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) {
        textAreaForGeneralSettings.clear();
    }
    textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;");
    textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForGeneralSettings
            .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE);

    /* Update */
    b6.setText("Update                   ");
    b6.setTooltip(new Tooltip("Update"));

    b6.setLayoutX(3.0);
    b6.setLayoutY(82.0);

    updateFound.setText("Update(s) Found:");
    updateNow.setText("Update Now");
    installUpdates.setText("Install Updates");
    ignore.setText("Ignore");
    demoInUpdate.setText("Demo");

    textAreaForUpdate.clear();
    textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForUpdate.appendText(UPDATE_UNAVAILABLE);
    textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;");

    /* About */
    b4.setText("  About                        ");
    b4.setTooltip(new Tooltip("About"));

    b4.setLayoutX(4.0);
    b4.setLayoutY(136.0);

    a1.setText("About");
    a2.setText("Version: Adware & Toolbar Removal Tool");
    a3.setText("Device ID: Demo Version");
    a4.setText("Demo");

    t.setText("Help");
    y.setText("Register");

    /* Advanced Settings */
    b7.setText("Advanced Settings");
    //b7.setTooltip(new Tooltip("Advanced Settings"));

    b7.setLayoutX(1.0);
    b7.setLayoutY(292.0);

    txt.setText(
            "An important aspect of technology is its accessibility and moreover assurance that things will not go wrong, as everything which has to do with the technology industry and the ecosystem it has built, has grown phenomenally, so has the need for better security, more reliable interfaces, and optimal performance. Keeping just that in mind at VirusREM weve come up with the perfect product which caters to both the mass market of consumers and the niche requirements of corporations.");
}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @param event/*from  w  w w.  j  a  v  a2 s  . c o  m*/
 */
@FXML
private void ss(final ActionEvent event) {
    drop.setText("Spanish");

    /* Dashboard */
    b2.setText(" Panel de Control        ");
    b2.setTooltip(new Tooltip("Panel de Control"));

    b2.setLayoutX(1.0);
    b2.setLayoutY(109.0);

    d1.setText("Panel de Control");
    d2.setText("Versin: Adware & Herramienta para remover Barra de Herramientas");
    d3.setText("Demo");

    statusTextInDash.setText("Estatus:");
    lastScanTextInDash.setText("ltimo escaneo:");
    buildTextInDash.setText("Armado:");

    statusValInDash.setText("Potencialmente Desprotegido");
    lastScanValInDash.setText("Por favor, haga un escaneo");
    buildValInDash.setText("01.01.193");

    scan.setText("Escanear Ahora");
    scan.setTooltip(new Tooltip("Escanear Ahora"));

    /* Scan */
    b1.setText(" Escaneo                      ");
    b1.setTooltip(new Tooltip("Escaneo"));

    b1.setLayoutX(1.0);
    b1.setLayoutY(167.0);

    /* Unprotected after scan is completed */
    s1.setText("Potencialmente Desprotegido!");
    s2.setText("Tu computadora puede estar en riesgo. Por favor, haz un escaneo.");
    s3.setText("Escaneo de virus");

    s4.setText("Limpiador de Adware");
    s5.setText("Limpiador de Barra de Herramientas");
    s6.setText("Demo");

    scan1.setText("No actualizado");
    scan2.setText("Sin revisar");
    scan3.setText("Sin revisar");

    /* Protected after scan is completed */
    protect1.setText("Potencialmente Protegido!");
    protect2.setText("El ordenador ha sido escaneada y protegido.");
    protect3.setText("Escaneo de virus");

    protect4.setText("Limpiador de Adware");
    protect5.setText("Limpiador de Barra de Herramientas");
    protect6.setText("Demo");

    scan4.setText("A hoy");
    scan5.setText("Comprobado");
    scan6.setText("Comprobado");

    u.setText("Comenzando escaneo");
    u.setTooltip(new Tooltip("Comenzando escaneo"));

    q.setText("Cancelar Escaneo");

    /* History */
    b3.setText("   Historial                        ");
    b3.setTooltip(new Tooltip("Historial"));

    b3.setLayoutX(1.0);
    b3.setLayoutY(228.0);

    textForLastScanInHistory.setText("ltimo escaneo: Por favor, haga un escaneo.");
    textForDemo.setText("Demo");

    clearHistory.setText("Limpiar historial");
    clearHistory.setTooltip(new Tooltip("Limpiar historial"));

    if (StringUtils.isNotBlank(textAreaForHistory.getText())
            && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_FRENCH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) {
        textAreaForHistory.clear();
        textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;");
        textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
        textAreaForHistory
                .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
        textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_SPANISH);
        clearHistory.setDisable(true);
    }

    /* General Settings */
    b5.setText("  Configuraciones Generales   ");
    b5.setTooltip(new Tooltip("Configuraciones Generales"));

    b5.setLayoutX(6.0);
    b5.setLayoutY(27.0);

    g1.setText("Configuraciones Generales:");
    g2.setText("Versin: Adware & Herramienta para remover Barra de Herramientas");
    g3.setText("Armado: 01.01.193");
    g4.setText("Demo");

    w.setText("Aplicar");
    e.setText("Cancelar");

    if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) {
        textAreaForGeneralSettings.clear();
    }
    textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;");
    textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForGeneralSettings
            .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE_IN_SPANISH);

    /* Update */
    b6.setText("   Actualizar                   ");
    b6.setTooltip(new Tooltip("Actualizar"));

    b6.setLayoutX(3.0);
    b6.setLayoutY(82.0);

    updateFound.setText("Actualizaciones Encontradas:");
    updateNow.setText("Actualice Ahora");
    ignore.setText("Ignorar");
    demoInUpdate.setText("Demo");

    textAreaForUpdate.clear();
    textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForUpdate.appendText(UPDATE_UNAVAILABLE_IN_SPANISH);
    textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;");

    /* About */
    b4.setText("  Acerca                        ");
    b4.setTooltip(new Tooltip("Acerca"));

    b4.setLayoutX(4.0);
    b4.setLayoutY(136.0);

    a1.setText("Acerca");
    a2.setText("Versin: Adware & Herramienta para remover Barra de");
    a3.setText("ID del dispositivo: Demo Versin");
    a4.setText("Demo");

    t.setText("Ayuda");
    y.setText("Registrar");

    /* Advanced Settings */
    b7.setText("Configuraciones Avanzadas     ");
    //b7.setTooltip(new Tooltip("Configuraciones Avanzadas"));

    b7.setLayoutX(1.0);
    b7.setLayoutY(292.0);

    txt.setText(
            "Un aspecto importante de la tecnologa es su accesibilidad y garanta, adems, que las cosas no van mal, como todo lo que tiene que ver con la industria de la tecnologa y el ecosistema que ha construido, ha crecido enormemente, por lo que tiene la necesidad de mejorar la seguridad, las interfaces ms fiables y un rendimiento ptimo. Mantener slo eso en mente en VirusREM que hemos llegado con el producto perfecto, que atiende a las necesidades del mercado de masas de los consumidores y las necesidades de las empresas de nicho.");
}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @param event// www.  j a v  a  2  s.c om
 */
@FXML
private void ff(final ActionEvent event) {
    drop.setText("French");

    /* Dashboard */
    //      b2.setText("   Tableau de bord                   ");
    b2.setText("Tableau de bord");
    b2.setTooltip(new Tooltip("Tableau de bord"));

    b2.setLayoutX(-12.0);
    b2.setLayoutY(109.0);

    d1.setText("Tableau de bord");
    d2.setText("Version: Outil de suppression de barre doutils et Adwares (logiciels publicitaires)");
    d3.setText("Dmo");

    statusTextInDash.setText("Statut:");
    lastScanTextInDash.setText("Dernier scan:");
    buildTextInDash.setText("Construire:");

    statusValInDash.setText("Potentiellement non protg");
    lastScanValInDash.setText("Veuillez effectuer un scan");
    buildValInDash.setText("01.01.193");

    scan.setText("Scanner maintenant");
    scan.setTooltip(new Tooltip("Scanner maintenant"));

    /* Scan */
    b1.setText(" Scan                             ");
    b1.setTooltip(new Tooltip("Scan"));

    b1.setLayoutX(1.0);
    b1.setLayoutY(167.0);

    /* Unprotected after scan is completed */
    s1.setText("Potentiellement Non protg!");
    s2.setText("Votre ordinateur peut tre en risque, veuillez effectuer un scan.");
    s3.setText("Scan de virus");

    s4.setText("Nettoyeur des Adwares");
    s5.setText("Nettoyeur de barre doutils");
    s6.setText("Dmo");

    scan1.setText("n'est pas  jour");
    scan2.setText("Non vrifi");
    scan3.setText("Non vrifi");

    /* Protected after scan is completed */
    protect1.setText("Potentiellement Protected!");
    protect2.setText("Votre ordinateur a t numris et protg.");
    protect3.setText("Scan de virus");

    protect4.setText("Nettoyeur des Adwares");
    protect5.setText("Nettoyeur de barre doutils");
    protect6.setText("Dmo");

    scan4.setText(" jour");
    scan5.setText("Vrifi");
    scan6.setText("Vrifi");

    u.setText("commencer le scan");
    u.setTooltip(new Tooltip("commencer le scan"));

    q.setText("Annuler Scan");

    /* History */
    //b3.setText("   Historique                        ");
    b3.setText("Historique");
    b3.setTooltip(new Tooltip("Historique"));

    b3.setLayoutX(-30.0);
    b3.setLayoutY(228.0);

    textForLastScanInHistory.setText("Dernier scan: Veuillez effectuer un scan.");
    textForDemo.setText("Dmo");

    clearHistory.setText("Supprimer lhistorique");
    clearHistory.setTooltip(new Tooltip("Supprimer lhistorique"));

    if (StringUtils.isNotBlank(textAreaForHistory.getText())
            && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_SPANISH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_PORTUGUESE))) {
        textAreaForHistory.clear();
        textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;");
        textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
        textAreaForHistory
                .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
        textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_FRENCH);
        clearHistory.setDisable(true);
    }

    /* General Settings */
    b5.setText("  Paramtres gnraux      ");
    b5.setTooltip(new Tooltip("Paramtres gnraux"));

    b5.setLayoutX(6.0);
    b5.setLayoutY(27.0);

    g1.setText("Paramtres gnraux:");
    g2.setText("Version: Outil de suppression de barre doutils et Adwares");
    g3.setText("Construire: 01.01.193");
    g4.setText("Dmo");

    w.setText("Appliquer");
    e.setText("Annuler");

    if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) {
        textAreaForGeneralSettings.clear();
    }
    textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;");
    textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForGeneralSettings
            .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE_IN_FRENCH);

    /* Update */
    //      b6.setText("   Mise  jour                   ");
    b6.setText("Mise  jour");
    b6.setTooltip(new Tooltip("Mise  jour"));

    b6.setLayoutX(-18.0);
    b6.setLayoutY(82.0);

    updateFound.setText("Mise  jour (s) trouve (s):");
    updateNow.setText("Mettre  jour maintenant");
    ignore.setText("Ignorer");
    demoInUpdate.setText("Dmo");

    textAreaForUpdate.clear();
    textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForUpdate.appendText(UPDATE_UNAVAILABLE_IN_FRENCH);
    textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;");

    /* About */
    //      b4.setText("    propos                        ");
    b4.setText(" propos");
    b4.setTooltip(new Tooltip(" propos"));

    b4.setLayoutX(-23.0);
    b4.setLayoutY(136.0);

    a1.setText(" propos");
    a2.setText("Version: Outil de suppression de barre doutils et des Adwares");
    a3.setText("ID de l'appareil: Dmo Version");
    a4.setText("Dmo");

    t.setText("Aide");
    y.setText("S'inscrire");

    /* Advanced Settings */
    b7.setText("Paramtres avancs");
    //b7.setTooltip(new Tooltip("Paramtres avancs"));

    b7.setLayoutX(1.0);
    b7.setLayoutY(292.0);

    txt.setText(
            "Un aspect important de la technologie est son accessibilit et de l'assurance de plus que les choses ne vont pas aller mal, comme tout ce qui a  voir avec l'industrie de la technologie et de l'cosystme, il a construit, a connu une croissance phnomnale, a donc la ncessit d'une meilleure scurit, interfaces plus fiables , et des performances optimales. Garder tout cela  l'esprit  VirusREM nous avons mis au point le produit parfait qui rpond  la fois le march de masse des consommateurs et les exigences de niche des socits.");
}

From source file:com.virus.removal.javafxapplication.FXMLDocumentController.java

/**
 * @param event//from ww w . j  a  v a  2s.  c  o m
 */
@FXML
private void pp(final ActionEvent event) {
    drop.setText("Portuguese");

    /* Dashboard */
    b2.setText("Painel                   ");
    b2.setTooltip(new Tooltip("Painel"));

    b2.setLayoutX(-10.0);
    b2.setLayoutY(109.0);

    d1.setText("Painel");
    d2.setText("Verso: Adware & Ferramenta De Remoo da Barra de Ferramentas");
    d3.setText("Demonstrao");

    statusTextInDash.setText("Estado:");
    lastScanTextInDash.setText("ltima anlise:");
    buildTextInDash.setText("Construa:");

    statusValInDash.setText("Potencialmente Desprotegido");
    lastScanValInDash.setText("Por-favor faa uma anlise");
    buildValInDash.setText("01.01.193");

    scan.setText("Anlise agora");
    scan.setTooltip(new Tooltip("Anlise agora"));

    /* Scan */
    //      b1.setText("      Anlise                             ");
    b1.setText("Anlise");
    b1.setTooltip(new Tooltip("Anlise"));

    b1.setLayoutX(-38.0);
    b1.setLayoutY(167.0);

    /* Unprotected after scan is completed */
    s1.setText("Potencialmente Desprotegido!");
    s2.setText("O seu computador pode estar em risco, por-favor faa uma anlise.");
    s3.setText("Anlise de vrus");

    s4.setText("Limpador do Adware");
    s5.setText("Limpador da Barra de Ferramentas");
    s6.setText("Demonstrao");

    scan1.setText("Desatualizado");
    scan2.setText("No verificado");
    scan3.setText("No verificado");

    /* Protected after scan is completed */
    protect1.setText("Potencialmente Protegido!");
    protect2.setText("O seu computador foi digitalizado e protegida.");
    protect3.setText("Anlise de vrus");

    protect4.setText("Limpador do Adware");
    protect5.setText("Limpador da Barra de Ferramentas");
    protect6.setText("Demonstrao");

    scan4.setText("Atualizado");
    scan5.setText("Verificado");
    scan6.setText("Verificado");

    u.setText("Comear a anlise");
    u.setTooltip(new Tooltip("Comear a anlise"));

    q.setText("Cancele Anlise");

    /* History */
    b3.setText("Histrico");
    b3.setTooltip(new Tooltip("Histrico"));

    b3.setLayoutX(-33.0);
    b3.setLayoutY(228.0);

    textForLastScanInHistory.setText("ltima anlise: Por-favor faa uma anlise.");
    textForDemo.setText("Demonstrao");

    clearHistory.setText("Histrico limpo");
    clearHistory.setTooltip(new Tooltip("Histrico limpo"));

    if (StringUtils.isNotBlank(textAreaForHistory.getText())
            && (StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_SPANISH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE_IN_FRENCH)
                    || StringUtils.contains(textAreaForHistory.getText(), HISTORY_UNAVAILABLE))) {
        textAreaForHistory.clear();
        textAreaForHistory.setStyle("-fx-text-fill: #00AEEF;");
        textAreaForHistory.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
        textAreaForHistory
                .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
        textAreaForHistory.appendText(HISTORY_UNAVAILABLE_IN_PORTUGUESE);
        clearHistory.setDisable(true);
    }

    /* General Settings */
    b5.setText("  Configuraes Gerais      ");
    b5.setTooltip(new Tooltip("Configuraes Gerais"));

    b5.setLayoutX(6.0);
    b5.setLayoutY(27.0);

    g1.setText("Configuraes Gerais:");
    g2.setText("Verso: Adware & Ferramenta De Remoo da Barra de Ferramentas");
    g3.setText("Construa: 01.01.193");
    g4.setText("Demonstrao");

    w.setText("Aplique");
    e.setText("Cancele");

    if (StringUtils.isNotBlank(textAreaForGeneralSettings.getText())) {
        textAreaForGeneralSettings.clear();
    }
    textAreaForGeneralSettings.setStyle("-fx-text-fill: #00AEEF;");
    textAreaForGeneralSettings.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForGeneralSettings
            .appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForGeneralSettings.appendText(SETTINGS_UNAVAILABLE_IN_PORTUGUESE);

    /* Update */
    b6.setText("Actualizaoe");
    b6.setTooltip(new Tooltip("Actualizaoe"));

    b6.setLayoutX(-10.0);
    b6.setLayoutY(82.0);
    updateFound.setText("Actualizao(es) Encontrada(s):");
    updateNow.setText("Actualize agora");
    ignore.setText("Ignore");
    demoInUpdate.setText("Demonstrao");

    textAreaForUpdate.clear();
    textAreaForUpdate.appendText("\n\n\n\n\n\n\n\n\n\n\n                                                  ");
    textAreaForUpdate.appendText(UPDATE_UNAVAILABLE_IN_PORTUGUESE);
    textAreaForUpdate.setFont(Font.font("Verdana", FontWeight.EXTRA_BOLD, 12));
    textAreaForUpdate.setStyle("-fx-text-fill: #00AEEF;");

    /* About */
    b4.setText(" Sobre                        ");
    b4.setTooltip(new Tooltip("Sobre"));

    b4.setLayoutX(4.0);
    b4.setLayoutY(136.0);

    a1.setText("Sobre");
    a2.setText("Verso: Adware & Ferramenta De Remoo da Barra de Ferramentas");
    a3.setText("ID do aparelho: Demonstrao Verso");
    a4.setText("Demonstrao");

    t.setText("Ajuda");
    y.setText("Registe-se");

    /* Advanced Settings */
    b7.setText("Configuraes Avanadas");
    //b7.setTooltip(new Tooltip("Configuraes Avanadas"));

    b7.setLayoutX(1.0);
    b7.setLayoutY(292.0);

    txt.setText(
            "Um aspecto importante da tecnologia  a sua acessibilidade e garantia, alm disso, que as coisas no vo dar errado, como tudo o que tem a ver com a indstria da tecnologia e do ecossistema que construiu, tem crescido fenomenalmente, tem assim a necessidade de uma melhor segurana, as interfaces mais fiveis e um desempenho ideal. Mantendo apenas isso em mente o tempo VirusREM ns viemos acima com o produto perfeito, que serve tanto para o mercado de massa de consumidores e os requisitos de nicho de empresas.");
}

From source file:editeurpanovisu.EditeurPanovisu.java

private AnchorPane afficherListePanosVignettes(int numHS) {

    AnchorPane aplistePano = new AnchorPane();
    aplistePano.setOpacity(1);/*from  w ww .j a  v  a 2s  . com*/
    Pane fond = new Pane();
    fond.setStyle("-fx-background-color : #bbb;");
    fond.setPrefWidth(540);
    fond.setPrefHeight(((nombrePanoramiques - 2) / 4 + 1) * 65 + 10);
    fond.setMinWidth(540);
    fond.setMinHeight(70);
    aplistePano.getChildren().add(fond);
    aplistePano.setStyle("-fx-backgroung-color : #bbb;");
    int j = 0;
    ImageView[] IVPano;
    IVPano = new ImageView[nombrePanoramiques];
    double xPos;
    double yPos;
    int row = 0;
    for (int i = 0; i < nombrePanoramiques; i++) {
        int numeroPano = i;
        IVPano[j] = new ImageView(panoramiquesProjet[i].getVignettePanoramique());
        IVPano[j].setFitWidth(120);
        IVPano[j].setFitHeight(60);
        IVPano[j].setSmooth(true);
        String nomPano = panoramiquesProjet[i].getNomFichier();
        int col = j % 4;
        row = j / 4;
        xPos = col * 130 + 25;
        yPos = row * 65 + 5;
        IVPano[j].setLayoutX(xPos);
        IVPano[j].setLayoutY(yPos);
        IVPano[j].setCursor(Cursor.HAND);
        IVPano[j].setStyle("-fx-background-color : #ccc;");
        Tooltip t = new Tooltip(
                nomPano.substring(nomPano.lastIndexOf(File.separator) + 1, nomPano.lastIndexOf(".")));
        t.setStyle(tooltipStyle);
        Tooltip.install(IVPano[j], t);
        IVPano[j].setOnMouseClicked((MouseEvent me) -> {
            pano.setCursor(Cursor.CROSSHAIR);
            pano.setOnMouseClicked((MouseEvent me1) -> {
                gereSourisPanoramique(me1);
            });
            panoListeVignette = nomPano;
            if (panoramiquesProjet[numeroPano].getTitrePanoramique() != null) {
                String texteHS = panoramiquesProjet[numeroPano].getTitrePanoramique();
                TextArea txtHS = (TextArea) outils.lookup("#txtHS" + numHS);
                txtHS.setText(texteHS);
            }
            panoramiquesProjet[panoActuel].getHotspot(numHS).setNumeroPano(numeroPano);
            ComboBox cbx = (ComboBox) outils.lookup("#cbpano" + numHS);
            cbx.setValue(nomPano.substring(nomPano.lastIndexOf(File.separator) + 1, nomPano.lastIndexOf(".")));
            aplistePano.setVisible(false);
            me.consume();
        });
        aplistePano.getChildren().add(IVPano[j]);
        j++;

    }
    int taille = (row + 1) * 65 + 5;
    aplistePano.setPrefWidth(540);
    aplistePano.setPrefHeight(taille);
    aplistePano.setMinWidth(540);
    aplistePano.setMinHeight(taille);
    ImageView IVClose = new ImageView(
            new Image("file:" + repertAppli + File.separator + "images/ferme.png", 20, 20, true, true));
    IVClose.setLayoutX(2);
    IVClose.setLayoutY(5);
    IVClose.setCursor(Cursor.HAND);
    aplistePano.getChildren().add(IVClose);
    IVClose.setOnMouseClicked((MouseEvent me) -> {
        pano.setCursor(Cursor.CROSSHAIR);
        pano.setOnMouseClicked((MouseEvent me1) -> {
            gereSourisPanoramique(me1);
        });

        panoListeVignette = "";
        aplistePano.setVisible(false);
        me.consume();
    });
    aplistePano.setTranslateZ(2);
    return aplistePano;
}