public abstract class AbstractAction extends java.lang.Object implements Action
Action.ActionPerformedEvent, Action.BeforeActionPerformedHandler, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasSecurityConstraint, Action.HasTarget, Action.Status, Action.UiPermissionAwarePROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE| Modifier and Type | Method and Description |
|---|---|
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 |
isPrimary() |
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 |
setPrimary(boolean primary) |
void |
setShortcut(java.lang.String shortcut)
Set shortcut from string representation.
|
void |
setShortcutCombination(KeyCombination shortcut) |
void |
setVisible(boolean visible) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactionPerformpublic java.lang.String getId()
public java.lang.String getCaption()
getCaption in interface Actionpublic void setCaption(java.lang.String caption)
setCaption in interface Actionpublic java.lang.String getDescription()
getDescription in interface Actionpublic void setDescription(java.lang.String description)
setDescription in interface Actionpublic KeyCombination getShortcutCombination()
getShortcutCombination in interface Actionpublic void setShortcutCombination(KeyCombination shortcut)
setShortcutCombination in interface Actionpublic void setShortcut(java.lang.String shortcut)
ActionsetShortcut in interface Actionshortcut - string of type "Modifiers-Key", e.g. "Alt-N". Case-insensitive.public java.lang.String getIcon()
public void setIconFromSet(Icons.Icon icon)
ActionsetIconFromSet in interface Actionpublic boolean isEnabled()
public void setEnabled(boolean enabled)
setEnabled in interface Actionpublic boolean isVisible()
public void setVisible(boolean visible)
setVisible in interface Actionpublic java.util.Collection<Component.ActionOwner> getOwners()
public Component.ActionOwner getOwner()
public void addOwner(Component.ActionOwner actionOwner)
Actionpublic void removeOwner(Component.ActionOwner actionOwner)
ActionremoveOwner in interface ActionactionOwner - owner componentpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
ActionaddPropertyChangeListener in interface Actionlistener - a PropertyChangeListener objectpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
ActionremovePropertyChangeListener in interface Actionlistener - a PropertyChangeListener objectAction.addPropertyChangeListener(java.beans.PropertyChangeListener)public void refreshState()
ActionrefreshState in interface Actionpublic boolean isPrimary()
public void setPrimary(boolean primary)