Package org.pepstock.charba.client.zoom
Class ZoomContext
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.callbacks.ChartContext
-
- org.pepstock.charba.client.zoom.ZoomContext
-
public final class ZoomContext extends ChartContext
The callback or handler context, created and passed byZoomPlugin.ID
which contains the link to the native chart and the event.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkIfPropertyIsValid(Key property)
Checks if the key passed as argument is a key already used for other context properties.AbstractConfigurationItem
getElement()
Returns theZoomPlugin
configuration element.EventPoint
getPoint()
Returns the position of the event when pan or zoom are about to start.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
getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getChart, getType, hasAttributes, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getElement
public AbstractConfigurationItem getElement()
Returns theZoomPlugin
configuration element.- Returns:
- the
ZoomPlugin
configuration element
-
getPoint
public EventPoint getPoint()
Returns the position of the event when pan or zoom are about to start.- Returns:
- the position of the event when pan or zoom are about to start
-
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
-
checkIfPropertyIsValid
protected boolean checkIfPropertyIsValid(Key property)
Description copied from class:ChartContext
Checks if the key passed as argument is a key already used for other context properties.- Overrides:
checkIfPropertyIsValid
in classChartContext
- Parameters:
property
- property to use to store a custom attribute- Returns:
true
if the property can be used to store an attribute.
-
-