Class LegendLeaveEvent
- java.lang.Object
-
- org.pepstock.charba.client.events.Event
-
- org.pepstock.charba.client.events.AbstractEvent
-
- org.pepstock.charba.client.events.LegendLeaveEvent
-
- All Implemented Interfaces:
IsCommonChartEvent,IsLegendEvent
public final class LegendLeaveEvent extends AbstractEvent
Event which is fired when the user leaves on the legend of the chart.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description LegendLeaveEvent(ChartEventContext eventContext, LegendItem item)Creates the event with legend item related to the leaving.
-
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.ChartEventContextgetContext()Returns the java script function context of CHART.JS events.LegendItemgetItem()Returns the legend item related to the clickKeygetKey()Returns the options key where default function is stored.-
Methods inherited from class org.pepstock.charba.client.events.AbstractEvent
getNativeEvent, getType
-
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.events.IsCommonChartEvent
getChart, getContext, getKey, getNativeEvent
-
-
-
-
Field Detail
-
TYPE
public static final EventType TYPE
Event type
-
-
Constructor Detail
-
LegendLeaveEvent
public LegendLeaveEvent(ChartEventContext eventContext, LegendItem item)
Creates the event with legend item related to the leaving.- Parameters:
eventContext- event context generated by CHART.jsitem- legend item related to the leaving
-
-
Method Detail
-
dispatch
protected void dispatch(EventHandler handler)
Description copied from class:EventImplemented by subclasses to dispatch event on the handler.
-
getItem
public final LegendItem getItem()
Returns the legend item related to the click- Specified by:
getItemin interfaceIsLegendEvent- Returns:
- the legend item related to the click
-
getContext
public final ChartEventContext getContext()
Returns the java script function context of CHART.JS events.- Returns:
- the java script function context of CHART.JS events.
-
getKey
public final Key getKey()
Returns the options key where default function is stored.- Returns:
- the options key where default function is stored
-
getChart
public IsChart getChart()
Returns the chart instance, stored in the event as source.- Overrides:
getChartin classAbstractEvent- Returns:
- the chart instance
-
-