List of usage examples for javafx.scene.paint Color LIGHTGREEN
Color LIGHTGREEN
To view the source code for javafx.scene.paint Color LIGHTGREEN.
Click Source Link
From source file:Jigs_Desktop_Client.GUI.FXMLDocumentController.java
private void connectToUser(String user_to_search) { if (user_to_search.equals("")) user_to_search = this.to_user; try {//from w w w . j ava 2 s .c o m System.out.println("Searching for: " + user_to_search); if (jc.findUser(user_to_search)) { String to_user_status = "offline"; this.to_user = user_to_search; for (UserStatus us : this.users_available) { if (us.getUsername().equalsIgnoreCase(user_to_search)) to_user_status = us.getStatus(); } if (to_user_status.equals("online")) { this.connection_circle.setFill(Color.LIGHTGREEN); search_user_result.setText("Connected to @" + user_to_search); this.selected_user.setText("Connected to @" + user_to_search); try { this.spin_earth_image.setImage(new Image( getClass().getResource("resources/spin_earth_bright.gif").toURI().toString())); } catch (URISyntaxException ex) { this.alert("resources/app_error.mp3"); } } else { this.connection_circle.setFill(Color.YELLOW); search_user_result.setText("Offline messaging @" + user_to_search); this.selected_user.setText("Sending offline messages @" + user_to_search); } this.btn_send.setDisable(false); this.alert("resources/app_user_connected.mp3"); main_tab_pane.getSelectionModel().select(2); } else { this.connection_circle.setFill(Color.RED); search_user_result.setText("No user found for @" + user_to_search); this.btn_send.setDisable(true); this.alert("resources/app_no_such_user.mp3"); } } catch (IOException ex) { this.connection_circle.setFill(Color.RED); search_user_result.setText(ex.getMessage()); this.btn_send.setDisable(true); this.alert("resources/app_error.mp3"); } }