|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
com.ehsbe.commons.action.AbstractActionExt
com.ehsbe.commons.action.ManagedAction
com.ehsbe.commons.action.BoundAction
public class BoundAction
A class that represents the many type of actions that this framework supports.
The command invocation of this action may be delegated to another action or item state listener. If there isn't an explicit binding then the command is forwarded to the TargetManager.
Field Summary |
---|
Fields inherited from class com.ehsbe.commons.action.ManagedAction |
---|
actionListeners, itemListeners |
Fields inherited from class com.ehsbe.commons.action.AbstractActionExt |
---|
GROUP, IS_STATE, LARGE_ICON_P_KEY, SELECT_PROPERTY_NAME, SMALL_ICON_P_KEY |
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 | |
---|---|
BoundAction()
Default Action constructor. |
|
BoundAction(String name)
Defines an Action object with the specified name and a
default icon. |
|
BoundAction(String name,
Icon icon)
Defines an Action object with the specified name and the
specified icon. |
|
BoundAction(String name,
String command)
Defines an Action object with the specified name, and the
specified command key. |
|
BoundAction(String name,
String command,
Icon icon)
Defines an Action object with the specified name, the
specified command key and the specified icon. |
Method Summary | |
---|---|
void |
registerCallback(Object handler,
String method)
Registers a callback method. |
void |
setCallback(String callback)
The callback string will be called to register the action callback. |
Methods inherited from class com.ehsbe.commons.action.ManagedAction |
---|
actionPerformed, addActionListener, addItemListener, clone, itemStateChanged, removeActionListener, removeItemListener |
Methods inherited from class com.ehsbe.commons.action.AbstractActionExt |
---|
dispose, getAccelerator, getActionCommand, getGroup, getLargeIcon, getLargePressedIcon, getLongDescription, getMnemonic, getName, getShortDescription, getSmallIcon, getSmallPressedIcon, isSelected, isStateAction, setAccelerator, setActionCommand, setGroup, setLargeIcon, setLargePressedIcon, setLongDescription, setMnemonic, setMnemonic, setName, setSelected, setShortDescription, setSmallIcon, setSmallPressedIcon, setStateAction, setStateAction, toString |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoundAction()
public BoundAction(String name)
Action
object with the specified name and a
default icon.
name
- display name of the actionpublic BoundAction(String name, String command)
Action
object with the specified name, and the
specified command key.
name
- display name of the actioncommand
- the value of the action command keypublic BoundAction(String name, Icon icon)
Action
object with the specified name and the
specified icon.
name
- display name of the actionicon
- the action's iconpublic BoundAction(String name, String command, Icon icon)
Action
object with the specified name, the
specified command key and the specified icon.
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displayMethod Detail |
---|
public void setCallback(String callback)
callback
- a String of the format classname#method
,
where classname is a fully quallyfied class name and method the
name of the method, which should be invoked on the given class and
accepts exactly one boolean parameterregisterCallback(Object, String)
public void registerCallback(Object handler, String method)
If the passed action is a StateChangeAction, then the method passed should take an boolean as an argument. The value of getStateChange() on the ItemEvent object will be passed as the parameter.
handler
- the object which will be perform the actionmethod
- the name of the method on the handler which will be called.
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |