Class ComponentInputMap
java.lang.Object
javax.swing.InputMap
javax.swing.ComponentInputMap
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ComponentInputMapUIResource
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.- Since:
- 1.3
- 
Constructor SummaryConstructorsConstructorDescriptionComponentInputMap(JComponent component) Creates aComponentInputMapassociated with the specified component.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Removes all the mappings from this object.Returns the component theInputMapwas created for.voidAdds a binding forkeyStroketoactionMapKey.voidRemoves the binding forkeyfrom this object.voidSets the parent, which must be aComponentInputMapassociated with the same component as thisComponentInputMap.
- 
Constructor Details- 
ComponentInputMapCreates aComponentInputMapassociated with the specified component.- Parameters:
- component- a non-null- JComponent
- Throws:
- IllegalArgumentException- if- componentis null
 
 
- 
- 
Method Details- 
setParentSets the parent, which must be aComponentInputMapassociated with the same component as thisComponentInputMap.- Overrides:
- setParentin class- InputMap
- Parameters:
- map- a- ComponentInputMap
- Throws:
- IllegalArgumentException- if- mapis not a- ComponentInputMapor is not associated with the same component
 
- 
getComponentReturns the component theInputMapwas created for.- Returns:
- the component the InputMapwas created for.
 
- 
put
- 
remove
- 
clear
 
-