A collection of bindings of KeyStrokes to actions. The bindings are basically name-value pairs that potentially resolve in a hierarchy.
@author
Timothy Prinzing
@version
1.18 12/19/03
Adds a binding to the keymap.
Parameters
keythe key sequence
athe action
Fetches 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.
Parameters
keythe key sequence
Return
the action associated with the key sequence if one is defined, otherwise null
Fetches all of the actions defined in this keymap.
Return
the list of actions
Fetches all of the keystrokes in this map that are bound to some action.
Return
the list of keystrokes
Fetches the default action to fire if a key is typed (i.e. 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.
Return
the default action
Fetches the keystrokes that will result in the given action.
Parameters
athe action
Return
the list of keystrokes
Fetches the name of the set of key-bindings.
Return
the name
Fetches the parent keymap used to resolve key-bindings.
Return
the keymap
Determines if the given key sequence is locally defined.
Parameters
keythe key sequence
Return
true if the key sequence is locally defined else false
Removes all bindings from the keymap.
Removes a binding from the keymap.
Parameters
keysthe key sequence
Set the default action to fire if a key is typed.
Parameters
athe action
Sets the parent keymap, which will be used to resolve key-bindings.
Parameters
parentthe parent keymap