Class AbstractChartEvent<T extends BaseChartEventDetail>
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<JmixChart>
io.jmix.chartsflowui.kit.component.event.AbstractChartEvent<T>
- Type Parameters:
T
- origin event class type
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractChartMouseEvent
,ChartDataZoomEvent
,ChartFinishedEvent
,ChartGlobalCursorTakenEvent
,ChartGlobalOutEvent
,ChartLegendInverseSelectEvent
,ChartLegendScrollEvent
,ChartLegendSelectAllEvent
,ChartLegendSelectChangedEvent
,ChartMagicTypeChangedEvent
,ChartRenderedEvent
,ChartRestoreEvent
public abstract class AbstractChartEvent<T extends BaseChartEventDetail>
extends com.vaadin.flow.component.ComponentEvent<JmixChart>
Base chart event class. Stores an
detailJson
object containing the event context.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected T
protected elemental.json.JsonObject
static final String
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionAbstractChartEvent
(JmixChart source, boolean fromClient, elemental.json.JsonObject detail, Class<T> detailClass) -
Method Summary
Modifier and TypeMethodDescriptionprotected <M> M
convertDetail
(Class<M> detailClass) Deserializes the incoming event JSON object into a POJO.Lazily returns an event detail object.elemental.json.JsonObject
detailJson
can be used for independent parsing if the predefined mapping doesn't match.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Field Details
-
EVENT_NAME_PREFIX
- See Also:
-
detailJson
protected elemental.json.JsonObject detailJson -
detail
-
detailClass
-
-
Constructor Details
-
AbstractChartEvent
-
-
Method Details
-
getDetailJson
public elemental.json.JsonObject getDetailJson()detailJson
can be used for independent parsing if the predefined mapping doesn't match.- Returns:
JsonObject
describing the context of the event that occurred on the client-side.
-
getDetail
Lazily returns an event detail object. Implemented in a lazy way due to the fact that the event stream can be loaded and because of this, parsing all the details can cause performance issues.- Returns:
- POJO describing the event
-
convertDetail
Deserializes the incoming event JSON object into a POJO.- Type Parameters:
M
- resulting POJO class type- Parameters:
detailClass
- the class of the resulting POJO object- Returns:
- POJO describing the event if the parse was successful
- Throws:
IllegalArgumentException
- if parsing fails
-