@FXML
  public void initialize() {
    initializeWorkflowProcessesComboBox();

    // TODO (artf231901): must move to model to handle other WorkflowProcessModel types
    instructionsTextArea.clear();

    promotionPathCoordinateLabel.setText(getDefaultPromotionPathCoordinateTextFieldContent());

    instructionsTextArea.setOnKeyTyped(
        (e) -> initiateButton.setDisable(!isDataRequiredForInitiateOk()));
    instructionsTextArea.addEventHandler(
        InputEvent.ANY,
        new EventHandler<InputEvent>() {
          @Override
          public void handle(InputEvent event) {
            initiateButton.setDisable(!isDataRequiredForInitiateOk());
          }
        });

    cancelButton.setOnAction((e) -> doCancel());

    initiateButton.setDisable(!isDataRequiredForInitiateOk());
    initiateButton.setOnAction(
        new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            initiateWorkflow();
          }
        });
  }
Exemple #2
0
  private void configureRight() {
    scene.addEventHandler(
        KeyEvent.KEY_PRESSED,
        (key) -> {
          if (key.getCode() == KeyCode.D) {
            keys.setRight();
          }
        });

    scene.addEventHandler(
        KeyEvent.KEY_RELEASED,
        (key) -> {
          if (key.getCode() == KeyCode.D) {
            keys.releaseRight();
          }
        });
  }
Exemple #3
0
  private void configureForward() {
    scene.addEventHandler(
        KeyEvent.KEY_PRESSED,
        (key) -> {
          if (key.getCode() == KeyCode.W) {
            keys.setSlowForward();
          }
        });

    scene.addEventHandler(
        KeyEvent.KEY_RELEASED,
        (key) -> {
          if (key.getCode() == KeyCode.W) {
            keys.releaseSlowForward();
          }
        });
  }