java.lang.Object
org.controlsfx.control.action.DefaultActionFactory
- All Implemented Interfaces:
AnnotatedActionFactory
The default
AnnotatedActionFactory
to be used when no alternative has been specified. This class creates
instances of AnnotatedAction
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureAction
(ActionProxy annotation, AnnotatedAction action) Configures the newly-created action before it is returned toActionMap
.createAction
(ActionProxy annotation, Method method, Object target) Create anAnnotatedAction
.protected javafx.scene.Node
resolveGraphic
(ActionProxy annotation) Resolve the graphical representation of this action.
-
Constructor Details
-
DefaultActionFactory
public DefaultActionFactory()
-
-
Method Details
-
createAction
Create anAnnotatedAction
. This method is called byActionMap.register(java.lang.Object)
.- Specified by:
createAction
in interfaceAnnotatedActionFactory
- Parameters:
annotation
- The annotation specified on the method.method
- The method to be invoked when an action is fired.target
- The target object on which the method will be invoked.- Returns:
- An
AnnotatedAction
instance.
-
configureAction
Configures the newly-created action before it is returned toActionMap
. Subclasses can override this method to change configuration behavior.- Parameters:
annotation
- The annotation specified on the method.action
- The newly-created action.
-
resolveGraphic
Resolve the graphical representation of this action. The default implementation of this method implements the protocol described inActionProxy.graphic()
, but subclasses can override this method to provide alternative behavior.- Parameters:
annotation
- The annotation specified on the method.- Returns:
- A JavaFX Node for the graphic associated with this action.
-