| |
|
| java.lang.Object javax.swing.InputMap javax.swing.ComponentInputMap
All known Subclasses: javax.swing.plaf.ComponentInputMapUIResource,
ComponentInputMap | public class ComponentInputMap extends InputMap (Code) | | A ComponentInputMap is an InputMap
associated with a particular JComponent .
The component is automatically notified whenever
the ComponentInputMap changes.
ComponentInputMap s are used for
WHEN_IN_FOCUSED_WINDOW bindings.
version: 1.17 05/05/07 author: Scott Violet since: 1.3 |
Constructor Summary | |
public | ComponentInputMap(JComponent component) Creates a ComponentInputMap associated with the
specified component. |
Method Summary | |
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 . | 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 . |
ComponentInputMap | public ComponentInputMap(JComponent component)(Code) | | Creates a ComponentInputMap associated with the
specified component.
Parameters: component - a non-null JComponent throws: IllegalArgumentException - if component is null |
clear | public void clear()(Code) | | Removes all the mappings from this object.
|
getComponent | public JComponent getComponent()(Code) | | Returns the component the InputMap was created for.
|
put | public void put(KeyStroke keyStroke, Object actionMapKey)(Code) | | Adds a binding for keyStroke to actionMapKey .
If actionMapKey is null, this removes the current binding
for keyStroke .
|
remove | public void remove(KeyStroke key)(Code) | | Removes the binding for key from this object.
|
setParent | public void setParent(InputMap map)(Code) | | Sets the parent, which must be a ComponentInputMap
associated with the same component as this
ComponentInputMap .
Parameters: map - a ComponentInputMap throws: IllegalArgumentException - if map is not a ComponentInputMap or is not associated with the same component |
|
|
|