Class AbstractFxController

  • All Implemented Interfaces:
    FxController, org.tentackle.validate.ScopeConfigurator

    public abstract class AbstractFxController
    extends java.lang.Object
    implements FxController, org.tentackle.validate.ScopeConfigurator
    Base class for tentackle fx controllers.
    Author:
    harald
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure()
      Configures the controller as the final step in initialization.
      protected FxComponentBinder createBinder()
      Creates a binder for this form.
      The default implementation invokes FormBindingFactory.createFormComponentBinder(this).
      FxComponentBinder getBinder()
      Gets the binder of this controller.
      FxContainer getContainer()
      Gets the top-level container.
      This is usually the view.
      java.lang.Class<? extends org.tentackle.validate.ValidationScope>[] getDefaultScopes()
      java.util.List<java.lang.reflect.Field> getFXMLFields()
      Gets all fields in this controller annotated with @FXML.
      The fields are made accessible, if private.
      java.util.List<java.lang.reflect.Method> getFXMLMethods()
      Gets all methods in this controller annotated with @FXML.
      The methods are made accessible, if private.
      javafx.stage.Stage getStage()
      Gets the stage of which the controller's view is the root of the scene.
      javafx.scene.Parent getView()
      Gets the view managed by this controller.
      void setView​(javafx.scene.Parent view)
      Sets the view managed by this controller.
      void validateInjections()
      Validate @FXML-annotated fields.
      The fxml-loader does not throw an exception if an fx:id does not correspond to a field annotated with @FXML.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractFxController

        public AbstractFxController()
    • Method Detail

      • getView

        public javafx.scene.Parent getView()
        Description copied from interface: FxController
        Gets the view managed by this controller.
        Specified by:
        getView in interface FxController
        Returns:
        the view
      • setView

        public void setView​(javafx.scene.Parent view)
        Description copied from interface: FxController
        Sets the view managed by this controller.
        Specified by:
        setView in interface FxController
        Parameters:
        view - the view
      • getStage

        public javafx.stage.Stage getStage()
        Description copied from interface: FxController
        Gets the stage of which the controller's view is the root of the scene.
        Specified by:
        getStage in interface FxController
        Returns:
        the stage, null if not a root scene
      • getContainer

        public FxContainer getContainer()
        Description copied from interface: FxController
        Gets the top-level container.
        This is usually the view.
        Specified by:
        getContainer in interface FxController
        Returns:
        the container, null if none
      • getFXMLFields

        public java.util.List<java.lang.reflect.Field> getFXMLFields()
        Description copied from interface: FxController
        Gets all fields in this controller annotated with @FXML.
        The fields are made accessible, if private.
        Specified by:
        getFXMLFields in interface FxController
        Returns:
        the fields
      • getFXMLMethods

        public java.util.List<java.lang.reflect.Method> getFXMLMethods()
        Description copied from interface: FxController
        Gets all methods in this controller annotated with @FXML.
        The methods are made accessible, if private.
        Specified by:
        getFXMLMethods in interface FxController
        Returns:
        the methods
      • validateInjections

        public void validateInjections()
        Description copied from interface: FxController
        Validate @FXML-annotated fields.
        The fxml-loader does not throw an exception if an fx:id does not correspond to a field annotated with @FXML. This methods verifies that all such fields provide a non-null value.
        Specified by:
        validateInjections in interface FxController
      • getDefaultScopes

        public java.lang.Class<? extends org.tentackle.validate.ValidationScope>[] getDefaultScopes()

        For bindables defined within this controller, the default scopes are:
        MandatoryScope and ChangeableScope.

        Specified by:
        getDefaultScopes in interface org.tentackle.validate.ScopeConfigurator
      • createBinder

        protected FxComponentBinder createBinder()
        Creates a binder for this form.
        The default implementation invokes FormBindingFactory.createFormComponentBinder(this).
        Returns:
        the binder
      • configure

        public void configure()
        Description copied from interface: FxController
        Configures the controller as the final step in initialization.
        Specified by:
        configure in interface FxController