|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.ActionWrapper
Base class for encapsulating Action objects
to provide extra functionality.
| Field Summary | |
protected Action |
action
The action to encapsulate as a thread. |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
ActionWrapper()
Constructs an empty wrapper. |
|
ActionWrapper(Action action)
Constructs a wrapper that encapsulates the given action. |
|
| Method Summary | |
abstract void |
actionPerformed(ActionEvent event)
Implement the actionPerformed method to
decide how the encapsulated action will be used. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
Action |
getAction()
Returns the encapsulated action. |
static Action |
getBaseAction(Action action)
Returns the base action that remains after recursively stripping all action wrappers from the given action. |
String |
getName()
Returns the name associated with the action, or an empty String if no name is defined. |
Object |
getValue(String key)
|
boolean |
isEnabled()
|
void |
putValue(String key,
Object value)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
setAction(Action action)
Sets the encapsulated action to the given action. |
void |
setEnabled(boolean b)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Action action
| Constructor Detail |
public ActionWrapper()
ActionWrapper(Action)public ActionWrapper(Action action)
action - the action to encapsulateActionWrapper()| Method Detail |
public Object getValue(String key)
getValue in interface Action
public void putValue(String key,
Object value)
putValue in interface Actionpublic boolean isEnabled()
isEnabled in interface Actionpublic void setEnabled(boolean b)
setEnabled in interface Actionpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface Actionpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface Actionpublic abstract void actionPerformed(ActionEvent event)
actionPerformed method to
decide how the encapsulated action will be used.
actionPerformed in interface ActionListenerevent - the event that invoked this actionpublic Action getAction()
setAction(Action)public void setAction(Action action)
action - the action to encapsulategetAction()public String getName()
String if no name is defined.
public static Action getBaseAction(Action action)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||