Class DatasetSelectionEvent
- java.lang.Object
-
- org.pepstock.charba.client.events.Event
-
- org.pepstock.charba.client.events.AbstractEvent
-
- org.pepstock.charba.client.events.DatasetSelectionEvent
-
- All Implemented Interfaces:
HasNativeEvent
public final class DatasetSelectionEvent extends AbstractEvent
Event which is fired when the user clicks on the chart and selects a dataset.
This event doesn't suppress the click event on the chart.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description DatasetSelectionEvent(NativeBaseEvent nativeEvent, IsChart chart, DatasetReference item)
Creates the event with dataset reference item related to the click and the chart instanceDatasetSelectionEvent(NativeBaseEvent nativeEvent, DatasetReference item)
Creates the event with dataset reference item related to the click
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispatch(EventHandler handler)
Implemented by subclasses to dispatch event on the handler.IsChart
getChart()
Returns the chart instance, stored in the event as source.DatasetReference
getItem()
Returns the item with dataset metadata related to the click-
Methods inherited from class org.pepstock.charba.client.events.AbstractEvent
getNativeEvent, getType
-
-
-
-
Field Detail
-
TYPE
public static final EventType TYPE
Event type
-
-
Constructor Detail
-
DatasetSelectionEvent
public DatasetSelectionEvent(NativeBaseEvent nativeEvent, DatasetReference item)
Creates the event with dataset reference item related to the click- Parameters:
nativeEvent
- native event of this custom eventitem
- dataset reference item related to the click
-
DatasetSelectionEvent
public DatasetSelectionEvent(NativeBaseEvent nativeEvent, IsChart chart, DatasetReference item)
Creates the event with dataset reference item related to the click and the chart instance- Parameters:
nativeEvent
- native event of this custom eventchart
- chart instanceitem
- dataset reference item related to the click
-
-
Method Detail
-
getItem
public DatasetReference getItem()
Returns the item with dataset metadata related to the click- Returns:
- the item with dataset metadata related to the click
-
getChart
public IsChart getChart()
Description copied from class:AbstractEvent
Returns the chart instance, stored in the event as source.- Overrides:
getChart
in classAbstractEvent
- Returns:
- the chart instance
-
dispatch
protected void dispatch(EventHandler handler)
Description copied from class:Event
Implemented by subclasses to dispatch event on the handler.
-
-