public interface Action
Action
interface abstracts away a function from a visual component.
When an action occurs, actionPerform(Component)
method is invoked.Modifier and Type | Interface and Description |
---|---|
static class |
Action.ActionPerformedEvent |
static interface |
Action.BeforeActionPerformedHandler
Callback interface which is invoked by the action before execution.
|
static interface |
Action.HasBeforeActionPerformedHandler
Interface defining methods for adding and removing
Action.BeforeActionPerformedHandler s |
static interface |
Action.HasOpenType
Indicates that the action can be assigned a
WindowManager.OpenType to open a related screen. |
static interface |
Action.HasSecurityConstraint
Interface defining constraintOperationType and constraintCode options.
|
static interface |
Action.HasTarget |
static class |
Action.Status
Used in dialogs to assign a special visual style for a button representing the action.
|
static interface |
Action.UiPermissionAware
Indicates that the action can be affected by UI permissions.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_CAPTION |
static java.lang.String |
PROP_DESCRIPTION |
static java.lang.String |
PROP_ENABLED |
static java.lang.String |
PROP_ICON |
static java.lang.String |
PROP_SHORTCUT |
static java.lang.String |
PROP_VISIBLE |
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(Component component)
Invoked by owning component when an action occurs.
|
void |
addOwner(Component.ActionOwner actionOwner)
Add an owner component.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener to be notified about Enabled, Caption or Icon property changes.
|
java.lang.String |
getCaption() |
java.lang.String |
getDescription() |
java.lang.String |
getIcon() |
java.lang.String |
getId() |
Component.ActionOwner |
getOwner() |
java.util.Collection<Component.ActionOwner> |
getOwners() |
KeyCombination |
getShortcutCombination() |
boolean |
isEnabled() |
boolean |
isVisible() |
void |
refreshState()
Refresh internal state of the action to initialize enabled, visible, caption, icon, etc.
|
void |
removeOwner(Component.ActionOwner actionOwner)
Remove an owner component.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener.
|
void |
setCaption(java.lang.String caption) |
void |
setDescription(java.lang.String description) |
void |
setEnabled(boolean enabled) |
void |
setIcon(java.lang.String icon) |
void |
setIconFromSet(Icons.Icon icon)
Set an icon from an icon set.
|
void |
setShortcut(java.lang.String shortcut)
Set shortcut from string representation.
|
void |
setShortcutCombination(KeyCombination shortcut) |
void |
setVisible(boolean visible) |
static final java.lang.String PROP_CAPTION
static final java.lang.String PROP_DESCRIPTION
static final java.lang.String PROP_SHORTCUT
static final java.lang.String PROP_ICON
static final java.lang.String PROP_ENABLED
static final java.lang.String PROP_VISIBLE
java.lang.String getId()
java.lang.String getCaption()
void setCaption(java.lang.String caption)
java.lang.String getDescription()
void setDescription(java.lang.String description)
KeyCombination getShortcutCombination()
void setShortcutCombination(KeyCombination shortcut)
void setShortcut(java.lang.String shortcut)
shortcut
- string of type "Modifiers-Key", e.g. "Alt-N". Case-insensitive.java.lang.String getIcon()
void setIcon(java.lang.String icon)
void setIconFromSet(Icons.Icon icon)
boolean isEnabled()
void setEnabled(boolean enabled)
boolean isVisible()
void setVisible(boolean visible)
void refreshState()
Component.ActionOwner getOwner()
java.util.Collection<Component.ActionOwner> getOwners()
void addOwner(Component.ActionOwner actionOwner)
actionOwner
- owner componentvoid removeOwner(Component.ActionOwner actionOwner)
actionOwner
- owner componentvoid actionPerform(Component component)
component
- invoking componentvoid addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener
objectvoid removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener
objectaddPropertyChangeListener(java.beans.PropertyChangeListener)