Class ChartEventContext
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.events.ChartEventContext
-
public final class ChartEventContext extends NativeObjectContainer
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(Chart chart)
Creates the object with the chart instance, creating a change native event.ChartEventContext(Chart chart, BaseNativeEvent event)
Creates the object with the chart instance, creating a change native event.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(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.BaseNativeEvent
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
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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
ChartEventContext
public ChartEventContext(Chart chart)
Creates the object with the chart instance, creating a change native event.- Parameters:
chart
- chart instance.
-
ChartEventContext
public ChartEventContext(Chart chart, BaseNativeEvent 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 BaseNativeEvent getNativeEvent()
Returns the CHARBA chart instance.- Returns:
- the CHARBA chart instance
-
getX
public double getX()
Returns the X location of event in pixel.- Returns:
- the X location of event in pixel.
-
getY
public double getY()
Returns the Y location of event in pixel.- 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.
-
-