public interface Keymap
| Modifier and Type | Method and Description |
|---|---|
void |
addActionForKeyStroke(KeyStroke
Adds a binding to the keymap.
|
Action |
getAction(KeyStroke
Fetches the action appropriate for the given symbolic event sequence.
|
Action |
getBoundActions()
Fetches all of the actions defined in this keymap.
|
KeyStroke |
getBoundKeyStrokes()
Fetches all of the keystrokes in this map that are bound to some action.
|
Action |
getDefaultAction()
Fetches the default action to fire if a key is typed (i.e.
|
KeyStroke |
getKeyStrokesForAction(Action
Fetches the keystrokes that will result in the given action.
|
String |
getName()
Fetches the name of the set of key-bindings.
|
Keymap |
getResolveParent()
Fetches the parent keymap used to resolve key-bindings.
|
boolean |
isLocallyDefined(KeyStroke
Determines if the given key sequence is locally defined.
|
void |
removeBindings()
Removes all bindings from the keymap.
|
void |
removeKeyStrokeBinding(KeyStroke
Removes a binding from the keymap.
|
void |
setDefaultAction(Action
Set the default action to fire if a key is typed.
|
void |
setResolveParent(Keymap
Sets the parent keymap, which will be used to resolve key-bindings.
|
StringgetName()
ActiongetDefaultAction()
void setDefaultAction(Actiona)
a - the action
ActiongetAction(KeyStroke key)
key - the key sequence
null
KeyStroke[] getBoundKeyStrokes()
Action[] getBoundActions()
KeyStroke[] getKeyStrokesForAction(Action a)
a - the action
boolean isLocallyDefined(KeyStrokekey)
key - the key sequence
void addActionForKeyStroke(KeyStrokekey, Action a)
key - the key sequence
a - the action
void removeKeyStrokeBinding(KeyStrokekeys)
keys - the key sequence
void removeBindings()
KeymapgetResolveParent()
void setResolveParent(Keymapparent)
Keymap has itself as one of its resolve parents.
parent - the parent keymap