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 TypeMethodDescriptionvoid
Adds a key-value pair to the additional data associated with the chart event.getData()
Retrieves the additional data associated with the event.Retrieves theSOChart
instance associated with this chart event.getType()
Retrieves the type of the chart event.Retrieves the user-specific data associated with the event.void
Sets the additional data associated with the event.toString()
-
Constructor Details
-
Event
-
-
Method Details
-
getSOChart
Retrieves theSOChart
instance associated with this chart event.- Returns:
- The
SOChart
instance 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
.
-