EventReplayManager Class Reference

List of all members.

Public Member Functions

 EventReplayManager (EventEngine engine)
void clearLoadedEvents ()
PenEvent createEventFromString (String eventString)
 The inverse of createStringFromEvent(.
void loadEventDataFrom (File eventDataFile)
void loadMostRecentEventData ()
 Load the most recent event data file.
void replay (final List< PenEvent > events)
 Replays the list of events.
void replayLoadedEvents ()
 Replay the events that have been loaded, in the order that they appear in the list.
void saveEvent (PenEvent event)
 Save this pen event.

Static Public Attributes

static final String[] FILE_EXTENSION = new String[] { "eventData" }

Detailed Description

This class interacts with the EventEngine to simulate real-time input events. The events can be loaded from disk (XML files), and can be either batched or realtime events. Alternatively, events generated by an actual pen can be saved out to a file, for future replay.

This software is distributed under the BSD License.

Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 34 of file EventReplayManager.java.

Constructor & Destructor Documentation

EventReplayManager ( EventEngine  engine  ) 


Definition at line 71 of file EventReplayManager.java.

Member Function Documentation

PenEvent createEventFromString ( String  eventString  ) 

The inverse of createStringFromEvent(.

..). This creates a PenEvent object from one line of the eventData file.


Definition at line 89 of file EventReplayManager.java.

References PenEvent.setModifier().

Referenced by EventReplayManager.loadEventDataFrom().

void loadEventDataFrom ( File  eventDataFile  ) 


Definition at line 145 of file EventReplayManager.java.

References EventReplayManager.createEventFromString().

Referenced by EventBrowser.loadEventData(), and EventReplayManager.loadMostRecentEventData().

void loadMostRecentEventData (  ) 

Load the most recent event data file.


Definition at line 167 of file EventReplayManager.java.

References EventReplayManager.FILE_EXTENSION, and EventReplayManager.loadEventDataFrom().

Referenced by EventBrowser.EventBrowser().

void replay ( final List< PenEvent events  ) 

Replays the list of events.

.. Ideally, this should play it back at real time or some multiple of realtime...

Threaded, because we do not want any GUI to block when calling this. Alternatively, refactor this into blocking & nonblocking versions.


Definition at line 188 of file EventReplayManager.java.

References PenEvent.getTimestamp(), EventEngine.handlePenEvent(), EventEngine.handlePenUpEvent(), and PenEvent.isTypePenUp().

Referenced by EventReplayManager.replayLoadedEvents().

void replayLoadedEvents (  ) 

Replay the events that have been loaded, in the order that they appear in the list.


Definition at line 225 of file EventReplayManager.java.

References EventReplayManager.replay().

Referenced by EventBrowser.replayLoadedEvents().

void saveEvent ( PenEvent  event  ) 

Save this pen event.

This is done automatically for events streamed through the Event Engine. In the future, we should probably log at the PenListener level too! This allows arbitrary event data save and replay.


Definition at line 236 of file EventReplayManager.java.

The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:41 2007 for R3 Paper Toolkit by  doxygen 1.4.7