| Modifier and Type | Method and Description |
|---|---|
| public void | addActionForKeyStroke(KeyStroke
the key sequence key, Action the action a)Adds a binding to the keymap. |
| public Action | |
| public Action[] | |
| public KeyStroke[] | Returns: the list of keystrokesFetches all of the keystrokes in this map that are bound to some action. |
| public Action | Returns: the default actionFetches 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. |
| public KeyStroke[] | Returns: the list of keystrokesthe action a)Fetches the keystrokes that will result in the given action. |
| public String | |
| public Keymap | |
| public boolean | Returns: true if the key sequence is locally defined else falsethe key sequence key)Determines if the given key sequence is locally defined. |
| public void | |
| public void | |
| public void | |
| public void | setResolveParent(Keymap
the parent keymap parent)Sets the parent keymap, which will be used to resolve key-bindings. |
| addActionForKeyStroke | back to summary |
|---|---|
| public void addActionForKeyStroke(KeyStroke key, Action a) Adds a binding to the keymap. | |
| getAction | back to summary |
|---|---|
| public Action getAction(KeyStroke key) 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. | |
| getBoundActions | back to summary |
|---|---|
| public Action[] getBoundActions() Fetches all of the actions defined in this keymap.
| |
| getBoundKeyStrokes | back to summary |
|---|---|
| public KeyStroke[] getBoundKeyStrokes() Fetches all of the keystrokes in this map that are bound to some action.
| |
| getDefaultAction | back to summary |
|---|---|
| public Action getDefaultAction() 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.
| |
| getKeyStrokesForAction | back to summary |
|---|---|
| public KeyStroke[] getKeyStrokesForAction(Action a) Fetches the keystrokes that will result in the given action. | |
| getName | back to summary |
|---|---|
| public String getName() Fetches the name of the set of key-bindings.
| |
| getResolveParent | back to summary |
|---|---|
| public Keymap getResolveParent() Fetches the parent keymap used to resolve key-bindings.
| |
| isLocallyDefined | back to summary |
|---|---|
| public boolean isLocallyDefined(KeyStroke key) Determines if the given key sequence is locally defined.
| |
| removeBindings | back to summary |
|---|---|
| public void removeBindings() Removes all bindings from the keymap. | |
| removeKeyStrokeBinding | back to summary |
|---|---|
| public void removeKeyStrokeBinding(KeyStroke keys) Removes a binding from the keymap.
| |
| setDefaultAction | back to summary |
|---|---|
| public void setDefaultAction(Action a) Set the default action to fire if a key is typed.
| |
| setResolveParent | back to summary |
|---|---|
| public void setResolveParent(Keymap parent) Sets the parent keymap, which will be used to
resolve key-bindings.
The behavior is unspecified if a
| |