com.borland.primetime.editor
Class DefaultKeymap
java.lang.Object
|
+--com.borland.primetime.editor.DefaultKeymap
- Direct Known Subclasses:
- ModalKeymap, TrackingKeymap
- public class DefaultKeymap
- extends java.lang.Object
- implements javax.swing.text.Keymap
This is simply an implementation of the Keymap interface. It comes directly
from JTextComponent.DefaultKeymap, which the Swing team neglected to make
public. Sigh.
- See Also:
javax.swing.text.JTextComponent.DefaultKeymap
Field Summary |
protected java.util.Hashtable |
bindings
|
protected javax.swing.Action |
defaultAction
|
protected java.lang.String |
nm
|
protected javax.swing.text.Keymap |
parent
|
Constructor Summary |
DefaultKeymap(java.lang.String nm,
javax.swing.text.Keymap parent)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
nm
protected java.lang.String nm
parent
protected javax.swing.text.Keymap parent
bindings
protected java.util.Hashtable bindings
defaultAction
protected javax.swing.Action defaultAction
DefaultKeymap
public DefaultKeymap(java.lang.String nm,
javax.swing.text.Keymap parent)
getDefaultAction
public javax.swing.Action getDefaultAction()
- Fetch the default action to fire if a
key is typed (ie a KEY_TYPED KeyEvent is received)
and there is no binding for it. Typically this
would be some action that inserts text so that
the keymap doesn't require an action for each
possible key.
- Specified by:
- getDefaultAction in interface javax.swing.text.Keymap
setDefaultAction
public void setDefaultAction(javax.swing.Action a)
- Set the default action to fire if a key is typed.
- Specified by:
- setDefaultAction in interface javax.swing.text.Keymap
getName
public java.lang.String getName()
- Specified by:
- getName in interface javax.swing.text.Keymap
getAction
public javax.swing.Action getAction(javax.swing.KeyStroke key)
- Specified by:
- getAction in interface javax.swing.text.Keymap
getBoundKeyStrokes
public javax.swing.KeyStroke[] getBoundKeyStrokes()
- Specified by:
- getBoundKeyStrokes in interface javax.swing.text.Keymap
getBoundActions
public javax.swing.Action[] getBoundActions()
- Specified by:
- getBoundActions in interface javax.swing.text.Keymap
getKeyStrokesForAction
public javax.swing.KeyStroke[] getKeyStrokesForAction(javax.swing.Action a)
- Specified by:
- getKeyStrokesForAction in interface javax.swing.text.Keymap
isLocallyDefined
public boolean isLocallyDefined(javax.swing.KeyStroke key)
- Specified by:
- isLocallyDefined in interface javax.swing.text.Keymap
addActionForKeyStroke
public void addActionForKeyStroke(javax.swing.KeyStroke key,
javax.swing.Action a)
- Specified by:
- addActionForKeyStroke in interface javax.swing.text.Keymap
removeKeyStrokeBinding
public void removeKeyStrokeBinding(javax.swing.KeyStroke key)
- Specified by:
- removeKeyStrokeBinding in interface javax.swing.text.Keymap
removeBindings
public void removeBindings()
- Specified by:
- removeBindings in interface javax.swing.text.Keymap
getResolveParent
public javax.swing.text.Keymap getResolveParent()
- Specified by:
- getResolveParent in interface javax.swing.text.Keymap
setResolveParent
public void setResolveParent(javax.swing.text.Keymap parent)
- Specified by:
- setResolveParent in interface javax.swing.text.Keymap
toString
public java.lang.String toString()
- String representation of the keymap... potentially
a very long string.
- Overrides:
- toString in class java.lang.Object