Class InteractionEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.gui.visualization.image.interactionlogging.InteractionEvent
-
- All Implemented Interfaces:
Serializable
public class InteractionEvent extends EventObject
Interaction event.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Object>
m_Data
the data.protected String
m_ID
the ID.protected Date
m_Timestamp
the timestamp.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description InteractionEvent(InteractionLogManager source, Date timestamp, String id)
Constructs the event.InteractionEvent(InteractionLogManager source, Date timestamp, String id, Map<String,Object> data)
Constructs the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getData()
Returns the associated data.String
getID()
Returns the ID/type of the event.InteractionLogManager
getLogManager()
Returns the log manager that generated the source.Date
getTimestamp()
Returns the timestamp of the event.String
toString()
Short representation of the event.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Constructor Detail
-
InteractionEvent
public InteractionEvent(InteractionLogManager source, Date timestamp, String id)
Constructs the event.- Parameters:
source
- the log manager that generated the eventtimestamp
- the timestamp of the eventid
- the ID/type of the event- Throws:
IllegalArgumentException
- if source is null
-
InteractionEvent
public InteractionEvent(InteractionLogManager source, Date timestamp, String id, Map<String,Object> data)
Constructs the event.- Parameters:
source
- the log manager that generated the eventtimestamp
- the timestamp of the eventid
- the ID/type of the eventdata
- optional data associated with the event, can be null- Throws:
IllegalArgumentException
- if source is null
-
-
Method Detail
-
getLogManager
public InteractionLogManager getLogManager()
Returns the log manager that generated the source.- Returns:
- the panel
-
getTimestamp
public Date getTimestamp()
Returns the timestamp of the event.- Returns:
- the timestamp
-
getID
public String getID()
Returns the ID/type of the event.- Returns:
- the ID/type
-
getData
public Map<String,Object> getData()
Returns the associated data.- Returns:
- the data, null if none available
-
toString
public String toString()
Short representation of the event.- Overrides:
toString
in classEventObject
- Returns:
- the representation
-
-