- java.lang.Object
-
- org.controlsfx.control.action.DefaultActionFactory
-
- All Implemented Interfaces:
AnnotatedActionFactory
public class DefaultActionFactory extends Object implements AnnotatedActionFactory
The defaultAnnotatedActionFactoryto 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 voidconfigureAction(ActionProxy annotation, AnnotatedAction action)Configures the newly-created action before it is returned toActionMap.AnnotatedActioncreateAction(ActionProxy annotation, Method method, Object target)Create anAnnotatedAction.protected NoderesolveGraphic(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:
createActionin 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
AnnotatedActioninstance.
-
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.
-
-