Class DatasetSelectionEvent
- java.lang.Object
-
- org.pepstock.charba.client.events.Event
-
- org.pepstock.charba.client.events.AbstractEvent
-
- org.pepstock.charba.client.events.DatasetSelectionEvent
-
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(BaseNativeEvent nativeEvent, IsChart chart, DatasetReference item)Creates the event with dataset reference item related to the click and the chart instanceDatasetSelectionEvent(BaseNativeEvent 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 voiddispatch(EventHandler handler)Implemented by subclasses to dispatch event on the handler.IsChartgetChart()Returns the chart instance, stored in the event as source.DatasetReferencegetItem()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(BaseNativeEvent 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(BaseNativeEvent 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:AbstractEventReturns the chart instance, stored in the event as source.- Overrides:
getChartin classAbstractEvent- Returns:
- the chart instance
-
dispatch
protected void dispatch(EventHandler handler)
Description copied from class:EventImplemented by subclasses to dispatch event on the handler.
-
-