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 TypeMethodDescriptioninputValid(is.codion.common.state.StateObserver inputValid) A StateObserver indicating whether the input is valid, this state controls the enabled state of the OK button.inputValidator(Predicate<T> validInputPredicate) Sets theinputValid(StateObserver)according to the given predicate.show()Shows the input dialog and returns the value if the user presses OKMethods 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
-
inputValid
A StateObserver indicating whether the input is valid, this state controls the enabled state of the OK button. OverridesinputValidator(Predicate).- Parameters:
inputValid- a StateObserver indicating whether the input value is valid- Returns:
- this builder instance
-
inputValidator
Sets theinputValid(StateObserver)according to the given predicate.- Parameters:
validInputPredicate- the valid input 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:
is.codion.common.model.CancelException- in case the user cancels
-