|
GUI Commands 2.0 has arrived!
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pietschy.command.delegate.CommandDelegate
org.pietschy.command.delegate.SwingActionDelegate
public class SwingActionDelegate
SwingActionDelete is an instance of CommandDelegate that invokes an existing swing action. This is
useful for mapping Commands to components that have built in actions.
Example.
CommandDelegate delgate = new SwingActionDelegate("copy-command", getActionMap(), "copy-to-clipboard")
The above example will invoke the "copy-to-clipboard" action when the "copy-command" is invoked.
| Field Summary |
|---|
| Fields inherited from class org.pietschy.command.delegate.CommandDelegate |
|---|
PROPERTY_ENABLED |
| Constructor Summary | |
|---|---|
SwingActionDelegate(java.lang.String id,
javax.swing.Action action)
Creates a new delegate with the specified id that invokes the specfied Action. |
|
SwingActionDelegate(java.lang.String id,
javax.swing.ActionMap actionMap,
java.lang.Object actionKey)
Creates a new delegate with the specified id that invokes the Action in the
specified ActionMap with the specified action key. |
|
| Method Summary | |
|---|---|
void |
execute(java.util.Map hints)
|
| Methods inherited from class org.pietschy.command.delegate.CommandDelegate |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getId, getPropertyChangeListeners, getPropertyChangeListeners, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwingActionDelegate(java.lang.String id,
javax.swing.Action action)
Action.
id - the id of the delegate.action - the Action to invoke.
public SwingActionDelegate(java.lang.String id,
javax.swing.ActionMap actionMap,
java.lang.Object actionKey)
Action in the
specified ActionMap with the specified action key.
Example.
CommandDelegate delgate = new SwingActionDelegate("copy-command", getActionMap(), "copy-to-clipboard")
The above example will invoke the "copy-to-clipboard" action when the "copy-command" is invoked.
id - the id of the delegate.actionMap - the ActionMap containing the Action.actionKey - the actions key within the map.| Method Detail |
|---|
public void execute(java.util.Map hints)
|
GUI Commands 2.0 has arrived!
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||