Home » openjdk-7 » javax » swing » [javadoc | source]
javax.swing
public class: ComponentInputMap [javadoc | source]
java.lang.Object
   javax.swing.InputMap
      javax.swing.ComponentInputMap

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    ComponentInputMapUIResource, RootPaneInputMap

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.
Constructor:
 public ComponentInputMap(JComponent component) 
    Creates a ComponentInputMap associated with the specified component.
    Parameters:
    component - a non-null JComponent
    Throws:
    IllegalArgumentException - if component is null
Method from javax.swing.ComponentInputMap Summary:
clear,   getComponent,   put,   remove,   setParent
Methods from javax.swing.InputMap:
allKeys,   clear,   get,   getParent,   keys,   put,   remove,   setParent,   size
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.ComponentInputMap Detail:
 public  void clear() 
    Removes all the mappings from this object.
 public JComponent getComponent() 
    Returns the component the InputMap was created for.
 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.
 public  void setParent(InputMap map) 
    Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.