|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
org.foray.render.awt.viewer.Command
public class Command
This class represents UI-commands, which can be used as menu or toolbar
items
.
When the Command
object receives action event, that object's
doit
method is invoked. doit
method by default
does nothing and the class customer have to override it to implement
any action handling logic.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
Command(PreviewDialog dialog,
String name)
Constructor for no icon. |
|
Command(PreviewDialog dialog,
String name,
ImageIcon anIcon)
Constructor for a resolved icon. |
|
Command(PreviewDialog dialog,
String name,
String iconName)
Constructor for a named icon. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
doit()
Action handler which can be overriden by subclasses. |
void |
undoit()
Action handler which can be overriden by subclasses. |
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 |
Constructor Detail |
---|
public Command(PreviewDialog dialog, String name)
dialog
- The parent dialog.name
- The command name.public Command(PreviewDialog dialog, String name, ImageIcon anIcon)
dialog
- The parent dialog.name
- The command name.anIcon
- The resolved icon.public Command(PreviewDialog dialog, String name, String iconName) throws org.axsl.output.OutputException
dialog
- The parent dialog.name
- The command name.iconName
- The name of the icon to use.
org.axsl.output.OutputException
- If the icon cannot be found.Method Detail |
---|
public void actionPerformed(ActionEvent e)
public void doit()
public void undoit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |