com.borland.primetime.editor
Class EditorAction.SubKeymapAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--com.borland.primetime.editor.EditorAction
|
+--com.borland.primetime.editor.EditorAction.SubKeymapAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
- Enclosing class:
- EditorAction
- public static class EditorAction.SubKeymapAction
- extends EditorAction
The purpose of this class is to wrap an Action object that happens to be
bound in a sub keymap. After actionPerformed is called the keymap is
reset.
- See Also:
- Serialized Form
Field Summary |
protected javax.swing.Action |
action
The Action object bound wrapped by this instance. |
protected boolean |
markProcessedKeyPressed
This is true if we should set the processedKeyPressed flag in the editor
after restoring the original keymap. |
protected javax.swing.text.Keymap |
masterKeymap
The Keymap to restore after this instance is invoked. |
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 |
EditorAction.SubKeymapAction(javax.swing.Action action,
javax.swing.text.Keymap masterMap,
javax.swing.KeyStroke keyStroke)
Create a new SubKeymapAction. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Execute the subKeymap action and reset the keymap to the master
keymap that was valid before the subKeymap was put in place. |
javax.swing.Action |
getAction()
|
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 |
action
protected javax.swing.Action action
- The Action object bound wrapped by this instance.
masterKeymap
protected javax.swing.text.Keymap masterKeymap
- The Keymap to restore after this instance is invoked.
markProcessedKeyPressed
protected boolean markProcessedKeyPressed
- This is true if we should set the processedKeyPressed flag in the editor
after restoring the original keymap.
EditorAction.SubKeymapAction
public EditorAction.SubKeymapAction(javax.swing.Action action,
javax.swing.text.Keymap masterMap,
javax.swing.KeyStroke keyStroke)
- Create a new SubKeymapAction.
- Parameters:
action
- The Action object to wrap.masterMap
- The Keymap to restore after actionPerfomed is called
on the wrapped action.keyStroke
- The KeyStroke used to invoke the Action specified.
getAction
public javax.swing.Action getAction()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Execute the subKeymap action and reset the keymap to the master
keymap that was valid before the subKeymap was put in place.
- Overrides:
actionPerformed
in class javax.swing.AbstractAction
- Parameters:
e
- the ActionEvent that triggered the action.