Class ControllerType

  • All Implemented Interfaces:
    Key, Type

    public final class ControllerType
    extends Object
    implements Type
    Represent the type of new controller. Must be created for every controller implementation.
    It can be created ONLY extending an existing chart type.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • ControllerType

        public ControllerType​(String type,
                              Type chartType,
                              ControllerProvider provider)
        Creates new chart type based on existing chart type, as extension.
        Scale type is the existing chart one.
        Parameters:
        type - new chart type as string.
        chartType - existing chart type, as extension.
        provider - controller provider instance to use for controller registering
      • ControllerType

        public ControllerType​(String type,
                              Type chartType,
                              ControllerProvider provider,
                              ControllerRegistrationHandler handler)
        Creates new chart type based on existing chart type, as extension.
        Scale type is the existing chart one.
        Parameters:
        type - new chart type as string.
        chartType - existing chart type, as extension.
        provider - controller provider instance to use for controller registering
        handler - controller registration handler instance
      • ControllerType

        public ControllerType​(String type,
                              Type chartType,
                              ControllerProvider provider,
                              boolean cloneDefaults)
        Creates new chart type based on existing chart type, as extension.
        Scale type is the existing chart one.
        Parameters:
        type - new chart type as string.
        chartType - existing chart type, as extension.
        provider - controller provider instance to use for controller registering
        cloneDefaults - if true, clones the default options of base chart type.
      • ControllerType

        public ControllerType​(String type,
                              Type chartType,
                              ControllerProvider provider,
                              ControllerRegistrationHandler handler,
                              boolean cloneDefaults)
        Creates new chart type based on existing chart type, as extension.
        Scale type is the existing chart one.
        Parameters:
        type - new chart type as string.
        chartType - existing chart type, as extension.
        provider - controller provider instance to use for controller registering
        handler - controller registration handler instance
        cloneDefaults - if true, clones the default options of base chart type.
    • Method Detail

      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property
      • scaleType

        public ScaleType scaleType()
        Description copied from interface: Type
        Returns the scale type of the chart.
        Specified by:
        scaleType in interface Type
        Returns:
        the scale type of the chart.
      • getChartType

        public Type getChartType()
        Returns the extended chart type of controller.
        Returns:
        the extended chart type of controller
      • isCloneDefaults

        public boolean isCloneDefaults()
        Returns true if it clones the default options of base chart type.
        Returns:
        true if it clones the default options of base chart type
      • register

        public boolean register()
        Registers the controller if it is not already registered.
        Returns:
        true if registered, otherwise false if the controller is already registered with the controller type of controller instance.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object