Class ChartResizeEvent
- java.lang.Object
-
- org.pepstock.charba.client.events.Event
-
- org.pepstock.charba.client.events.AbstractEvent
-
- org.pepstock.charba.client.events.ChartResizeEvent
-
- All Implemented Interfaces:
HasNativeEvent
public final class ChartResizeEvent extends AbstractEvent
Event which is fired when the chart has been resized.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description ChartResizeEvent(ChartEventContext eventContext, SizeItem size)
Creates the event with a item with new size of the chart
-
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.ChartEventContext
getContext()
Returns the java script function context of CHART.JS events.Key
getKey()
Returns the options key where default function is stored.SizeItem
getSize()
Returns item with the new size of the chart-
Methods inherited from class org.pepstock.charba.client.events.AbstractEvent
getNativeEvent, getType
-
-
-
-
Field Detail
-
TYPE
public static final EventType TYPE
Event type
-
-
Constructor Detail
-
ChartResizeEvent
public ChartResizeEvent(ChartEventContext eventContext, SizeItem size)
Creates the event with a item with new size of the chart- Parameters:
eventContext
- event context generated by CHART.jssize
- item with the new size of the chart
-
-
Method Detail
-
getSize
public SizeItem getSize()
Returns item with the new size of the chart- Returns:
- the item with the new size of the chart
-
dispatch
protected void dispatch(EventHandler handler)
Description copied from class:Event
Implemented by subclasses to dispatch event on the handler.
-
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:
getChart
in classAbstractEvent
- Returns:
- the chart instance
-
-