|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.awt.geom.Polygon2D | +--edu.berkeley.guir.lib.satin.stroke.TimedPolygon2D
A polygon that also has timing information.
This implementation is not yet optimized for space. The difficulty lies in the design decision made by Javasoft to make the arrays in Polygon directly accessible, which can improve performance but make other optimizations much more difficult since there is no abstraction.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Oct 06 1998, JH Created class - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release
Field Summary | |
long[] |
times
|
Fields inherited from class edu.berkeley.guir.lib.awt.geom.Polygon2D |
npoints, xpoints, ypoints |
Constructor Summary | |
TimedPolygon2D()
|
|
TimedPolygon2D(float[] x,
float[] y,
int numPoints)
|
|
TimedPolygon2D(float[] x,
float[] y,
long[] t,
int numPoints)
|
|
TimedPolygon2D(float[] x,
float[] y,
long time,
int numPoints)
|
|
TimedPolygon2D(int[] x,
int[] y,
int numPoints)
|
|
TimedPolygon2D(int[] x,
int[] y,
long[] t,
int numPoints)
|
|
TimedPolygon2D(int[] x,
int[] y,
long time,
int numPoints)
|
|
TimedPolygon2D(Polygon p)
Clone the polygon, with all the times set to the current time. |
|
TimedPolygon2D(Polygon2D p)
Clone the polygon, with all the times set to the current time. |
|
TimedPolygon2D(Polygon2D p,
long[] t)
Create a polygon with the specified times. |
|
TimedPolygon2D(Polygon p,
long[] t)
Create a polygon with the specified times. |
|
TimedPolygon2D(TimedPolygon2D p)
Clone the specified polygon. |
Method Summary | |
void |
addPoint(double x,
double y)
Add a point, with the time determined by the system clock. |
void |
addPoint(double x,
double y,
long t)
Add a point with the specified time. |
Object |
clone()
|
Object |
clone(TimedPolygon2D p)
|
Rectangle |
getBounds()
Fixes a bug in Polygon. |
long |
getEndTime()
Get the end time of this polygon. |
long |
getStartTime()
Get the start time of this polygon. |
void |
setToShape(TimedPolygon2D poly)
|
String |
toString()
|
Methods inherited from class edu.berkeley.guir.lib.awt.geom.Polygon2D |
addPoint, clearPoints, clone, contains, contains, contains, contains, cut, getBounds2D, getPathIterator, getPathIterator, intersects, intersects, isClosed, isNormalized, main, minDistance, minDistance, normalize, paste, perimeter, setClosed, setPoly, setPoly, setToPathIterator, setToShape, simplify, transform, transformCopy, translate, trim |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public long[] times
Constructor Detail |
public TimedPolygon2D()
public TimedPolygon2D(int[] x, int[] y, int numPoints)
public TimedPolygon2D(int[] x, int[] y, long time, int numPoints)
public TimedPolygon2D(int[] x, int[] y, long[] t, int numPoints)
public TimedPolygon2D(Polygon p)
public TimedPolygon2D(Polygon p, long[] t)
public TimedPolygon2D(float[] x, float[] y, int numPoints)
public TimedPolygon2D(float[] x, float[] y, long time, int numPoints)
public TimedPolygon2D(float[] x, float[] y, long[] t, int numPoints)
public TimedPolygon2D(Polygon2D p)
public TimedPolygon2D(Polygon2D p, long[] t)
public TimedPolygon2D(TimedPolygon2D p)
Method Detail |
public long getStartTime()
public long getEndTime()
public Rectangle getBounds()
getBounds
in class Polygon2D
public void setToShape(TimedPolygon2D poly)
public void addPoint(double x, double y)
addPoint
in class Polygon2D
x
- is the x-coordinate of the point to add.y
- is the y-coordinate of the point to add.public void addPoint(double x, double y, long t)
x
- is the x-coordinate of the point to add.y
- is the y-coordinate of the point to add.t
- is the time for this point.public String toString()
toString
in class Polygon2D
public Object clone()
clone
in class Polygon2D
public Object clone(TimedPolygon2D p)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |