|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.events.EventHandler edu.stanford.hci.r3.events.handlers.InkCollector
public abstract class InkCollector
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?
Field Summary |
---|
Fields inherited from class edu.stanford.hci.r3.events.EventHandler |
---|
parentRegions |
Constructor Summary | |
---|---|
InkCollector()
|
Method Summary | |
---|---|
void |
clear()
Clear the buffers. |
abstract void |
contentArrived()
|
Ink |
getInk()
|
Ink |
getNewInkOnly()
|
int |
getNumStrokesCollected()
|
long |
getTimestampOfMostRecentInkStroke()
|
java.util.Date |
getTimestampOfMostRecentPenUp()
|
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(java.io.File xmlFile)
|
void |
setNotifyDistance(Units notifyAfterThisMuchPenMovement)
Deprecated. do not use this yet... it's a bit slow |
java.lang.String |
toString()
|
Methods inherited from class edu.stanford.hci.r3.events.EventHandler |
---|
addParentRegion, getParentRegions, showMe |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InkCollector()
Method Detail |
---|
public void clear()
public abstract void contentArrived()
public Ink getInk()
public Ink getNewInkOnly()
public int getNumStrokesCollected()
public long getTimestampOfMostRecentInkStroke()
public java.util.Date getTimestampOfMostRecentPenUp()
public void handleEvent(PenEvent event)
EventHandler
handleEvent
in class EventHandler
public void saveInkToXMLFile(java.io.File xmlFile)
xmlFile
- public void setNotifyDistance(Units notifyAfterThisMuchPenMovement)
notifyAfterThisMuchPenMovement
- public java.lang.String toString()
toString
in class EventHandler
edu.stanford.hci.r3.events.ContentFilter#toString()
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |