List of usage examples for javafx.scene.paint Color RED
Color RED
To view the source code for javafx.scene.paint Color RED.
Click Source Link
From source file:dpfmanager.shell.interfaces.gui.component.report.ReportsView.java
private void addHeaders() { TableColumn colDate = new TableColumn(bundle.getString("colDate")); setMinMaxWidth(colDate, 75);/* w w w .j av a 2 s . c om*/ colDate.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("date")); TableColumn colTime = new TableColumn(bundle.getString("colTime")); setMinMaxWidth(colTime, 75); colTime.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("time")); TableColumn colN = new TableColumn(bundle.getString("colN")); setMinMaxWidth(colN, 70); colN.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("nfiles")); TableColumn colFile = new TableColumn(bundle.getString("colFile")); setMinMaxWidth(colFile, 160); colFile.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("input")); TableColumn colErrors = new TableColumn(bundle.getString("colErrors")); setMinMaxWidth(colErrors, 65); colErrors.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("errors")); TableColumn colWarnings = new TableColumn(bundle.getString("colWarnings")); setMinMaxWidth(colWarnings, 85); colWarnings.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("warnings")); TableColumn colPassed = new TableColumn(bundle.getString("colPassed")); setMinMaxWidth(colPassed, 65); colPassed.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("passed")); colScore = new TableColumn(bundle.getString("colScore")); setMinMaxWidth(colScore, 75); colScore.setCellValueFactory(new PropertyValueFactory<ReportRow, String>("score")); colFormats = new TableColumn(bundle.getString("colFormats")); setMinMaxWidth(colFormats, 120); colFormats .setCellValueFactory(new PropertyValueFactory<ReportRow, ObservableMap<String, String>>("formats")); colDelete = new TableColumn(bundle.getString("colDelete")); setMinMaxWidth(colDelete, 30); colDelete.setVisible(true); colDelete.setCellValueFactory(new PropertyValueFactory<>("delete")); tabReports.skinProperty().addListener((obs, oldSkin, newSkin) -> { TableHeaderRow header = (TableHeaderRow) tabReports.lookup("TableHeaderRow"); header.reorderingProperty().addListener((o, oldVal, newVal) -> header.setReordering(false)); }); tabReports.setPrefWidth(840.0); tabReports.setFixedCellSize(28.0); tabReports.getColumns().addAll(colDate, colTime, colN, colFile, colErrors, colWarnings, colPassed, colScore, colFormats, colDelete); tabReports.setCursor(Cursor.DEFAULT); tabReports.setEditable(false); tabReports.setMaxHeight(470.0); // Change column colors changeColumnTextColor(colDate, Color.LIGHTGRAY); changeColumnTextColor(colTime, Color.LIGHTGRAY); changeColumnTextColor(colFile, Color.LIGHTGRAY); changeColumnTextColor(colN, Color.CYAN); changeColumnTextColor(colErrors, Color.RED); changeColumnTextColor(colWarnings, Color.ORANGE); changeColumnTextColor(colPassed, Color.GREENYELLOW); changeColumnTextColor(colScore, Color.LIGHTGRAY); // Columns factories Bindings.size(tabReports.getItems()).addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { resizeTable(); } }); addChartScore(); addFormatIcons(); addDeleteIcon(); }
From source file:com.bekwam.resignator.JarsignerConfigController.java
@FXML public void verifyKeypass() { Preconditions.checkNotNull(pfKeypass.textProperty()); Preconditions.checkNotNull(pfConfKeypass.textProperty()); if (StringUtils.isBlank(pfKeypass.textProperty().getValue())) { if (!pfKeypass.getStyleClass().contains("tf-validation-error")) { pfKeypass.getStyleClass().add("tf-validation-error"); }/*from ww w . j a v a 2s . c o m*/ Tooltip tt = pfKeypass.getTooltip(); tt.show(pfKeypass.getParent().getScene().getWindow()); return; } if (StringUtils.equals(pfKeypass.textProperty().getValue(), pfConfKeypass.textProperty().getValue())) { lblConfKeypass.setText("Ok"); lblConfKeypass.setTextFill(Color.GREEN); } else { lblConfKeypass.setText("Bad"); lblConfKeypass.setTextFill(Color.RED); } lblConfKeypass.setVisible(true); clearValidationErrors(); }
From source file:org.openbase.display.DisplayView.java
/** * {@inheritDoc}/*from w w w .j ava2 s . c o m*/ * * @param presetId * @throws org.openbase.jul.exception.CouldNotPerformException */ @Override public Future<Void> showErrorText(final String presetId) throws CouldNotPerformException { return displayHTML(htmlLoader.loadTextView(presetId, Color.RED.darker()), true); }
From source file:com.danilafe.sbaccountmanager.StarboundServerAccountManager.java
private void createAccount(ListView<String> to_update) { Stage createAccountStage = new Stage(); createAccountStage.initModality(Modality.APPLICATION_MODAL); //Set the stage info createAccountStage.setTitle("Add Server Account"); //Create a layout GridPane gp = new GridPane(); gp.setAlignment(Pos.CENTER);/*from w w w . j av a 2s . c o m*/ gp.setVgap(10); gp.setHgap(10); gp.setPadding(new Insets(25, 25, 25, 25)); //Ads the important things Text welcome = new Text("Create Server Account"); welcome.setFont(Font.font("Century Gothic", FontWeight.NORMAL, 20)); gp.add(welcome, 0, 0, 2, 1); Label username = new Label("Username"); Label password = new Label("Password"); Label r_password = new Label("Repeat Password"); TextField usernamefield = new TextField(); PasswordField passwordfield = new PasswordField(); PasswordField r_passwordfield = new PasswordField(); gp.add(username, 0, 1); gp.add(password, 0, 2); gp.add(r_password, 0, 3); gp.add(usernamefield, 1, 1); gp.add(passwordfield, 1, 2); gp.add(r_passwordfield, 1, 3); Text error = new Text(""); HBox error_box = new HBox(10); error_box.setAlignment(Pos.CENTER); error_box.getChildren().add(error); gp.add(error_box, 0, 4, 2, 1); Button finish = new Button("Finish"); finish.setDisable(true); HBox center_button = new HBox(10); center_button.setAlignment(Pos.CENTER); center_button.getChildren().add(finish); gp.add(center_button, 0, 5, 2, 1); ChangeListener name = new ChangeListener<String>() { @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) { finish.setDisable(true); if (usernamefield.getText().equals("")) { error.setFill(Color.RED); error.setText("Username can not be blank!"); } if (!passwordfield.getText().equals(r_passwordfield.getText())) { error.setFill(Color.RED); error.setText("Passwords do not match!"); } if (passwordfield.getText().equals("") && r_passwordfield.getText().equals("")) { error.setFill(Color.RED); error.setText("Passwords can not be blank!"); } if (passwordfield.getText().equals(r_passwordfield.getText()) && !usernamefield.getText().equals("") && !passwordfield.getText().equals("")) { error.setFill(Color.GREEN); error.setText("No issues."); finish.setDisable(false); } } }; usernamefield.textProperty().addListener(name); passwordfield.textProperty().addListener(name); r_passwordfield.textProperty().addListener(name); finish.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { users.remove(usernamefield.getText()); users.add(usernamefield.getText()); userpasswords.put(usernamefield.getText(), passwordfield.getText()); to_update.setItems(FXCollections.observableArrayList(users)); createAccountStage.close(); } }); //Creates the scene Scene scene = new Scene(gp, 300, 275); scene.getStylesheets().add(this.getClass().getResource("login_css.css").toExternalForm()); createAccountStage.setScene(scene); createAccountStage.show(); }
From source file:com.bekwam.resignator.JarsignerConfigController.java
@FXML public void verifyStorepass() { if (logger.isDebugEnabled()) { logger.debug("[VERIFY SP]"); }// www.jav a 2s. c o m Preconditions.checkNotNull(pfStorepass.textProperty()); Preconditions.checkNotNull(pfConfStorepass.textProperty()); if (StringUtils.isBlank(pfStorepass.textProperty().getValue())) { if (!pfStorepass.getStyleClass().contains("tf-validation-error")) { pfStorepass.getStyleClass().add("tf-validation-error"); } cbAlias.getItems().clear(); cbAlias.setDisable(true); Tooltip tt = pfStorepass.getTooltip(); tt.show(pfStorepass.getParent().getScene().getWindow()); return; } if (StringUtils.equals(pfStorepass.textProperty().getValue(), pfConfStorepass.textProperty().getValue())) { lblConfStorepass.setText("Ok"); lblConfStorepass.setTextFill(Color.GREEN); loadAliases(); } else { lblConfStorepass.setText("Bad"); lblConfStorepass.setTextFill(Color.RED); cbAlias.getItems().clear(); cbAlias.setDisable(true); } lblConfStorepass.setVisible(true); clearValidationErrors(); }
From source file:org.openbase.display.DisplayView.java
/** * {@inheritDoc}/* w ww. j a v a 2 s . c o m*/ * * @param presetId * @throws org.openbase.jul.exception.CouldNotPerformException */ @Override public Future<Void> setErrorText(final String presetId) throws CouldNotPerformException { return displayHTML(htmlLoader.loadTextView(presetId, Color.RED.darker()), false); }
From source file:de.pixida.logtest.designer.automaton.AutomatonNode.java
private void updateRect() { String title = ""; if (this.type == Type.INITIAL) { this.setColor(Color.BLUE.desaturate().desaturate().desaturate().desaturate().brighter().brighter()); title += "INITIAL "; } else if (this.type == Type.SUCCESS) { this.setColor(Color.GREEN.desaturate().desaturate().desaturate().desaturate().brighter().brighter()); title += "SUCCESS "; } else if (this.type == Type.FAILURE) { this.setColor(Color.RED.desaturate().desaturate().desaturate().desaturate().brighter().brighter()); title += "FAILURE "; } else {//from w w w . jav a 2s .c om this.setColor(Color.LIGHTGREY); } title += "State"; if (this.wait) { title += " | wait!"; } this.setTitle(title); }
From source file:org.nmrfx.processor.gui.spectra.DatasetAttributes.java
public ColorProperty negColorProperty() { if (negColor == null) { negColor = new ColorProperty(this, "-color", Color.RED); }//from ww w . j a v a 2 s . c o m return negColor; }
From source file:Jigs_Desktop_Client.GUI.FXMLDocumentController.java
@FXML private void disconnect(ActionEvent event) { this.to_user = ""; this.btn_send.setDisable(true); this.connection_circle.setFill(Color.RED); this.search_user_result.setText("No active connections!"); this.selected_user.setText("Select to user to connect!"); try {//from w w w . ja v a 2s .c o m this.spin_earth_image.setImage( new Image(getClass().getResource("resources/spin_earth_dark.gif").toURI().toString())); } catch (URISyntaxException ex) { this.alert("resources/app_error.mp3"); } this.alert("resources/app_disconnect.mp3"); this.btn_disconnect.setDisable(true); }
From source file:ambroafb.general.AnnotiationUtils.java
private static void changeNodeTitleLabelVisual(Node node, String explain) { Parent parent = node.getParent();/*from ww w.j a va 2s. c om*/ Label nodeTitleLabel = (Label) parent.lookup(".validationMessage"); if (explain.isEmpty()) { if (default_colors_map.containsKey(nodeTitleLabel)) {// This order of 'if' statements is correct! nodeTitleLabel.setTextFill(default_colors_map.get(nodeTitleLabel)); default_colors_map.remove(nodeTitleLabel); Tooltip.uninstall(nodeTitleLabel, toolTip); } } else { node.requestFocus(); toolTip.setText(GeneralConfig.getInstance().getTitleFor(explain)); toolTip.setStyle("-fx-background-color: gray; -fx-font-size: 8pt;"); Tooltip.install(nodeTitleLabel, toolTip); default_colors_map.putIfAbsent(nodeTitleLabel, nodeTitleLabel.getTextFill()); nodeTitleLabel.setTextFill(Color.RED); } }