public class LazyActionMap extends ActionMapUIResource
loadActionMap
method on the passed in Object.Modifier and Type | Field and Description |
---|---|
private Object |
_loader
Object to invoke
loadActionMap on. |
Modifier | Constructor and Description |
---|---|
private |
LazyActionMap(Class loader) |
Modifier and Type | Method and Description |
---|---|
Object[] |
allKeys() |
void |
clear() |
Action |
get(Object key) |
(package private) static ActionMap |
getActionMap(Class loaderClass,
String defaultsKey)
Returns an ActionMap that will be populated by invoking the
loadActionMap method on the specified Class
when necessary. |
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() |
private void |
loadIfNecessary() |
void |
put(Action action) |
void |
put(Object key,
Action action) |
void |
remove(Object key) |
void |
setParent(ActionMap map) |
int |
size() |
private LazyActionMap(Class loader)
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.static ActionMap getActionMap(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.private void loadIfNecessary()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses