public class javax.swing
ComponentInputMap


Show All Login
Java SE 6
  
Extends: InputMap
Extended by: ComponentInputMapUIResource
Details
A ComponentInputMap is an InputMap associated with a particular JComponent. The component is automatically notified whenever the ComponentInputMap changes. ComponentInputMaps are used for WHEN_IN_FOCUSED_WINDOW bindings.
version1.11 04/07/06
since1.3

Constructors
public ComponentInputMap(JComponent component) Details
Creates a ComponentInputMap associated with the specified component.
componenta non-null JComponent
ThrowsIllegalArgumentException: if component is null

Methods
public void clear()
Removes all the mappings from this object.
public void put(KeyStroke keyStroke, Object actionMapKey)
Adds a binding for keyStroke to actionMapKey. If actionMapKey is null, this removes the current binding for keyStroke.
public void remove(KeyStroke key)
Removes the binding for key from this object.

Properties
public JComponent getComponent()
Returns the component the InputMap was created for.
public void setParent(InputMap map) Details
Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
mapa ComponentInputMap
ThrowsIllegalArgumentException: if map is not a ComponentInputMap or is not associated with the same component