Class Controllers
- java.lang.Object
-
- org.pepstock.charba.client.controllers.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Controllersget()Singleton method to get static instance.ControllergetController(String type)Returns the controller by name as string.ControllergetController(ControllerType type)Returns the controller by name asControllerType.ControllerTypegetTypeByString(String type)Returns the controller type by name as string.Set<String>getTypeNames()Gets all global registered controllers types.booleanisRegistered(String type)Checks if the controller is registered by its type.
-
-
-
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:
trueif registered, otherwisefalse.
-
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
nullif does not exist.
-
getController
public Controller getController(ControllerType type)
Returns the controller by name asControllerType.- Parameters:
type- controller asControllerType.- Returns:
- the controller if exists or
nullif 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
nullif does not exist.
-
-