コード例 #1
0
  @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();
          }
        });
  }
コード例 #2
0
ファイル: MainPaneController.java プロジェクト: Pekinek/CRC
  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();
          }
        });
  }
コード例 #3
0
ファイル: MainPaneController.java プロジェクト: Pekinek/CRC
  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();
          }
        });
  }