- java.lang.Object
-
- org.controlsfx.control.action.DefaultActionFactory
-
- All Implemented Interfaces:
AnnotatedActionFactory
public class DefaultActionFactory extends Object implements AnnotatedActionFactory
The defaultAnnotatedActionFactory
to be used when no alternative has been specified. This class creates instances ofAnnotatedAction
.
-
-
Constructor Summary
Constructors Constructor Description DefaultActionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureAction(ActionProxy annotation, AnnotatedAction action)
Configures the newly-created action before it is returned toActionMap
.AnnotatedAction
createAction(ActionProxy annotation, Method method, Object target)
Create anAnnotatedAction
.protected Node
resolveGraphic(ActionProxy annotation)
Resolve the graphical representation of this action.
-
-
-
Method Detail
-
createAction
public AnnotatedAction createAction(ActionProxy annotation, Method method, Object target)
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
protected void configureAction(ActionProxy annotation, AnnotatedAction action)
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
protected Node resolveGraphic(ActionProxy annotation)
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.
-
-