public abstract class SimpleAction extends AbstractAction
| Modifier and Type | Field and Description |
|---|---|
protected String |
description
The short description of this action.
|
protected Icon |
icon
The icon for this action.
|
protected String |
name
The name of this action.
|
changeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
SimpleAction()
Create a default SimpleAction that provides only null values
|
SimpleAction(String
Create a SimpleAction that provides name and description
|
SimpleAction(String
Create a SimpleAction that provides name, description and an icon
|
SimpleAction(String
Create a SimpleAction that provides name, description and an icon
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getValue(String
|
protected void |
setDescription(String
Set the description of this action.
|
protected void |
setIcon(Icon
Set this action's icon.
|
protected void |
setIcon(String
Set this action's icon by resource.
|
protected void |
setName(String
Set the name of this action.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, putValue, removePropertyChangeListener, setEnabledequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactionPerformedprotected Stringname
protected Stringdescription
protected Iconicon
public SimpleAction()
public SimpleAction(Stringname, String description)
name - the name of the action
description - the short description of the action
public SimpleAction(Stringname, String description, Icon icon)
name - the name of the action
description - the short description of the action
icon - the icon used in menus
public SimpleAction(Stringname, String description, String resourceIcon)
name - the name of the action
description - the short description of the action
resourceIcon - a resource to decode the icon used in menus from
protected void setName(Stringname)
name - the new name
protected void setDescription(Stringdescription)
description - the new description
protected void setIcon(Iconicon)
icon - the icon to use
protected void setIcon(StringresourceIcon)
resourceIcon - a resource to decode the icon used in menus from