|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
edu.neu.ccs.gui.SimpleAction
A trivial extension of the Java AbstractAction
class used to simplify the programming interface
for a class representing a GUI action. For convenience, this
class also implements ChangeListener and
PropertyChangeListener
| Nested Class Summary |
| Nested classes inherited from class javax.swing.AbstractAction |
|
| Field Summary |
| 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 | |
SimpleAction()
Constructs a simple action with no name or icon. |
|
SimpleAction(String name)
Constructs a simple action with the given name but no icon. |
|
SimpleAction(String name,
Icon icon)
Constructs a simple action with the given name and icon. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent evt)
Performs this action by calling the simplified method of this class. |
abstract void |
perform()
Performs the tasks encapsulated by this action. |
void |
propertyChange(PropertyChangeEvent evt)
Performs this property change action by calling the simplified method of this class. |
void |
stateChanged(ChangeEvent evt)
Performs this state change action by calling the simplified method of this class. |
| 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 SimpleAction()
public SimpleAction(String name)
name - the name for this action
public SimpleAction(String name,
Icon icon)
name - the name for this actionicon - the icon for this action| Method Detail |
public final void actionPerformed(ActionEvent evt)
perform method of this class.
actionPerformed in interface ActionListenerevt - an object encapsulating an event that triggered this actionpublic final void stateChanged(ChangeEvent evt)
perform method of this class.
stateChanged in interface ChangeListenerevt - an object encapsulating an event that triggered this actionpublic final void propertyChange(PropertyChangeEvent evt)
perform method of this class.
propertyChange in interface PropertyChangeListenerevt - an object encapsulating an event that triggered this actionpublic abstract void perform()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||