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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionSpecify aPredicateused to determine if the dialog should be closed when a input value has been accepted.show()Shows the input dialog and returns the value if the user presses OKvalid(ObservableState valid) AObservableStateindicating whether the input is valid, this state controls the enabled state of the OK button.Sets thevalid(ObservableState)according to the given predicate.Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, onBuild, owner, owner, title, title
-
Method Details
-
caption
- Parameters:
caption- the label caption- Returns:
- this builder instance
-
valid
AObservableStateindicating whether the input is valid, this state controls the enabled state of the OK button. Overrides any previously setvalidator(Predicate).- Parameters:
valid- anObservableStateindicating whether the input value is valid- Returns:
- this builder instance
-
validator
Sets thevalid(ObservableState)according to the given predicate. Overrides any previously setvalid(ObservableState).- Parameters:
validator- the valididator predicate- Returns:
- this builder instance
-
close
Specify aPredicateused to determine if the dialog should be closed when a input value has been accepted. Called with the current value each time the input is accepted.- Parameters:
close- called with the current input to determine if the dialog should be closed when accepting input- 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
-