Package com.storedobject.chart
Class Event
java.lang.Object
com.storedobject.chart.Event
Represents an event that occurs in a chart.
A
ChartEvent encapsulates the type of the event, the ID of the part
of the chart related to the event, and optionally, any additional data related to the event.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a key-value pair to the additional data associated with the chart event.getData()Retrieves the additional data associated with the event.Retrieves theSOChartinstance associated with this chart event.getType()Retrieves the type of the chart event.Retrieves the user-specific data associated with the event.voidSets the additional data associated with the event.toString()
-
Constructor Details
-
Event
-
-
Method Details
-
getSOChart
Retrieves theSOChartinstance associated with this chart event.- Returns:
- The
SOChartinstance linked to this event.
-
getType
Retrieves the type of the chart event.- Returns:
- The type of the chart event as a
ChartEventType.
-
getData
-
addData
Adds a key-value pair to the additional data associated with the chart event. If the data map is not initialized, it will create a new one before adding the entry.- Parameters:
key- The key representing the data entry.data- The value associated with the key.
-
toString
-
setData
-
getUserData
Retrieves the user-specific data associated with the event.- Returns:
- The user-specific data as an
Object.
-