java.lang.Object
io.github.jbastgen.stemma.app.ui.widget.Form

public final class Form extends Object
Builders for the controls of settings pages, so every page looks the same.
  • Method Details

    • page

      public static javafx.scene.layout.VBox page(javafx.scene.Node... children)
      A page: its sections stacked with the usual gaps.
    • heading

      public static javafx.scene.control.Label heading(String text)
      The heading of a section: small capitals in a dim colour.
    • hint

      public static javafx.scene.control.Label hint(String text)
      Explanatory text below a control.
    • field

      public static javafx.scene.layout.VBox field(String label, javafx.scene.Node control, String hint)
      A label above a control, with an optional hint below.
    • text

      public static javafx.scene.control.TextField text(String value, String prompt, Consumer<String> onChange)
      A one-line input; every change goes to onChange.
    • mono

      public static javafx.scene.control.TextField mono(String value, String prompt, Consumer<String> onChange)
    • area

      public static javafx.scene.control.TextArea area(String value, String prompt, int rows, Consumer<String> onChange)
      A multi-line input in a monospaced font.
    • check

      public static javafx.scene.control.CheckBox check(String text, boolean value, Consumer<Boolean> onChange)
      A check box.
    • segmented

      public static <T> javafx.scene.layout.HBox segmented(T[] values, T current, Function<T,String> label, Consumer<T> onPick)
      A row of mutually exclusive choices.
    • withButtons

      public static javafx.scene.layout.HBox withButtons(javafx.scene.layout.Region field, javafx.scene.Node... buttons)
      A text field with buttons to its right.
    • status

      public static javafx.scene.control.Label status(boolean ok, String text)
      A line with the state of something: normal when it is fine, red when not.