/** * It's responsible for refreshing the application's task list when the "Refresh" button is * pressed. * * @throws ClassNotFoundException * @throws SQLException * @throws IOException */ @FXML public void refreshList() throws ClassNotFoundException, SQLException, IOException { super.loadShell(); super.loadLog(); lstView.setItems(FXCollections.observableArrayList(shl.mapToSet())); // lstView.setCellFactory(ComboBoxListCell.forListView(FXCollections.observableArrayList(data))); // lstView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); lstView.setEditable(true); lstView.setOnMouseClicked( new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { System.out.println("clicked on " + lstView.getSelectionModel().getSelectedItem()); shl.setCurrentTab((Task) lstView.getSelectionModel().getSelectedItem()); whatever(); taskName.setText(shl.getCurrentTab().getName()); description.setText(shl.getCurrentTaskDescription()); name.setText(shl.getCurrentTab().getAssignee()); authorname.setText(shl.getCurrentTab().getAuthor()); comment.setText(shl.getCurrentTab().getComment()); lastEditor.setText(shl.getCurrentTab().getLastEditor().getID()); status.setText(statusCheck()); statusV.setText(statusVCheck()); lastEditDate.setText(shl.getCurrentTab().getLastEditDate()); creationDate.setText(shl.getCurrentTab().getCreationDate()); verificationDate.setText(shl.getCurrentTab().getVerificationDate()); completionDate.setText(shl.getCurrentTab().getCompletionDate()); // authorname.setText(shl.getCurrentTab().getAuthor().getName()); if (shl.getCurrentTab().getFileDemo() != null) { fileLabel.setText(shl.getCurrentTab().getFileDemo().toString()); } else fileLabel.setText("No file uploaded"); if (shl.getCurrentTab().isLOCKED()) { comment.setDisable(true); } else comment.setDisable(false); /*if(shl.getCurrentTab().getStatus()==true && shl.getCurrentTab().getStatusV()==true){ set background color green }*/ } }); }
private void setUpCreditDescription() { ListView<String> centerView = new ListView<>(); centerView.setEditable(false); centerView.setDisable(true); ObservableList<String> data = FXCollections.observableArrayList(); data.addAll( "Условия кредита:", " - от 1 года до 3х лет", " - до 50 млн. рублей", " - досрочное погашение", " - ежемесячная уплата процентов"); centerView.setItems(data); centerView.getStyleClass().add("credit-view_list-view"); this.setCenter(centerView); }
public void test() { pScores.setEditable(true); }