java.lang.Object
com.dua3.utility.fx.controls.abstract_builders.DialogPaneBuilder<InputPane,InputPaneBuilder,Map<String,Object>>
com.dua3.utility.fx.controls.abstract_builders.PaneBuilder<InputPane,InputPaneBuilder,Map<String,Object>>
com.dua3.utility.fx.controls.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.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen com.dua3.utility.fx.controls.abstract_builders.DialogPaneBuilder
DialogPaneBuilder.ResultHandler<R> -
Feldübersicht
Von Klasse geerbte Felder com.dua3.utility.fx.controls.abstract_builders.DialogPaneBuilder
ALWAYS_TRUE -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<T> InputPaneBuilderadd(String id, Class<T> type, Supplier<T> dflt, InputControl<T> control) Add an unlabeled input control.<T> InputPaneBuilderAdd a labeled input control.Add a labeled input control.Add an unlabeled input control.checkBox(String id, String label, Supplier<Boolean> dflt, String text, Function<Boolean, Optional<String>> validate) Creates a checkbox with the given parameters.chooseFile(String id, String label, Supplier<Path> dflt, FileDialogMode mode, boolean existingOnly, Collection<FileChooser.ExtensionFilter> filter, Function<Path, Optional<String>> validate) Add a file chooser dialog to allow the user to select a file.columns(int columns) Set the number of columns for layout (default is 1).<T> InputPaneBuildercomboBox(String id, String label, Supplier<T> dflt, Class<T> cls, Collection<T> items, Function<T, Optional<String>> validate) Creates a comboBox widget with the given parameters.<T> InputPaneBuildercomboBoxEx(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) Returns a custom combo box with the specified parameters.Add a labeled decimal input.integer(String id, String label, Supplier<Integer> dflt, Function<Integer, Optional<String>> validate) Add a labeled integer input.Add a labeled custom node to the grid.Add an unlabeled custom node to the grid.options(String id, String label, Supplier<com.dua3.utility.options.Arguments> dflt, Supplier<Collection<com.dua3.utility.options.Option<?>>> options) Add a labeled pane with options.options(String id, Supplier<com.dua3.utility.options.Arguments> dflt, Supplier<Collection<com.dua3.utility.options.Option<?>>> options) Add an unlabeled pane with options.<T> InputPaneBuilderradioList(String id, String label, Supplier<T> dflt, Class<T> cls, Collection<T> items, Function<T, Optional<String>> validate) Creates a radio list component.Add a labeled string input.Von Klasse geerbte Methoden com.dua3.utility.fx.controls.abstract_builders.PaneBuilder
getNext, nextVon Klasse geerbte Methoden com.dua3.utility.fx.controls.abstract_builders.DialogPaneBuilder
applyIfNotNull, build, button, buttons, getResultHandler, header, resultHandler, setDialogSupplierVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden com.dua3.utility.fx.controls.InputBuilder
checkBox, chooseFile, comboBox, comboBoxEx, decimal, integer, radioList, string
-
Methodendetails
-
add
public <T> InputPaneBuilder add(String id, String label, Class<T> type, Supplier<T> dflt, InputControl<T> control) Beschreibung aus Schnittstelle kopiert:InputBuilderAdd a labeled input control.- Angegeben von:
addin SchnittstelleInputBuilder<InputPaneBuilder>- Typparameter:
T- the result type- Parameter:
id- the control's IDlabel- the label texttype- the result typedflt- supplier of default valuecontrol- 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:InputBuilderAdd an unlabeled input control.- Angegeben von:
addin SchnittstelleInputBuilder<InputPaneBuilder>- Typparameter:
T- the result type- Parameter:
id- the control's IDtype- the result typedflt- supplier of default valuecontrol- the control- Gibt zurück:
this
-
addNode
Beschreibung aus Schnittstelle kopiert:InputBuilderAdd a labeled input control.- Angegeben von:
addNodein SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the node's IDlabel- the label textnode- the node- Gibt zurück:
this
-
addNode
Beschreibung aus Schnittstelle kopiert:InputBuilderAdd an unlabeled input control.- Angegeben von:
addNodein SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the node's IDnode- the node- Gibt zurück:
this
-
columns
Beschreibung aus Schnittstelle kopiert:InputBuilderSet the number of columns for layout (default is 1).- Angegeben von:
columnsin SchnittstelleInputBuilder<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:InputBuilderAdd a labeled string input.- Angegeben von:
stringin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the IDlabel- the label textdflt- supplier of default valuevalidate- 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:InputBuilderAdd a labeled integer input.- Angegeben von:
integerin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the IDlabel- the label textdflt- supplier of default valuevalidate- 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:InputBuilderAdd a labeled decimal input.- Angegeben von:
decimalin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the IDlabel- the label textdflt- supplier of default valuevalidate- 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:InputBuilderCreates a checkbox with the given parameters.- Angegeben von:
checkBoxin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the ID of the checkboxlabel- the label for the checkboxdflt- the default value of the checkboxtext- the text to display next to the checkboxvalidate- 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:InputBuilderCreates a comboBox widget with the given parameters.- Angegeben von:
comboBoxin SchnittstelleInputBuilder<InputPaneBuilder>- Typparameter:
T- the type of the comboBox items- Parameter:
id- the unique identifier for the comboBoxlabel- the label to display with the comboBoxdflt- the supplier function to provide the default value for the comboBoxcls- the class type of the comboBox itemsitems- the collection of items to populate the comboBoxvalidate- 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:InputBuilderReturns a custom combo box with the specified parameters.- Angegeben von:
comboBoxExin SchnittstelleInputBuilder<InputPaneBuilder>- Typparameter:
T- the type of objects in the combo box- Parameter:
id- the ID of the combo boxlabel- the label of the combo boxedit- a function to modify the selected item in the combo box, or null if editing is not allowedadd- a supplier to add a new item to the combo box, or null if adding is not allowedremove- a predicate to remove an item from the combo box, or null if removing is not allowedformat- a function to format the items of the combo box as stringsdflt- a supplier to provide a default item for the combo boxcls- the class of objects in the combo boxitems- the collection of items to populate the combo boxvalidate- 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:InputBuilderCreates a radio list component.- Angegeben von:
radioListin SchnittstelleInputBuilder<InputPaneBuilder>- Typparameter:
T- the type of items in the radio list- Parameter:
id- the ID of the radio listlabel- the label text for the radio listdflt- a supplier that provides the default value for the radio listcls- the class of the items in the radio listitems- a collection of items for the radio listvalidate- 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:InputBuilderAdd a labeled pane with options.- Angegeben von:
optionsin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the IDlabel- the label textdflt- supplier of default valuesoptions- 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:InputBuilderAdd an unlabeled pane with options.Note to implementers: Labels of the options should be aligned properly with labels of the input dialog.
- Angegeben von:
optionsin SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the IDdflt- supplier of default valuesoptions- 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:InputBuilderAdd a file chooser dialog to allow the user to select a file.- Angegeben von:
chooseFilein SchnittstelleInputBuilder<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
Beschreibung aus Schnittstelle kopiert:InputBuilderAdd an unlabeled custom node to the grid.- Angegeben von:
nodein SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the ID of the nodenode- the node- Gibt zurück:
this
-
node
Beschreibung aus Schnittstelle kopiert:InputBuilderAdd a labeled custom node to the grid.- Angegeben von:
nodein SchnittstelleInputBuilder<InputPaneBuilder>- Parameter:
id- the ID of the nodelabel- the label textnode- the node- Gibt zurück:
this
-