Klasse InputPaneBuilder

Alle implementierten Schnittstellen:
InputBuilder<InputPaneBuilder>

public class InputPaneBuilder extends PaneBuilder<InputPane,InputPaneBuilder,Map<String,Object>> implements InputBuilder<InputPaneBuilder>
Builder for Alert Dialogs.

Provides a fluent interface to create Alerts.

  • Methodendetails

    • add

      public <T> InputPaneBuilder add(String id, String label, Class<T> type, Supplier<T> dflt, InputControl<T> control)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled input control.
      Angegeben von:
      add in Schnittstelle InputBuilder<InputPaneBuilder>
      Typparameter:
      T - the result type
      Parameter:
      id - the control's ID
      label - the label text
      type - the result type
      dflt - supplier of default value
      control - the control
      Gibt zurück:
      this
    • add

      public <T> InputPaneBuilder add(String id, Class<T> type, Supplier<T> dflt, InputControl<T> control)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add an unlabeled input control.
      Angegeben von:
      add in Schnittstelle InputBuilder<InputPaneBuilder>
      Typparameter:
      T - the result type
      Parameter:
      id - the control's ID
      type - the result type
      dflt - supplier of default value
      control - the control
      Gibt zurück:
      this
    • addNode

      public InputPaneBuilder addNode(String id, String label, Node node)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled input control.
      Angegeben von:
      addNode in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the node's ID
      label - the label text
      node - the node
      Gibt zurück:
      this
    • addNode

      public InputPaneBuilder addNode(String id, Node node)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add an unlabeled input control.
      Angegeben von:
      addNode in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the node's ID
      node - the node
      Gibt zurück:
      this
    • columns

      public InputPaneBuilder columns(int columns)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Set the number of columns for layout (default is 1).
      Angegeben von:
      columns in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      columns - the number of columns for laying out the input controls
      Gibt zurück:
      this
    • string

      public InputPaneBuilder string(String id, String label, Supplier<String> dflt, Function<String,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled string input.
      Angegeben von:
      string in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID
      label - the label text
      dflt - supplier of default value
      validate - validation callback, return error message if invalid, empty optional if valid
      Gibt zurück:
      this
    • integer

      public InputPaneBuilder integer(String id, String label, Supplier<Integer> dflt, Function<Integer,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled integer input.
      Angegeben von:
      integer in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID
      label - the label text
      dflt - supplier of default value
      validate - validation callback, return error message if invalid, empty optional if valid
      Gibt zurück:
      this
    • decimal

      public InputPaneBuilder decimal(String id, String label, Supplier<Double> dflt, Function<Double,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled decimal input.
      Angegeben von:
      decimal in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID
      label - the label text
      dflt - supplier of default value
      validate - validation callback, return error message if invalid, empty optional if valid
      Gibt zurück:
      this
    • checkBox

      public InputPaneBuilder checkBox(String id, String label, Supplier<Boolean> dflt, String text, Function<Boolean,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Creates a checkbox with the given parameters.
      Angegeben von:
      checkBox in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID of the checkbox
      label - the label for the checkbox
      dflt - the default value of the checkbox
      text - the text to display next to the checkbox
      validate - a function that takes a Boolean value and returns an optional validation message
      Gibt zurück:
      the created checkbox
    • comboBox

      public <T> InputPaneBuilder comboBox(String id, String label, Supplier<T> dflt, Class<T> cls, Collection<T> items, Function<T,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Creates a comboBox widget with the given parameters.
      Angegeben von:
      comboBox in Schnittstelle InputBuilder<InputPaneBuilder>
      Typparameter:
      T - the type of the comboBox items
      Parameter:
      id - the unique identifier for the comboBox
      label - the label to display with the comboBox
      dflt - the supplier function to provide the default value for the comboBox
      cls - the class type of the comboBox items
      items - the collection of items to populate the comboBox
      validate - the function to validate the selected item in the comboBox
      Gibt zurück:
      the comboBox widget
    • comboBoxEx

      public <T> InputPaneBuilder comboBoxEx(String id, String label, @Nullable UnaryOperator<T> edit, @Nullable Supplier<T> add, @Nullable BiPredicate<ComboBoxEx<T>,T> remove, Function<T,String> format, Supplier<T> dflt, Class<T> cls, Collection<T> items, Function<T,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Returns a custom combo box with the specified parameters.
      Angegeben von:
      comboBoxEx in Schnittstelle InputBuilder<InputPaneBuilder>
      Typparameter:
      T - the type of objects in the combo box
      Parameter:
      id - the ID of the combo box
      label - the label of the combo box
      edit - a function to modify the selected item in the combo box, or null if editing is not allowed
      add - a supplier to add a new item to the combo box, or null if adding is not allowed
      remove - a predicate to remove an item from the combo box, or null if removing is not allowed
      format - a function to format the items of the combo box as strings
      dflt - a supplier to provide a default item for the combo box
      cls - the class of objects in the combo box
      items - the collection of items to populate the combo box
      validate - a function to validate the items in the combo box and return an optional error message
      Gibt zurück:
      a custom combo box with the specified parameters
    • radioList

      public <T> InputPaneBuilder radioList(String id, String label, Supplier<T> dflt, Class<T> cls, Collection<T> items, Function<T,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Creates a radio list component.
      Angegeben von:
      radioList in Schnittstelle InputBuilder<InputPaneBuilder>
      Typparameter:
      T - the type of items in the radio list
      Parameter:
      id - the ID of the radio list
      label - the label text for the radio list
      dflt - a supplier that provides the default value for the radio list
      cls - the class of the items in the radio list
      items - a collection of items for the radio list
      validate - a function to validate the selected item, returning an optional error message
      Gibt zurück:
      a radio list component
    • options

      public InputPaneBuilder options(String id, String label, Supplier<com.dua3.utility.options.Arguments> dflt, Supplier<Collection<com.dua3.utility.options.Option<?>>> options)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled pane with options.
      Angegeben von:
      options in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID
      label - the label text
      dflt - supplier of default values
      options - supplier of options
      Gibt zurück:
      this
    • options

      public InputPaneBuilder options(String id, Supplier<com.dua3.utility.options.Arguments> dflt, Supplier<Collection<com.dua3.utility.options.Option<?>>> options)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add an unlabeled pane with options.

      Note to implementers: Labels of the options should be aligned properly with labels of the input dialog.

      Angegeben von:
      options in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID
      dflt - supplier of default values
      options - supplier of options
      Gibt zurück:
      this
    • chooseFile

      public InputPaneBuilder chooseFile(String id, String label, Supplier<Path> dflt, FileDialogMode mode, boolean existingOnly, Collection<FileChooser.ExtensionFilter> filter, Function<Path,Optional<String>> validate)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a file chooser dialog to allow the user to select a file.
      Angegeben von:
      chooseFile in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - The identifier for the file chooser dialog.
      label - The label to display in the file chooser dialog.
      dflt - A function that provides the default path to preselect in the file chooser dialog.
      mode - The mode of the file dialog, such as OPEN or SAVE.
      existingOnly - Whether to only allow selection of existing files.
      filter - The file filters to apply in the file chooser dialog.
      validate - A function to perform additional validation on the selected file path. It returns an optional error message if the validation fails.
      Gibt zurück:
      this
    • node

      public InputPaneBuilder node(String id, Node node)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add an unlabeled custom node to the grid.
      Angegeben von:
      node in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID of the node
      node - the node
      Gibt zurück:
      this
    • node

      public InputPaneBuilder node(String id, String label, Node node)
      Beschreibung aus Schnittstelle kopiert: InputBuilder
      Add a labeled custom node to the grid.
      Angegeben von:
      node in Schnittstelle InputBuilder<InputPaneBuilder>
      Parameter:
      id - the ID of the node
      label - the label text
      node - the node
      Gibt zurück:
      this