|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.events.PenEvent
public class PenEvent
Contains all the information we need to handle pen events. We can serialize
This software is distributed under the BSD License.
Nested Class Summary | |
---|---|
static class |
PenEvent.PenEventModifier
|
Constructor Summary | |
---|---|
PenEvent(int thePenID,
java.lang.String thePenName,
long time,
PenSample sample)
|
Method Summary | |
---|---|
void |
consume()
Consume this event. |
PenSample |
getOriginalSample()
WARNING: This is a dangerous method to use, if you do not know what you are doing. |
int |
getPenID()
|
java.lang.String |
getPenName()
|
PercentageCoordinates |
getPercentageLocation()
It will give you a percentage location, from which you can derive actual coordinates (by converting to inches, etc). |
StreamedPatternCoordinates |
getStreamedPatternCoordinate()
WARNING: See getOriginalSample(). |
long |
getTimestamp()
|
PenEvent.PenEventModifier |
getType()
|
boolean |
isConsumed()
|
boolean |
isTypePenDown()
|
boolean |
isTypePenUp()
|
void |
setModifier(PenEvent.PenEventModifier modifier)
TODO: Change this to an enum? |
void |
setOriginalSample(PenSample sample)
Very low level data in case you want to process it. |
void |
setPenName(java.lang.String name)
The event engine will assign the pen name, which is the source of this event. |
void |
setPercentageLocation(PercentageCoordinates location)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PenEvent(int thePenID, java.lang.String thePenName, long time, PenSample sample)
thePenID
- thePenName
- time
- sample
- Method Detail |
---|
public void consume()
public PenSample getOriginalSample()
public int getPenID()
public java.lang.String getPenName()
public PercentageCoordinates getPercentageLocation()
public StreamedPatternCoordinates getStreamedPatternCoordinate()
public long getTimestamp()
public PenEvent.PenEventModifier getType()
public boolean isConsumed()
public boolean isTypePenDown()
public boolean isTypePenUp()
public void setModifier(PenEvent.PenEventModifier modifier)
modifier
- public void setOriginalSample(PenSample sample)
sample
- public void setPenName(java.lang.String name)
name
- public void setPercentageLocation(PercentageCoordinates location)
location
- public java.lang.String toString()
toString
in class java.lang.Object
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |