|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.AbstractAction
kawigi.cmd.DefaultAction
kawigi.cmd.GlobalActionAdapter
public class GlobalActionAdapter
The idea here is to have an action that works as a global version of a local command. This can be useful when commands are positioned in global places (say a menu bar or toolbar or a macro) but have local scope (because they act on a code pane, for instance). This will use the Dispatcher to try and guess which local context they should act on.
| Field Summary |
|---|
| Fields inherited from class kawigi.cmd.DefaultAction |
|---|
cmdid, COLOR, enableSet, FONT, LARGE_ICON, SELECTED, SPINNER_MODEL, SPINNER_VALUE, TEXT, visible, VISIBLE, visibleSet |
| 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 | |
|---|---|
GlobalActionAdapter(ActID cmdid)
Constructs a new GlobalActionAdapter on the given ActID. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Executes the current local version of this action. |
DefaultAction |
getCurrentAction()
Tries to find the most relevant local version of this action. |
java.lang.Object |
getValue(java.lang.String s)
Tries to get the value of a property from the current local version of this action. |
boolean |
isEnabled()
Returns true if it can get a local version of this action and that action is enabled. |
boolean |
isVisible()
Returns false if it can get a local version of this action and that action is hidden. |
void |
putValue(java.lang.String s,
java.lang.Object value)
Tries to set the value of a property on the current local version of this action. |
| Methods inherited from class kawigi.cmd.DefaultAction |
|---|
equals, getID, isNeedTrackEnabled, reportError, setVisible, UIRefresh |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GlobalActionAdapter(ActID cmdid)
| Method Detail |
|---|
public DefaultAction getCurrentAction()
public boolean isEnabled()
isEnabled in interface javax.swing.ActionisEnabled in class javax.swing.AbstractActionpublic boolean isVisible()
isVisible in class DefaultActionpublic java.lang.Object getValue(java.lang.String s)
getValue in interface javax.swing.ActiongetValue in class javax.swing.AbstractAction
public void putValue(java.lang.String s,
java.lang.Object value)
putValue in interface javax.swing.ActionputValue in class javax.swing.AbstractActionpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class DefaultAction
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||