public static class ActionMapper.ActionMap extends java.util.LinkedHashMap<java.lang.String,ActionMapper.Action>
ActionMapper.Action
sModifier and Type | Field and Description |
---|---|
boolean |
enabled
enable for this map
|
java.lang.String |
name
name for this map
|
boolean |
warnDuplicate
Whether to issue a warning to stderr if an action is replaced.
|
Constructor and Description |
---|
ActionMapper.ActionMap(java.lang.String name)
make a new map with the given name
|
Modifier and Type | Method and Description |
---|---|
int |
add(ActionMapper.Action action,
java.lang.String... spec)
Convenience to add/replace the mapping(s) from spec(s) to
action.
|
int |
addSimpleAction(java.lang.String description,
java.lang.Runnable task,
java.lang.String... spec)
add(vona.ui.ActionMapper.Action, java.lang.String...) a new ActionMapper.Action consed up to run task. |
void |
dump()
dump(PrintStream, boolean, boolean) to System.out, skipping
disabled and sorting. |
void |
dump(boolean skipDisabled,
boolean sort)
dump(PrintStream, boolean, boolean) to System.out |
void |
dump(java.io.PrintStream s,
boolean skipDisabled,
boolean sort)
dump map contents
|
int |
remove(ActionMapper.Action action)
Convenience to remove all mappings to an action.
|
int |
remove(java.lang.String... spec)
Convenience to remove a set of mappings.
|
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
public volatile boolean enabled
public volatile boolean warnDuplicate
Whether to issue a warning to stderr if an action is replaced.
This only applies to actions added via add(vona.ui.ActionMapper.Action, java.lang.String...)
.
public final java.lang.String name
public ActionMapper.ActionMap(java.lang.String name)
public int add(ActionMapper.Action action, java.lang.String... spec)
Convenience to add/replace the mapping(s) from spec(s) to action.
public int addSimpleAction(java.lang.String description, java.lang.Runnable task, java.lang.String... spec)
add(vona.ui.ActionMapper.Action, java.lang.String...)
a new ActionMapper.Action
consed up to run task.
This can make for shorter syntax when the action doesn't need any of
the ActionMapper.Action.run(java.lang.String, java.awt.Component, vona.ui.ActionMapper.ComponentState)
parameters and always returns true.
public int remove(ActionMapper.Action action)
Convenience to remove all mappings to an action.
public int remove(java.lang.String... spec)
Convenience to remove a set of mappings.
public void dump(java.io.PrintStream s, boolean skipDisabled, boolean sort)
public void dump(boolean skipDisabled, boolean sort)
dump(PrintStream, boolean, boolean)
to System.outpublic void dump()
dump(PrintStream, boolean, boolean)
to System.out, skipping
disabled and sorting.