|
||||||||||
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.ActionMap
key
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 ActionMap
public Action get(Object key)
javax.swing.ActionMap
key
, messaging the
parent ActionMap
if the binding is not locally defined.
get
in class ActionMap
public void remove(Object key)
javax.swing.ActionMap
key
from this ActionMap
.
remove
in class ActionMap
public void clear()
javax.swing.ActionMap
ActionMap
.
clear
in class ActionMap
public Object[] keys()
javax.swing.ActionMap
Action
names that are bound in this ActionMap
.
keys
in class ActionMap
public int size()
javax.swing.ActionMap
KeyStroke
bindings.
size
in class ActionMap
public Object[] allKeys()
javax.swing.ActionMap
ActionMap
and
its parent. This method differs from keys()
in that
this method includes the keys defined in the parent.
allKeys
in class ActionMap
public void setParent(ActionMap map)
javax.swing.ActionMap
ActionMap
's parent.
setParent
in class ActionMap
map
- 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 |