public class InputDialogAction extends AbstractAction
InputDialog
. It can handle specific InputDialogAction.InputDialogActionPerformed
event for
managing opened dialog.InputDialog
,
Dialogs.InputDialogBuilder
Modifier and Type | Class and Description |
---|---|
static class |
InputDialogAction.InputDialogActionPerformed
Describes action performed event from
InputDialogAction . |
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.BeforeActionPerformedHandler, Action.DisabledWhenScreenReadOnly, Action.ExecutableAction, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
protected boolean |
validationRequired |
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
InputDialogAction(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
static InputDialogAction |
action(java.lang.String id)
Creates new instance of InputDialogAction.
|
void |
actionPerform(Component component)
Invoked by owning component to execute the action.
|
boolean |
isValidationRequired() |
InputDialogAction |
withCaption(java.lang.String caption)
Set caption using fluent API method.
|
InputDialogAction |
withDescription(java.lang.String description)
Set description using fluent API method.
|
InputDialogAction |
withHandler(java.util.function.Consumer<InputDialogAction.InputDialogActionPerformed> handler)
Set action performed event handler using fluent API method.
|
InputDialogAction |
withIcon(Icons.Icon iconKey)
Sets icon from icons set to the action (e.g.
|
InputDialogAction |
withIcon(java.lang.String icon)
Set icon using fluent API method.
|
InputDialogAction |
withPrimary(boolean primary)
Set whether this action is primary using fluent API method.
|
InputDialogAction |
withShortcut(java.lang.String shortcut)
Set shortcut using fluent API method.
|
InputDialogAction |
withValidationRequired(boolean validationRequired)
Set to true if handler should be invoked after successful validation.
|
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDefaultCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombination, setVisible
public void actionPerform(Component component)
Action
component
- invoking componentpublic static InputDialogAction action(java.lang.String id)
id
- action idpublic InputDialogAction withCaption(java.lang.String caption)
caption
- captionpublic InputDialogAction withDescription(java.lang.String description)
description
- descriptionpublic InputDialogAction withIcon(java.lang.String icon)
icon
- iconpublic InputDialogAction withIcon(Icons.Icon iconKey)
iconKey
- iconpublic InputDialogAction withShortcut(java.lang.String shortcut)
shortcut
- shortcutpublic InputDialogAction withHandler(java.util.function.Consumer<InputDialogAction.InputDialogActionPerformed> handler)
handler
- action performed handlerpublic InputDialogAction withPrimary(boolean primary)
primary
- primarypublic InputDialogAction withValidationRequired(boolean validationRequired)
validationRequired
- validation required optionpublic boolean isValidationRequired()