|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.java2d.Polyline2D
diva.util.java2d.Polyline2D.Float
diva.sketch.recognition.TimedStroke
public class TimedStroke
TimedStroke is a collection of points taken in the duration of a mouse pressed event and a mouse released event. A TimedStroke object contains basic stroke path information (such as the points and the timestamps in the path) and can be annotated to contain application-specific information, e.g. properties used in the recognition process.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class diva.util.java2d.Polyline2D |
---|
Polyline2D.Double, Polyline2D.Float |
Field Summary |
---|
Fields inherited from class diva.util.java2d.Polyline2D |
---|
_coordCount |
Constructor Summary | |
---|---|
TimedStroke()
Construct a timed stroke object with an empty stroke path. |
|
TimedStroke(int initSize)
Construct a timed stroke object with an empty stroke path of the given initial size. |
|
TimedStroke(TimedStroke in)
Copy constructor for efficient copying of TimedStroke |
Method Summary | |
---|---|
void |
addVertex(float x,
float y,
long timestamp)
Add a pair of x, y coordinates in the stroke path and the corresponding timestamp. |
Object |
getProperty(String key)
Return the property corresponding to the given key, or null if no such property exists. |
long |
getTimestamp(int i)
Return the timestamp of the point at the given index. |
Iterator |
propertyNames()
Return an iteration of the names of the properties |
void |
setProperty(String key,
Object value)
Set the property corresponding to the given key. |
Methods inherited from class diva.util.java2d.Polyline2D.Float |
---|
getBounds2D, getX, getY, lineTo, moveTo, setX, setY, transform, translate |
Methods inherited from class diva.util.java2d.Polyline2D |
---|
contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, getVertexCount, intersects, intersects, reset, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimedStroke()
public TimedStroke(TimedStroke in)
public TimedStroke(int initSize)
Method Detail |
---|
public void addVertex(float x, float y, long timestamp)
public Object getProperty(String key)
getProperty
in interface PropertyContainer
public long getTimestamp(int i)
public Iterator propertyNames()
propertyNames
in interface PropertyContainer
public void setProperty(String key, Object value)
setProperty
in interface PropertyContainer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |