This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing
class ComponentInputMap

java.lang.Object extended by javax.swing.InputMap extended by javax.swing.ComponentInputMap
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComponentInputMapUIResource

public class ComponentInputMap
extends InputMap

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 Summary

          Creates a ComponentInputMap associated with the specified component.
 
Method Summary
 void

          Removes all the mappings from this object.
 JComponent

          Returns the component the InputMap was created for.
 void
put(KeyStroke keyStroke, Object actionMapKey)

          Adds a binding for keyStroke to actionMapKey.
 void

          Removes the binding for key from this object.
 void

          Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.
 
Methods inherited from class javax.swing.InputMap
allKeys, clear, get, getParent, keys, put, remove, setParent, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentInputMap

public ComponentInputMap(JComponent component)
Creates a ComponentInputMap associated with the specified component.

Parameters:
component - a non-null JComponent
Method Detail

clear

public void clear()
Removes all the mappings from this object.

Overrides:
clear in class InputMap

getComponent

public JComponent getComponent()
Returns the component the InputMap was created for.


put

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.

Overrides:
put in class InputMap
Parameters:
keyStroke
actionMapKey

remove

public void remove(KeyStroke key)
Removes the binding for key from this object.

Overrides:
remove in class InputMap
Parameters:
key

setParent

public void setParent(InputMap map)
Sets the parent, which must be a ComponentInputMap associated with the same component as this ComponentInputMap.

Overrides:
setParent in class InputMap
Parameters:
map - a ComponentInputMap


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.