Class AnnotationContext
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.callbacks.ChartContext
-
- org.pepstock.charba.client.annotation.AnnotationContext
-
public final class AnnotationContext extends ChartContext
The callback or handler context wrapper, created and passed byAnnotationPlugin.ID
which contains the link to the native chart.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractAnnotation
getAnnotation()
Returns the annotation of plugin.AnnotationElement
getElement()
Returns the annotation element of plugin.Map<String,Object>
getShared()
Returns a map with shared instances in the plugin instance.
This object instance is cross all annotations for the same chart instance.protected boolean
isConsistent()
Returnstrue
if the context is consistent.
Custom context (the plugin ones) should extend it and check if the context is consistent before invoking the callback.-
Methods inherited from class org.pepstock.charba.client.callbacks.ChartContext
checkIfPropertyIsValid, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getChart, getType, hasAttributes, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getAnnotation
public AbstractAnnotation getAnnotation()
Returns the annotation of plugin.- Returns:
- the annotation of plugin
-
getElement
public AnnotationElement getElement()
Returns the annotation element of plugin.- Returns:
- the annotation element of plugin
-
getShared
public Map<String,Object> getShared()
Returns a map with shared instances in the plugin instance.
This object instance is cross all annotations for the same chart instance.- Returns:
- a map with shared instances in the plugin instance
-
isConsistent
protected boolean isConsistent()
Description copied from class:ChartContext
Returnstrue
if the context is consistent.
Custom context (the plugin ones) should extend it and check if the context is consistent before invoking the callback.- Overrides:
isConsistent
in classChartContext
- Returns:
true
if the context is consistent
-
-