Methods Summary |
---|
public void | clear()Removes all the mappings from this object.
int oldSize = size();
super.clear();
if (oldSize > 0 && getComponent() != null) {
getComponent().componentInputMapChanged(this);
}
|
public javax.swing.JComponent | getComponent()Returns the component the InputMap was created for.
return component;
|
public void | put(javax.swing.KeyStroke keyStroke, java.lang.Object actionMapKey)Adds a binding for keyStroke to actionMapKey .
If actionMapKey is null, this removes the current binding
for keyStroke .
super.put(keyStroke, actionMapKey);
if (getComponent() != null) {
getComponent().componentInputMapChanged(this);
}
|
public void | remove(javax.swing.KeyStroke key)Removes the binding for key from this object.
super.remove(key);
if (getComponent() != null) {
getComponent().componentInputMapChanged(this);
}
|
public void | setParent(javax.swing.InputMap map)Sets the parent, which must be a ComponentInputMap
associated with the same component as this
ComponentInputMap .
if (getParent() == map) {
return;
}
if (map != null && (!(map instanceof ComponentInputMap) ||
((ComponentInputMap)map).getComponent() != getComponent())) {
throw new IllegalArgumentException("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
}
super.setParent(map);
getComponent().componentInputMapChanged(this);
|