Module java.desktop
Package javax.swing

Class InputMap

java.lang.Object
javax.swing.InputMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComponentInputMap, InputMapUIResource

public class InputMap extends Object implements Serializable
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.
Since:
1.3