|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.ActionMap
javax.swing.plaf.ActionMapUIResource
org.jdesktop.swingx.plaf.basic.core.LazyActionMap
public class LazyActionMap
An ActionMap that populates its contents as necessary. The
contents are populated by invoking the loadActionMap
method on the passed in Object.
| Method Summary | |
|---|---|
Object[] |
allKeys()
Returns an array of the keys defined in this ActionMap and
its parent. |
void |
clear()
Removes all the mappings from this ActionMap. |
Action |
get(Object key)
Returns the binding for key, messaging the
parent ActionMap if the binding is not locally defined. |
static void |
installLazyActionMap(JComponent c,
Class loaderClass,
String defaultsKey)
Installs an ActionMap that will be populated by invoking the loadActionMap method on the specified Class
when necessary. |
Object[] |
keys()
Returns the Action names that are bound in this ActionMap. |
void |
put(Action action)
|
void |
put(Object key,
Action action)
Adds a binding for key to action. |
void |
remove(Object key)
Removes the binding for key from this ActionMap. |
void |
setParent(ActionMap map)
Sets this ActionMap's parent. |
int |
size()
Returns the number of KeyStroke bindings. |
| Methods inherited from class javax.swing.ActionMap |
|---|
getParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void installLazyActionMap(JComponent c,
Class loaderClass,
String defaultsKey)
loadActionMap method on the specified Class
when necessary.
This should be used if the ActionMap can be shared.
c - JComponent to install the ActionMap on.loaderClass - Class object that gets loadActionMap invoked
on.defaultsKey - Key to use to defaults table to check for
existing map and what resulting Map will be registered on.public void put(Action action)
public void put(Object key,
Action action)
javax.swing.ActionMapkey to action.
If action is null, this removes the current binding
for key.
In most instances, key will be
action.getValue(NAME).
put in class ActionMappublic Action get(Object key)
javax.swing.ActionMapkey, messaging the
parent ActionMap if the binding is not locally defined.
get in class ActionMappublic void remove(Object key)
javax.swing.ActionMapkey from this ActionMap.
remove in class ActionMappublic void clear()
javax.swing.ActionMapActionMap.
clear in class ActionMappublic Object[] keys()
javax.swing.ActionMapAction names that are bound in this ActionMap.
keys in class ActionMappublic int size()
javax.swing.ActionMapKeyStroke bindings.
size in class ActionMappublic Object[] allKeys()
javax.swing.ActionMapActionMap and
its parent. This method differs from keys() in that
this method includes the keys defined in the parent.
allKeys in class ActionMappublic void setParent(ActionMap map)
javax.swing.ActionMapActionMap's parent.
setParent in class ActionMapmap - the ActionMap that is the parent of this one
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||