InkCollector Class Reference

Inheritance diagram for InkCollector:

EventHandler List of all members.

Public Member Functions

 InkCollector ()
void clear ()
 Clear the buffers.
abstract void contentArrived ()
Ink getInk ()
Ink getNewInkOnly ()
int getNumStrokesCollected ()
long getTimestampOfMostRecentInkStroke ()
Date getTimestampOfMostRecentPenUp ()
Override void handleEvent (PenEvent event)
 if this event should be consumed (i.e., lower priority event handlers should not see this event), we should set the event.consumed property to true
void saveInkToXMLFile (File xmlFile)
void setNotifyDistance (Units notifyAfterThisMuchPenMovement)
Override String toString ()

Classes

class  InkNotifier

Detailed Description

Captures ink strokes, and allows access to them on demand. Notifies listeners every time a stroke is written. We can set a flag that tells it to notify the listeners every time the pen moves a sufficient distance...

TODO: This class contains some filtering code to eliminate false Pen Ups, due to the fault of the streaming digital pen. Should this filtering be done earlier? Should it be an option? Clearly, an implementer of a ContentFilter should not need to manually filter events... =\

This software is distributed under the BSD License.

TODO: Add a scale factor here??? Or maybe a scale factor somewhere in the event pipeline? Or should we do it later on?

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

Definition at line 40 of file InkCollector.java.


Member Function Documentation

Ink getInk (  ) 

Returns:
list of ALL the pen strokes.

Definition at line 193 of file InkCollector.java.

Ink getNewInkOnly (  ) 

Returns:

Definition at line 200 of file InkCollector.java.

int getNumStrokesCollected (  ) 

Returns:

Definition at line 210 of file InkCollector.java.

long getTimestampOfMostRecentInkStroke (  ) 

Returns:
timestamp that last stroke was completed, in milliseconds, or -1 if there are no strokes.

Definition at line 218 of file InkCollector.java.

Date getTimestampOfMostRecentPenUp (  ) 

Returns:

Definition at line 229 of file InkCollector.java.

void saveInkToXMLFile ( File  xmlFile  ) 

Parameters:
xmlFile 

Definition at line 321 of file InkCollector.java.

Referenced by CaptureApplication.saveInkToDisk().

void setNotifyDistance ( Units  notifyAfterThisMuchPenMovement  ) 

Parameters:
notifyAfterThisMuchPenMovement 
Deprecated:
do not use this yet... it's a bit slow

Definition at line 329 of file InkCollector.java.

References Units.getValueInPatternDots().

Override String toString (  )  [virtual]

See also:
edu.stanford.hci.r3.events.ContentFilter.toString()

Implements EventHandler.

Definition at line 343 of file InkCollector.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