Class Controllers


  • public final class Controllers
    extends Object
    Global configuration to set controllers at global level.
    It maps the CHART.JS object of controller, chart.controllers.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • get

        public static Controllers get()
        Singleton method to get static instance.
        Returns:
        controller instance
      • isRegistered

        public boolean isRegistered​(String type)
        Checks if the controller is registered by its type.
        Parameters:
        type - type of new chart as string.
        Returns:
        true if registered, otherwise false.
      • getTypeNames

        public Set<String> getTypeNames()
        Gets all global registered controllers types.
        Returns:
        all global registered controllers types.
      • getTypeByString

        public ControllerType getTypeByString​(String type)
        Returns the controller type by name as string.
        Parameters:
        type - controller type as string.
        Returns:
        the controller type if exists or null if does not exist.
      • getController

        public Controller getController​(String type)
        Returns the controller by name as string.
        Parameters:
        type - controller as string.
        Returns:
        the controller if exists or null if does not exist.