|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
SEdit.CommandAction
public class 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,
java.lang.String name)
This constructor creates an action without an icon. |
|
CommandAction(Executable command,
java.lang.String name,
javax.swing.Icon icon)
This constructor creates an action with an icon. |
|
CommandAction(Executable command,
java.lang.String name,
javax.swing.Icon icon,
java.lang.String shortdesc,
java.lang.String longdesc)
This constructor creates an action with an icon. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.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(java.lang.String v)
Set the value of the long description. |
void |
setShortDescription(java.lang.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, java.lang.String name)
command
- the command for this action to act uponname
- the action's namepublic CommandAction(Executable command, java.lang.String name, javax.swing.Icon icon)
command
- the command for this action to act uponname
- the action's nameicon
- the action's iconpublic CommandAction(Executable command, java.lang.String name, javax.swing.Icon icon, java.lang.String shortdesc, java.lang.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(java.lang.String v)
v
- Value to assign to the short escription.public void setLongDescription(java.lang.String v)
v
- Value to assign to the long description.public void actionPerformed(java.awt.event.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 |