예제 #1
0
  @FXML
  void initialize() {
    assert progressBar != null
        : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
    assert taskLabel != null
        : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
    assert messageLabel != null
        : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS

    taskLabel.setVisible(false);
    taskLabel.textProperty().bind(this.controller.taskTitleProperty());
    taskLabel.visibleProperty().bind(this.controller.getTasks().emptyProperty().not());

    messageLabel.textProperty().bind(this.controller.taskMessageProperty());
    progressBar.progressProperty().bind(this.controller.taskProgressProperty());

    statusLabel.textProperty().bind(this.controller.statusMessageProperty());
    statusLabel.visibleProperty().bind(statusLabel.textProperty().isNotEmpty());
  }