|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.InputMap
javax.swing.ComponentInputMap
public class ComponentInputMap
An InputMap
that is associated with a particular JComponent
.
The component is notified when its ComponentInputMap
changes.
Constructor Summary | |
---|---|
ComponentInputMap(JComponent comp)
Creates ComponentInputMap object that notifies the given
component about changes to it. |
Method Summary | |
---|---|
void |
clear()
Clears the InputMap . |
JComponent |
getComponent()
Returns the component to notify about changes. |
void |
put(KeyStroke keystroke,
Object value)
Puts a new entry into the InputMap . |
void |
remove(KeyStroke keystroke)
Remove an entry from the InputMap . |
void |
setParent(InputMap parentMap)
Sets a parent for this ComponentInputMap . |
Methods inherited from class javax.swing.InputMap |
---|
allKeys, get, getParent, keys, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentInputMap(JComponent comp)
ComponentInputMap
object that notifies the given
component about changes to it.
comp
- the component to notify
IllegalArgumentException
- if comp is nullMethod Detail |
---|
public void put(KeyStroke keystroke, Object value)
InputMap
.
If actionMapKey is null an existing entry will be removed.
put
in class InputMap
keystroke
- the keystroke for the entryvalue
- the action.public void clear()
InputMap
.
clear
in class InputMap
public void remove(KeyStroke keystroke)
InputMap
.
remove
in class InputMap
keystroke
- the key of the entry to removepublic void setParent(InputMap parentMap)
ComponentInputMap
.
setParent
in class InputMap
parentMap
- the new parent
IllegalArgumentException
- if parentMap is not a
ComponentInputMap
or not associated with the same componentInputMap.getParent()
public JComponent getComponent()
JComponent
object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |