Package org.pepstock.charba.client
Interface Controller
- 
- All Known Implementing Classes:
- AbstractController
 
 public interface ControllerThis interface enables the capability to create a custom chart.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static voidcheckIfValid(Controller controller)Checks if key passed as argument is notnulland its type is valid as well.ControllerTypegetType()Controller must define a unique id in order to be configurable.
 Returns the controller id.static booleanisConsistent(Controller controller, ControllerContext context, IsChart chart)Returnstrueif all arguments are consistent.static booleanisValid(Controller controller)Returnstrueif the controller is consistent.default booleanmustBeRegistered()Returnsfalseif the controller does not have to be registered because is a OUT-OF-THE-BOX controller (in javascript) and does not have to be transformed.default voidonAfterDraw(ControllerContext context, IsChart chart)Called after it draws the representation of the data set.default voidonAfterInitialize(ControllerContext context, IsChart chart)Called after it initializes the controller.default voidonAfterLinkScales(ControllerContext context, IsChart chart)Called after it ensures that the data set represented by this controller is linked to a scale.default voidonAfterParse(ControllerContext context, IsChart chart, int start, int count)Called after it invokes to parse the data into the controller meta data.default voidonAfterUpdate(ControllerContext context, IsChart chart, TransitionMode mode)Called after it updates the elements in response to new data.default voidonBeforeDraw(ControllerContext context, IsChart chart)Called before it draws the representation of the data set.default voidonBeforeInitialize(ControllerContext context, IsChart chart)Called before it initializes the controller.default voidonBeforeLinkScales(ControllerContext context, IsChart chart)Called before it ensures that the data set represented by this controller is linked to a scale.default voidonBeforeParse(ControllerContext context, IsChart chart, int start, int count)Called before it invokes to parse the data into the controller meta data.default voidonBeforeUpdate(ControllerContext context, IsChart chart, TransitionMode mode)Called before it updates the elements in response to new data.
 
- 
- 
- 
Method Detail- 
isConsistentstatic boolean isConsistent(Controller controller, ControllerContext context, IsChart chart) Returnstrueif all arguments are consistent.- Parameters:
- controller- controller instance to check
- context- controller context instance, should be provided by CHART.JS.
- chart- chart instance
- Returns:
- trueif all arguments are consistent
 
 - 
checkIfValidstatic void checkIfValid(Controller controller) Checks if key passed as argument is notnulland its type is valid as well. If not, throw aIllegalArgumentException.- Parameters:
- controller- controller instance to check
 
 - 
isValidstatic boolean isValid(Controller controller) Returnstrueif the controller is consistent.- Parameters:
- controller- controller instance to check
- Returns:
- trueif the controller is consistent
 
 - 
getTypeControllerType getType() Controller must define a unique id in order to be configurable.
 Returns the controller id.- Returns:
- the controller id.
 
 - 
mustBeRegistereddefault boolean mustBeRegistered() Returnsfalseif the controller does not have to be registered because is a OUT-OF-THE-BOX controller (in javascript) and does not have to be transformed.- Returns:
- falseif the controller does not have to be registered because is a OUT-OF-THE-BOX controller (in javascript) and does not have to be transformed
 
 - 
onBeforeInitializedefault void onBeforeInitialize(ControllerContext context, IsChart chart) Called before it initializes the controller.- Parameters:
- context- context of controller
- chart- chart instance
 
 - 
onAfterInitializedefault void onAfterInitialize(ControllerContext context, IsChart chart) Called after it initializes the controller.- Parameters:
- context- context of controller
- chart- chart instance
 
 - 
onBeforeParsedefault void onBeforeParse(ControllerContext context, IsChart chart, int start, int count) Called before it invokes to parse the data into the controller meta data.- Parameters:
- context- context of controller
- chart- chart instance
- start- start index of metadata
- count- count of metadata
 
 - 
onAfterParsedefault void onAfterParse(ControllerContext context, IsChart chart, int start, int count) Called after it invokes to parse the data into the controller meta data.- Parameters:
- context- context of controller
- chart- chart instance
- start- start index of metadata
- count- count of metadata
 
 - 
onBeforeDrawdefault void onBeforeDraw(ControllerContext context, IsChart chart) Called before it draws the representation of the data set.- Parameters:
- context- context of controller
- chart- chart instance
 
 - 
onAfterDrawdefault void onAfterDraw(ControllerContext context, IsChart chart) Called after it draws the representation of the data set.- Parameters:
- context- context of controller
- chart- chart instance
 
 - 
onBeforeUpdatedefault void onBeforeUpdate(ControllerContext context, IsChart chart, TransitionMode mode) Called before it updates the elements in response to new data.- Parameters:
- context- context of controller
- chart- chart instance
- mode- update mode
 
 - 
onAfterUpdatedefault void onAfterUpdate(ControllerContext context, IsChart chart, TransitionMode mode) Called after it updates the elements in response to new data.- Parameters:
- context- context of controller
- chart- chart instance
- mode- update mode
 
 - 
onBeforeLinkScalesdefault void onBeforeLinkScales(ControllerContext context, IsChart chart) Called before it ensures that the data set represented by this controller is linked to a scale.- Parameters:
- context- context of controller
- chart- chart instance
 
 - 
onAfterLinkScalesdefault void onAfterLinkScales(ControllerContext context, IsChart chart) Called after it ensures that the data set represented by this controller is linked to a scale.- Parameters:
- context- context of controller
- chart- chart instance
 
 
- 
 
-