Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Interface InputDialogBuilder<T>
- All Superinterfaces:
DialogBuilder<InputDialogBuilder<T>>
Displays the component from a given component value in a dialog and returns the value if the user accepts the input.
-
Method Summary
Modifier and TypeMethodDescriptionshow()
Shows the input dialog and returns the value if the user presses OKvalid
(StateObserver valid) A StateObserver indicating whether the input is valid, this state controls the enabled state of the OK button.Sets thevalid(StateObserver)
according to the given predicate.Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, owner, owner, title, titleProvider
-
Method Details
-
caption
- Parameters:
caption
- the label caption- Returns:
- this builder instance
-
valid
A StateObserver indicating whether the input is valid, this state controls the enabled state of the OK button. Overridesvalidator(Predicate)
.- Parameters:
valid
- a StateObserver indicating whether the input value is valid- Returns:
- this builder instance
-
validator
Sets thevalid(StateObserver)
according to the given predicate.- Parameters:
validator
- the valididator predicate- Returns:
- this builder instance
-
show
T show()Shows the input dialog and returns the value if the user presses OK- Returns:
- the value from the component value if the user accepts the input
- Throws:
CancelException
- in case the user cancels
-