|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
org.jdesktop.swingx.action.AbstractActionExt
org.jdesktop.swingx.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 org.jdesktop.swingx.action.AbstractActionExt |
---|
GROUP, IS_STATE, LARGE_ICON |
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 | |
---|---|
BoundAction()
|
|
BoundAction(String name)
|
|
BoundAction(String name,
Icon icon)
|
|
BoundAction(String name,
String command)
|
|
BoundAction(String name,
String command,
Icon icon)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
Callback for command actions. |
void |
addActionListener(ActionListener listener)
Add an action listener which will be invoked when this action is invoked. |
void |
addItemListener(ItemListener listener)
Add an item listener which will be invoked for toggle actions. |
ActionListener[] |
getActionListeners()
|
ItemListener[] |
getItemListeners()
|
void |
itemStateChanged(ItemEvent evt)
Callback for toggle actions. |
void |
registerCallback(Object handler,
String method)
Registers a callback method when the Action corresponding to the action id is invoked. |
void |
removeActionListener(ActionListener listener)
|
void |
removeItemListener(ItemListener listener)
|
void |
setCallback(String callback)
The callback string will be called to register the action callback. |
Methods inherited from class org.jdesktop.swingx.action.AbstractActionExt |
---|
dispose, getAccelerator, getActionCommand, getGroup, getLargeIcon, getLongDescription, getMnemonic, getName, getShortDescription, getSmallIcon, isSelected, isStateAction, setAccelerator, setActionCommand, setGroup, setLargeIcon, setLongDescription, setMnemonic, setMnemonic, setName, setSelected, setShortDescription, setSmallIcon, setStateAction, setStateAction, toString |
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, wait, wait, wait |
Constructor Detail |
---|
public BoundAction()
public BoundAction(String name)
public BoundAction(String name, String command)
name
- display name of the actioncommand
- the value of the action command keypublic BoundAction(String name, Icon icon)
public BoundAction(String name, String command, Icon icon)
name
- display name of the actioncommand
- the value of the action command keyicon
- icon to displayMethod Detail |
---|
public void setCallback(String callback)
<exec>com.sun.foo.FubarHandler#handleBar</exec>will register
registerCallback(com.sun.foo.FubarHandler(), "handleBar");
public void registerCallback(Object handler, String method)
If the Action represented by the action id is a StateChangeAction, then the method passed should take an int 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.public void addActionListener(ActionListener listener)
public void removeActionListener(ActionListener listener)
public ActionListener[] getActionListeners()
public void addItemListener(ItemListener listener)
public void removeItemListener(ItemListener listener)
public ItemListener[] getItemListeners()
public void actionPerformed(ActionEvent evt)
public void itemStateChanged(ItemEvent evt)
itemStateChanged
in interface ItemListener
itemStateChanged
in class AbstractActionExt
evt
- the ItemEvent fired by a ItemSelectable on changing the selected
state.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |