Annotation Type Action
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface ActionMarks a method that will be used to define a SwingActionobject'sactionPerformedmethod. It also identifies the resources that will be used to initialize the Action's properties. Additional@Actionparameters 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 backgroundTaskis running.The
ApplicationActionMapclass creates anActionMapthat contains oneApplicationActionfor each @Action found in a target or "actions" class. Typically applications will usegetActionMapto lazily construct and cache ApplicationActionMaps, rather than constructing them directly. By default the ApplicationActionMap'skeyfor an @Action is the name of the method. Thenameparameter can be used to specify a different key.The
ApplicationAction'sproperties 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 theApplicationAction'sconstructor.The method marked with @Action, can have no parameters, or a single ActionEvent parameter. The method's return type can be
voidorTask. If the return type is Task, the Task will be executed by the ApplicationAction'sactionPerformedmethod.- Author:
- Hans Muller (Hans.Muller@Sun.COM)
- See Also:
ApplicationAction,ApplicationActionMap,ApplicationContext
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Task.BlockingScopeblockThe parameter indicates that the GUI should be blocked while the background task is running.java.lang.StringdisabledPropertyThe parameter binds the disabled state of the @Action to the current value of a property.java.lang.StringenabledPropertyThe parameter binds the enabled state of the @Action to the current value of a property.java.lang.StringnameThe action name.java.lang.StringselectedPropertyThe parameter binds the selected state of the @Action to the current value of a property.java.lang.StringtaskServiceThe parameter associates this action to a specific task service
-
-
-
-
block
Task.BlockingScope block
The parameter indicates that the GUI should be blocked while the background task is running.- See Also:
Task
- Default:
- org.jdesktop.application.Task.BlockingScope.NONE
-
-