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.


Method Index

 o addActionForKeyStroke(JKeyStroke, Action)
Add a binding to the keymap
 o getAction(JKeyStroke)
Fetch the action appropriate for the given symbolic event sequence.
 o getBoundActions()
Fetch all of the actions defined in this keymap.
 o getBoundKeyStrokes()
Fetch all of the keystrokes in this map that are bound to some action.
 o getKeyStrokesForAction(Action)
Fetch the keystrokes that will result in the given action.
 o getName()
Fetch the name of the set of key-bindings
 o getResolveParent()
Fetch the parent keymap used to resolve key-bindings.
 o isLocallyDefined(JKeyStroke)
Determine if the given key sequence is locally defined.
 o removeBindings()
Remove all bindings from the keymap
 o removeKeyStrokeBinding(JKeyStroke)
Remove a binding from the keymap
 o setResolveParent(Keymap)
Set the parent keymap, which will be used to resolve key-bindings.

Methods

 o getName
 public abstract String getName()
Fetch the name of the set of key-bindings

 o 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.
 o getBoundKeyStrokes
 public abstract JKeyStroke[] getBoundKeyStrokes()
Fetch all of the keystrokes in this map that are bound to some action.

 o getBoundActions
 public abstract Action[] getBoundActions()
Fetch all of the actions defined in this keymap.

 o getKeyStrokesForAction
 public abstract JKeyStroke[] getKeyStrokesForAction(Action a)
Fetch the keystrokes that will result in the given action.

 o isLocallyDefined
 public abstract boolean isLocallyDefined(JKeyStroke key)
Determine if the given key sequence is locally defined.

 o addActionForKeyStroke
 public abstract void addActionForKeyStroke(JKeyStroke key,
                                            Action a)
Add a binding to the keymap

 o removeKeyStrokeBinding
 public abstract void removeKeyStrokeBinding(JKeyStroke keys)
Remove a binding from the keymap

 o removeBindings
 public abstract void removeBindings()
Remove all bindings from the keymap

 o getResolveParent
 public abstract Keymap getResolveParent()
Fetch the parent keymap used to resolve key-bindings.

 o 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