Liking cljdoc? Tell your friends :D

javax.swing.InputMap

InputMap provides a binding between an input event (currently only KeyStrokes are used) and an Object. InputMaps are usually used with an ActionMap, to determine an Action to perform when a key is pressed. An InputMap can have a parent that is searched for bindings not defined in the InputMap. As with ActionMap if you create a cycle, eg:

InputMap am = new InputMap(); InputMap bm = new InputMap(): am.setParent(bm); bm.setParent(am); some of the methods will cause a StackOverflowError to be thrown.

InputMap provides a binding between an input event
(currently only KeyStrokes are used)
and an Object. InputMaps
are usually used with an ActionMap,
to determine an Action to perform
when a key is pressed.
An InputMap can have a parent
that is searched for bindings not defined in the InputMap.
As with ActionMap if you create a cycle, eg:


  InputMap am = new InputMap();
  InputMap bm = new InputMap():
  am.setParent(bm);
  bm.setParent(am);
some of the methods will cause a StackOverflowError to be thrown.
raw docstring

->input-mapclj

(->input-map)

Constructor.

Creates an InputMap with no parent and no mappings.

Constructor.

Creates an InputMap with no parent and no mappings.
raw docstring

all-keysclj

(all-keys this)

Returns an array of the KeyStrokes defined in this InputMap and its parent. This differs from keys() in that this method includes the keys defined in the parent.

returns: javax.swing.KeyStroke[]

Returns an array of the KeyStrokes defined in this
 InputMap and its parent. This differs from keys() in that
 this method includes the keys defined in the parent.

returns: `javax.swing.KeyStroke[]`
raw docstring

clearclj

(clear this)

Removes all the mappings from this InputMap.

Removes all the mappings from this InputMap.
raw docstring

getclj

(get this key-stroke)

Returns the binding for keyStroke, messaging the parent InputMap if the binding is not locally defined.

key-stroke - javax.swing.KeyStroke

returns: java.lang.Object

Returns the binding for keyStroke, messaging the
 parent InputMap if the binding is not locally defined.

key-stroke - `javax.swing.KeyStroke`

returns: `java.lang.Object`
raw docstring

get-parentclj

(get-parent this)

Gets this InputMap's parent.

returns: map the InputMap that is the parent of this one, or null if this InputMap has no parent - javax.swing.InputMap

Gets this InputMap's parent.

returns: map  the InputMap that is the parent of this one,
              or null if this InputMap has no parent - `javax.swing.InputMap`
raw docstring

keysclj

(keys this)

Returns the KeyStrokes that are bound in this InputMap.

returns: javax.swing.KeyStroke[]

Returns the KeyStrokes that are bound in this InputMap.

returns: `javax.swing.KeyStroke[]`
raw docstring

putclj

(put this key-stroke action-map-key)

Adds a binding for keyStroke to actionMapKey. If actionMapKey is null, this removes the current binding for keyStroke.

key-stroke - javax.swing.KeyStroke action-map-key - java.lang.Object

Adds a binding for keyStroke to actionMapKey.
 If actionMapKey is null, this removes the current binding
 for keyStroke.

key-stroke - `javax.swing.KeyStroke`
action-map-key - `java.lang.Object`
raw docstring

removeclj

(remove this key)

Removes the binding for key from this InputMap.

key - javax.swing.KeyStroke

Removes the binding for key from this
 InputMap.

key - `javax.swing.KeyStroke`
raw docstring

set-parentclj

(set-parent this map)

Sets this InputMap's parent.

map - the InputMap that is the parent of this one - javax.swing.InputMap

Sets this InputMap's parent.

map - the InputMap that is the parent of this one - `javax.swing.InputMap`
raw docstring

sizeclj

(size this)

Returns the number of KeyStroke bindings.

returns: int

Returns the number of KeyStroke bindings.

returns: `int`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close