Annotation Interface Action
Action
object's actionPerformed
method. It also identifies the resources that
will be used to initialize the Action's properties.
Additional @Action
parameters can be used
to specify the name of the bound properties (from the
same class) that indicate if the Action is to be
enabled/selected, and if the GUI should be blocked
while the Action's background Task
is running.
The ApplicationActionMap
class creates an
ActionMap
that contains one ApplicationAction
for each @Action found in a target or "actions" class.
Typically applications will use getActionMap
to
lazily construct and cache ApplicationActionMaps, rather than
constructing them directly. By default the ApplicationActionMap's
key
for an @Action is the
name of the method. The name
parameter can be used to
specify a different key.
The ApplicationAction's
properties are initialized with
resources loaded from a ResourceBundle with the same name as the
actions class. The list of properties initialized this way
is documented by the ApplicationAction's
constructor.
The method marked with @Action, can have no parameters,
or a single ActionEvent parameter. The method's return type
can be void
or Task
. If the return type
is Task, the Task will be executed by the ApplicationAction's
actionPerformed
method.
- Author:
- Hans Muller (Hans.Muller@Sun.COM)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
This annotation is not used yet -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe parameter indicates that the GUI should be blocked while the background task is running.The parameter binds the disabled state of the @Action to the current value of a property.The parameter binds the enabled state of the @Action to the current value of a property.The action name.The parameter binds the selected state of the @Action to the current value of a property.The parameter associates this action to a specific task service
-
Element Details
-
name
String nameThe action name. The method name is used as an action name if not specified.- Default:
""
-
enabledProperty
String enabledPropertyThe parameter binds the enabled state of the @Action to the current value of a property.- Default:
""
-
disabledProperty
String disabledPropertyThe parameter binds the disabled state of the @Action to the current value of a property.- Default:
""
-
selectedProperty
String selectedPropertyThe parameter binds the selected state of the @Action to the current value of a property.- Default:
""
-
taskService
String taskServiceThe parameter associates this action to a specific task service- Default:
"default"
-
block
Task.BlockingScope blockThe parameter indicates that the GUI should be blocked while the background task is running.- See Also:
- Default:
NONE
-