A collection of bindings of KeyStrokes to actions. The bindings are basically name-value pairs that potentially resolve in a hierarchy.
A collection of bindings of KeyStrokes to actions. The bindings are basically name-value pairs that potentially resolve in a hierarchy.
(add-action-for-key-stroke this key a)
Adds a binding to the keymap.
key - the key sequence - javax.swing.KeyStroke
a - the action - javax.swing.Action
Adds a binding to the keymap. key - the key sequence - `javax.swing.KeyStroke` a - the action - `javax.swing.Action`
(get-action this 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.
key - the key sequence - javax.swing.KeyStroke
returns: the action associated with the key
sequence if one is defined, otherwise null - javax.swing.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. key - the key sequence - `javax.swing.KeyStroke` returns: the action associated with the key sequence if one is defined, otherwise null - `javax.swing.Action`
(get-bound-actions this)
Fetches all of the actions defined in this keymap.
returns: the list of actions - javax.swing.Action[]
Fetches all of the actions defined in this keymap. returns: the list of actions - `javax.swing.Action[]`
(get-bound-key-strokes this)
Fetches all of the keystrokes in this map that are bound to some action.
returns: the list of keystrokes - javax.swing.KeyStroke[]
Fetches all of the keystrokes in this map that are bound to some action. returns: the list of keystrokes - `javax.swing.KeyStroke[]`
(get-default-action this)
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.
returns: the default action - javax.swing.Action
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. returns: the default action - `javax.swing.Action`
(get-key-strokes-for-action this a)
Fetches the keystrokes that will result in the given action.
a - the action - javax.swing.Action
returns: the list of keystrokes - javax.swing.KeyStroke[]
Fetches the keystrokes that will result in the given action. a - the action - `javax.swing.Action` returns: the list of keystrokes - `javax.swing.KeyStroke[]`
(get-name this)
Fetches the name of the set of key-bindings.
returns: the name - java.lang.String
Fetches the name of the set of key-bindings. returns: the name - `java.lang.String`
(get-resolve-parent this)
Fetches the parent keymap used to resolve key-bindings.
returns: the keymap - javax.swing.text.Keymap
Fetches the parent keymap used to resolve key-bindings. returns: the keymap - `javax.swing.text.Keymap`
(locally-defined? this key)
Determines if the given key sequence is locally defined.
key - the key sequence - javax.swing.KeyStroke
returns: true if the key sequence is locally defined else false - boolean
Determines if the given key sequence is locally defined. key - the key sequence - `javax.swing.KeyStroke` returns: true if the key sequence is locally defined else false - `boolean`
(remove-bindings this)
Removes all bindings from the keymap.
Removes all bindings from the keymap.
(remove-key-stroke-binding this keys)
Removes a binding from the keymap.
keys - the key sequence - javax.swing.KeyStroke
Removes a binding from the keymap. keys - the key sequence - `javax.swing.KeyStroke`
(set-default-action this a)
Set the default action to fire if a key is typed.
a - the action - javax.swing.Action
Set the default action to fire if a key is typed. a - the action - `javax.swing.Action`
(set-resolve-parent this parent)
Sets the parent keymap, which will be used to resolve key-bindings. The behavior is unspecified if a Keymap has itself as one of its resolve parents.
parent - the parent keymap - javax.swing.text.Keymap
Sets the parent keymap, which will be used to resolve key-bindings. The behavior is unspecified if a Keymap has itself as one of its resolve parents. parent - the parent keymap - `javax.swing.text.Keymap`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close