|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.hci.r3.pen.PenSample
public class PenSample
Stores a pen sample or ink samples.
This software is distributed under the BSD License.
| Field Summary | |
|---|---|
int |
force
measure of force from pen tip |
boolean |
penUp
whether pen is up |
long |
timestamp
timestamp of server when received |
double |
x
x location of the point, in physical Anoto coordinates TODO: Make these private later... |
double |
y
y location of the point, in physical Anoto coordinates |
| Constructor Summary | |
|---|---|
PenSample(double xVal,
double yVal,
int f,
long ts)
|
|
PenSample(double theX,
double theY,
int theForce,
long theTimestamp,
boolean isPenUp)
|
|
| Method Summary | |
|---|---|
double |
getDistanceFrom(PenSample otherSample)
|
int |
getForce()
|
java.util.Date |
getTime()
|
long |
getTimestamp()
|
double |
getX()
|
double |
getY()
|
boolean |
isPenUp()
|
void |
setForce(int f)
|
void |
setPenUp(boolean b)
Does this sample represent a Pen Up? Perhaps we should subclass PenSample, instead of storing another field in here? It seems a little wasteful if most samples are not pen up samples. |
void |
setTimestamp(long t)
|
void |
setX(double xVal)
|
void |
setY(double yVal)
|
java.lang.String |
toCommaSeparatedString()
|
java.lang.String |
toString()
|
java.lang.String |
toXMLString()
So far, this is used when communicating with Flash in real time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int force
public boolean penUp
public long timestamp
public double x
public double y
| Constructor Detail |
|---|
public PenSample(double xVal,
double yVal,
int f,
long ts)
xVal - yVal - f - ts -
public PenSample(double theX,
double theY,
int theForce,
long theTimestamp,
boolean isPenUp)
theX - theY - theForce - hehehe.theTimestamp - isPenUp - | Method Detail |
|---|
public double getDistanceFrom(PenSample otherSample)
public int getForce()
public java.util.Date getTime()
public long getTimestamp()
public double getX()
public double getY()
public boolean isPenUp()
public void setForce(int f)
f - public void setPenUp(boolean b)
b - public void setTimestamp(long t)
t - public void setX(double xVal)
xVal - public void setY(double yVal)
yVal - public java.lang.String toCommaSeparatedString()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String toXMLString()
|
Copyright 2006 Stanford University | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||