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 Controllers
get()
Singleton method to get static instance.Controller
getController(String type)
Returns the controller by name as string.Controller
getController(ControllerType type)
Returns the controller by name asControllerType
.ControllerType
getTypeByString(String type)
Returns the controller type by name as string.Set<String>
getTypeNames()
Gets all global registered controllers types.boolean
isRegistered(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:
true
if 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
null
if 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
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.
-
-