Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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)));
  }
Ejemplo n.º 3
0
 @FXML
 protected void handleCongratulationTextChanged(KeyEvent event) {
   details.congratulationText = congratulationText.getText();
 }
Ejemplo n.º 4
0
 @FXML
 protected void handlePresentationTextChanged(KeyEvent event) {
   details.presentationText = presentationText.getText();
 }
Ejemplo n.º 5
0
 @FXML
 protected void handleSectionIntroTextChanged(KeyEvent event) {
   details.sectionIntroText = sectionIntroText.getText();
 }