public abstract static class ActionMapper.Action
extends java.lang.Object
An action.
See ActionMapper
class header doc for details.
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<java.lang.String> |
COMPARATOR
gives a canonical ordering for Actions based on their spec
|
boolean |
consuming
Whether the action event that resulted in a call to
run(java.lang.String, java.awt.Component, vona.ui.ActionMapper.ComponentState) that
returned true should be consumed. |
java.lang.String |
description
a short description string
|
java.lang.String |
dumpOnlyForSpec
If set then this Action will only appear in
ActionMapper.ActionMap and
ActionMapper dumps for the given spec, even though other specs
may also map to it. |
boolean |
enabled
enable for this action
|
Constructor and Description |
---|
ActionMapper.Action(java.lang.String description)
construct a new Action with spec and description
|
Modifier and Type | Method and Description |
---|---|
void |
dump(java.lang.String spec)
dump(String, PrintStream) to System.out |
void |
dump(java.lang.String spec,
java.io.PrintStream s)
dump this action
|
abstract boolean |
run(java.lang.String actionSpec,
java.awt.Component component,
ActionMapper.ComponentState componentState)
Execute the action.
|
public volatile boolean enabled
public volatile java.lang.String description
public volatile java.lang.String dumpOnlyForSpec
If set then this Action will only appear in ActionMapper.ActionMap
and
ActionMapper
dumps for the given spec, even though other specs
may also map to it.
public volatile boolean consuming
Whether the action event that resulted in a call to run(java.lang.String, java.awt.Component, vona.ui.ActionMapper.ComponentState)
that
returned true should be consumed.
public static final java.util.Comparator<java.lang.String> COMPARATOR
public ActionMapper.Action(java.lang.String description)
public void dump(java.lang.String spec, java.io.PrintStream s)
public void dump(java.lang.String spec)
dump(String, PrintStream)
to System.outpublic abstract boolean run(java.lang.String actionSpec, java.awt.Component component, ActionMapper.ComponentState componentState)
Execute the action.
This will only be called from the AWT event thread, and only for
enabled
Actions.
component
- the AWT Component
on which the event occurredcomponentState
- the ActionMapper.ComponentState
of component, as
tracked by the containing ActionMapper
actionSpec
- the action spec string that invoked the action, see
ActionMapper
class header doc