Example #1
0
 @FXML
 protected void handleYearChanged(KeyEvent event) {
   String value = year.getText();
   if (value.matches("^[0-9]*$")) details.year = Integer.parseInt(value);
   else {
     int selectionStart = year.getSelection().getStart();
     year.setText(Integer.toString(details.year));
     year.positionCaret(selectionStart);
   }
 }
Example #2
0
  @Override
  public void initialize(URL url, ResourceBundle rb) {
    super.initialize(url, rb);

    setDetails(model.model.Details.createDefault());

    explanation
        .getChildren()
        .stream()
        .filter(Label.class::isInstance)
        .map(n -> (Label) n)
        .forEach(
            l -> l.setText(l.getText().replace("%YEAR_SYMBOL", model.model.Details.YEAR_SYMBOL)));
  }
Example #3
0
 @FXML
 protected void handleCongratulationTextChanged(KeyEvent event) {
   details.congratulationText = congratulationText.getText();
 }
Example #4
0
 @FXML
 protected void handlePresentationTextChanged(KeyEvent event) {
   details.presentationText = presentationText.getText();
 }
Example #5
0
 @FXML
 protected void handleSectionIntroTextChanged(KeyEvent event) {
   details.sectionIntroText = sectionIntroText.getText();
 }