Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Interface ActionDialogBuilder<B extends ActionDialogBuilder<B>>
- All Superinterfaces:
DialogBuilder<B>
- All Known Subinterfaces:
OkCancelDialogBuilder
Builds a dialog with a button panel based on actions.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
buttonPanelBorder
(Border buttonPanelBorder) buttonPanelConstraints
(int buttonPanelConstraints) DefaultFlowLayout.TRAILING
defaultAction
(Action defaultAction) A default action is triggered by the Enter keyescapeAction
(Action escapeAction) An escape action is triggered by the Escape keymodal
(boolean modal) resizable
(boolean resizable) show()
Builds and shows the dialog.Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, owner, owner, title, title
-
Method Details
-
action
- Parameters:
action
- the action to add- Returns:
- this builder instance
-
defaultAction
A default action is triggered by the Enter key- Parameters:
defaultAction
- the default action to add- Returns:
- this builder instance
-
escapeAction
An escape action is triggered by the Escape key- Parameters:
escapeAction
- the escape action to add- Returns:
- this builder instance
-
modal
- Parameters:
modal
- true if the dialog should be modal- Returns:
- this builder instance
-
resizable
- Parameters:
resizable
- true if the dialog should be resizable- Returns:
- this builder instance
-
size
- Parameters:
size
- the size of the dialog- Returns:
- this builder instance
-
buttonPanelConstraints
DefaultFlowLayout.TRAILING
- Parameters:
buttonPanelConstraints
- theFlowLayout
panel constraints for the button panel- Returns:
- this builder instance
-
buttonPanelBorder
- Parameters:
buttonPanelBorder
- the button panel border- Returns:
- this builder instance
-
onShown
- Parameters:
onShown
- called each time the dialog is shown- Returns:
- this builder instance
-
show
JDialog show()Builds and shows the dialog.- Returns:
- a new JDialog instance based on this builder.
- Throws:
IllegalStateException
- in case no controls have been specified
-
build
JDialog build()- Returns:
- a new JDialog instance based on this builder.
- Throws:
IllegalStateException
- in case no controls have been specified
-