Class DefaultActionFactory

java.lang.Object
org.controlsfx.control.action.DefaultActionFactory
All Implemented Interfaces:
AnnotatedActionFactory

public class DefaultActionFactory extends Object implements AnnotatedActionFactory
The default AnnotatedActionFactory to be used when no alternative has been specified. This class creates instances of AnnotatedAction.
  • Constructor Details

    • DefaultActionFactory

      public DefaultActionFactory()
  • Method Details

    • createAction

      public AnnotatedAction createAction(ActionProxy annotation, Method method, Object target)
      Create an AnnotatedAction. This method is called by ActionMap.register(java.lang.Object).
      Specified by:
      createAction in interface AnnotatedActionFactory
      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 to ActionMap. Subclasses can override this method to change configuration behavior.
      Parameters:
      annotation - The annotation specified on the method.
      action - The newly-created action.
    • resolveGraphic

      protected javafx.scene.Node resolveGraphic(ActionProxy annotation)
      Resolve the graphical representation of this action. The default implementation of this method implements the protocol described in ActionProxy.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.