Class ChartEventContext
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.events.ChartEventContext
-
- All Implemented Interfaces:
IsPoint
,HasNativeEvent
public final class ChartEventContext extends NativeObjectContainer implements IsPoint, HasNativeEvent
This is the class which can wrap a CHART.JS event.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description ChartEventContext(AnnotationEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.ChartEventContext(ConfigurationEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.ChartEventContext(DataLabelsEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.ChartEventContext(IsChart chart, Chart nativeChart)
Creates the object with the chart instance, creating a change native event.ChartEventContext(IsChart chart, NativeAbstractMouseEvent event)
Creates the object with the chart instance, creating a change native event.ChartEventContext(ItemsEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsChart
getChart()
Returns the CHARBA chart instance.Chart
getNativeChart()
Returns the CHARBA chart instance.NativeBaseEvent
getNativeEvent()
Returns the CHARBA chart instance.NativeObject
getObject()
Wraps the protected method to get the java script object in order to consume it.String
getType()
Returns the type of the event.double
getX()
Returns the X location of event in pixel.double
getY()
Returns the Y location of event in pixel.-
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.commons.IsPoint
isConsistent
-
-
-
-
Constructor Detail
-
ChartEventContext
public ChartEventContext(IsChart chart, Chart nativeChart)
Creates the object with the chart instance, creating a change native event.- Parameters:
chart
- chart instance.nativeChart
- native chart instance.
-
ChartEventContext
public ChartEventContext(IsChart chart, NativeAbstractMouseEvent event)
Creates the object with the chart instance, creating a change native event.- Parameters:
chart
- chart instance to store in the objectevent
- native event instance to store in the object
-
ChartEventContext
public ChartEventContext(ConfigurationEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.- Parameters:
envelop
- envelop with the native object instance to be wrapped.
-
ChartEventContext
public ChartEventContext(ItemsEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.- Parameters:
envelop
- envelop with the native object instance to be wrapped.
-
ChartEventContext
public ChartEventContext(AnnotationEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.- Parameters:
envelop
- envelop with the native object instance to be wrapped.
-
ChartEventContext
public ChartEventContext(DataLabelsEnvelop<NativeObject> envelop)
Creates the object with envelop envelop with the native object instance to be wrapped.- Parameters:
envelop
- envelop with the native object instance to be wrapped.
-
-
Method Detail
-
getNativeChart
public Chart getNativeChart()
Returns the CHARBA chart instance.- Returns:
- the CHARBA chart instance
-
getChart
public IsChart getChart()
Returns the CHARBA chart instance.- Returns:
- the CHARBA chart instance
-
getNativeEvent
public NativeBaseEvent getNativeEvent()
Returns the CHARBA chart instance.- Specified by:
getNativeEvent
in interfaceHasNativeEvent
- Returns:
- the CHARBA chart instance
-
getX
public double getX()
Returns the X location of event in pixel.
-
getY
public double getY()
Returns the Y location of event in pixel.
-
getType
public String getType()
Returns the type of the event.- Returns:
- the type of the event
-
getObject
public NativeObject getObject()
Wraps the protected method to get the java script object in order to consume it.- Returns:
- the java script object in order to consume it.
-
-