All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.text.Keymap
- public interface Keymap
A collection of bindings of KeyStrokes to actions. The
bindings are basically name-value pairs that potentially
resolve in a hierarchy.
-
addActionForKeyStroke(JKeyStroke, Action)
- Add a binding to the keymap
-
getAction(JKeyStroke)
- Fetch the action appropriate for the given symbolic
event sequence.
-
getBoundActions()
- Fetch all of the actions defined in this keymap.
-
getBoundKeyStrokes()
- Fetch all of the keystrokes in this map that
are bound to some action.
-
getKeyStrokesForAction(Action)
- Fetch the keystrokes that will result in
the given action.
-
getName()
- Fetch the name of the set of key-bindings
-
getResolveParent()
- Fetch the parent keymap used to resolve key-bindings.
-
isLocallyDefined(JKeyStroke)
- Determine if the given key sequence is locally defined.
-
removeBindings()
-
Remove all bindings from the keymap
-
removeKeyStrokeBinding(JKeyStroke)
- Remove a binding from the keymap
-
setResolveParent(Keymap)
- Set the parent keymap, which will be used to
resolve key-bindings.
getName
public abstract String getName()
- Fetch the name of the set of key-bindings
getAction
public abstract Action getAction(JKeyStroke key)
- Fetch the action appropriate for the given symbolic
event sequence. This is used by JTextController to
determine how to interpret key sequences. If the
binding is not resolved locally, an attempt is made
to resolve through the parent keymap, if one is set.
- Returns:
- s The action associated with the key
sequence if one is defined, otherwise null.
getBoundKeyStrokes
public abstract JKeyStroke[] getBoundKeyStrokes()
- Fetch all of the keystrokes in this map that
are bound to some action.
getBoundActions
public abstract Action[] getBoundActions()
- Fetch all of the actions defined in this keymap.
getKeyStrokesForAction
public abstract JKeyStroke[] getKeyStrokesForAction(Action a)
- Fetch the keystrokes that will result in
the given action.
isLocallyDefined
public abstract boolean isLocallyDefined(JKeyStroke key)
- Determine if the given key sequence is locally defined.
addActionForKeyStroke
public abstract void addActionForKeyStroke(JKeyStroke key,
Action a)
- Add a binding to the keymap
removeKeyStrokeBinding
public abstract void removeKeyStrokeBinding(JKeyStroke keys)
- Remove a binding from the keymap
removeBindings
public abstract void removeBindings()
- Remove all bindings from the keymap
getResolveParent
public abstract Keymap getResolveParent()
- Fetch the parent keymap used to resolve key-bindings.
setResolveParent
public abstract void setResolveParent(Keymap parent)
- Set the parent keymap, which will be used to
resolve key-bindings.
All Packages Class Hierarchy This Package Previous Next Index