com.borland.primetime.ide
Class KeymapManager.SubKeymapAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--com.borland.primetime.actions.UpdateAction
|
+--com.borland.primetime.ide.KeymapManager.SubKeymapAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable, UpdateableAction
- Enclosing class:
- KeymapManager
- public static class KeymapManager.SubKeymapAction
- extends UpdateAction
The purpose of this class is to wrap an Action object that happens to be
bound in a sub keymap. After actionPerformed is called on the wrapped
action, the keymap is restored to its original state.
- See Also:
- Serialized Form
Field Summary |
protected javax.swing.Action |
action
The action being wrapped. |
protected javax.swing.text.Keymap |
masterKeymap
The keymap which is the master of the keymap containing this action. |
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 |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Execute the actionPerformed of the wrapped action, and set
the current keymap to the master keymap. |
javax.swing.Action |
getAction()
Return the wrapped action. |
void |
update(java.lang.Object source)
If the wrapped action is derived from UpdateableAction,
call the update function on the action. |
Methods inherited from class com.borland.primetime.actions.UpdateAction |
getAltShortText, getDisabledReason, getHelpTopic, getLargeIcon, getLongText, getMnemonic, getShortText, getSmallIcon, getVersion, setAltShortText, setConfigured, setDisabledReason, setHelpTopic, setLargeIcon, setLongText, setMnemonic, setShortText, setSmallIcon |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.Action |
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
action
protected javax.swing.Action action
- The action being wrapped.
masterKeymap
protected javax.swing.text.Keymap masterKeymap
- The keymap which is the master of the keymap containing this action.
KeymapManager.SubKeymapAction
public KeymapManager.SubKeymapAction(javax.swing.Action action,
javax.swing.text.Keymap masterMap)
- Create a new SubKeymapAction.
- Parameters:
action
- The Action object to wrap.masterMap
- The Keymap to restore after actionPerfomed is called
on the wrapped action.
getAction
public javax.swing.Action getAction()
- Return the wrapped action.
- Returns:
- The wrapped action.
update
public void update(java.lang.Object source)
- If the wrapped action is derived from UpdateableAction,
call the update function on the action.
- Overrides:
update
in class UpdateAction
- Parameters:
source
- The source of the action, usually the Browser.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Execute the actionPerformed of the wrapped action, and set
the current keymap to the master keymap.
- Overrides:
actionPerformed
in class javax.swing.AbstractAction
- Parameters:
e
- The event that triggered this function.