Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Interface OkCancelDialogBuilder
- All Superinterfaces:
ActionDialogBuilder<OkCancelDialogBuilder>
,DialogBuilder<OkCancelDialogBuilder>
Builds a modal dialog for displaying the given
component
,
with OK and Cancel buttons based on the given actions.
An OK action must be provided and the default Cancel action simply disposes the dialog.-
Method Summary
Modifier and TypeMethodDescriptioncancelAction
(Action cancelAction) Note that this action is responsible for closing the dialog.cancelEnabled
(ObservableState cancelEnabled) Note that this is overridden bycancelAction(Action)
.Note that this action is responsible for closing the dialog.okEnabled
(ObservableState okEnabled) Note that this is overridden byokAction(Action)
.Methods inherited from interface is.codion.swing.common.ui.dialog.ActionDialogBuilder
action, build, buttonPanelBorder, buttonPanelConstraints, component, component, defaultAction, escapeAction, modal, onShown, resizable, show, size
Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, onBuild, owner, owner, title, title
-
Method Details
-
okEnabled
Note that this is overridden byokAction(Action)
.- Parameters:
okEnabled
- the state observer controlling the ok enabled state- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case an ok action has already been set
-
cancelEnabled
Note that this is overridden bycancelAction(Action)
.- Parameters:
cancelEnabled
- the state observer controlling the cancel enabled state- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case a cancel action has already been set
-
onOk
- Parameters:
onOk
- called on ok pressed, before the dialog has been disposed- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case an ok action has already been set
-
onCancel
- Parameters:
onCancel
- called on cancel pressed, before the dialog has been disposed- Returns:
- this builder instance
- Throws:
IllegalStateException
- in case a cancel action has already been set
-
okAction
Note that this action is responsible for closing the dialog.- Parameters:
okAction
- the action for the OK button, this action must dispose the dialog- Returns:
- this builder instance
-
cancelAction
Note that this action is responsible for closing the dialog.- Parameters:
cancelAction
- the action for the Cancel button, this action must dispose the dialog- Returns:
- this builder instance
-