|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
SEdit.CommandAction
The CommandAction defines a generic implementation of actionPerformed. Here actionPerformed simply calls the execute method on its command object.
Field Summary | |
protected Executable |
command
|
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
CommandAction(Executable command,
String name)
This constructor creates an action without an icon. |
|
CommandAction(Executable command,
String name,
Icon icon)
This constructor creates an action with an icon. |
|
CommandAction(Executable command,
String name,
Icon icon,
String shortdesc,
String longdesc)
This constructor creates an action with an icon. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
actionPerformed is what executed the command. actionPerformed is called whenever the action is acted upon. |
protected Executable |
getCommand()
This method retrieves the encapsulated command. |
protected void |
setCommand(Executable newValue)
This method sets the action's command object. |
void |
setLongDescription(String v)
Set the value of the long description. |
void |
setShortDescription(String v)
Set the value of the short description. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Executable command
Constructor Detail |
public CommandAction(Executable command, String name)
command
- the command for this action to act uponname
- the action's namepublic CommandAction(Executable command, String name, Icon icon)
command
- the command for this action to act uponname
- the action's nameicon
- the action's iconpublic CommandAction(Executable command, String name, Icon icon, String shortdesc, String longdesc)
command
- the command for this action to act uponname
- the action's nameicon
- the action's iconshortdesc
- the action's namelongdesc
- the action's nameMethod Detail |
public void setShortDescription(String v)
v
- Value to assign to the short escription.public void setLongDescription(String v)
v
- Value to assign to the long description.public void actionPerformed(ActionEvent e)
e
- the action eventprotected final Executable getCommand()
protected final void setCommand(Executable newValue)
newValue
- the command for this action to act upon
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |