Class ValueDialogBuilder<V>
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.dialogs.ValueDialogBuilder<V>
- Type Parameters:
V- type of the value
Builder of a dialog with one field, created by the one-field methods of
Dialogues.- Author:
- Ionov Ivan
-
Method Summary
Modifier and TypeMethodDescriptionbutton(ISimpleButtonProperties button) Sets the button of the field.Sets the label of the field.Sets the message under the title.open()Opens the dialog and waits until it is closed.strategy(ValidationStrategy<V, String> strategy) Replaces the validation strategy of the field.Sets the initial value.
-
Method Details
-
label
Sets the label of the field. By default there is no label.- Parameters:
label- label of the field- Returns:
- this builder
-
message
Sets the message under the title.- Parameters:
message- the message;nullshows no message- Returns:
- this builder
-
value
Sets the initial value. By default the field is empty.- Parameters:
value- the initial value;nullleaves the field empty- Returns:
- this builder
-
strategy
Replaces the validation strategy of the field.- Parameters:
strategy- checks and converts the text of the field- Returns:
- this builder
-
button
Sets the button of the field. For a file or folder field it replaces the default button, for example withButtons.openFile().extensions(...).- Parameters:
button- the button- Returns:
- this builder
-
open
Opens the dialog and waits until it is closed.- Returns:
- the entered value after OK; an empty
Optionalafter Cancel or when the strategy converts the text tonull
-