|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.geom.Point2D
|
+--java.awt.Point
|
+--edu.mit.sketch.geom.Point
This class represents a Point described by a java.awt.geom.Line2D.Double
| Inner classes inherited from class java.awt.geom.Point2D |
Point2D.Double, Point2D.Float |
| Field Summary | |
Graphics |
graphics
Graphics context for this Geometric object. |
long |
time_stamp
Time stamp of this object. |
| Fields inherited from class java.awt.Point |
x, y |
| Fields inherited from interface edu.mit.sketch.geom.GeometricObject |
CIRCLE, ELLIPSE, LINE, POINT, POLYGON, RECTANGLE, SQUARE |
| Constructor Summary | |
Point()
The constructor. |
|
Point(int x,
int y)
The constructor. |
|
Point(int x,
int y,
long time_stamp)
The constructor. |
|
Point(Point point)
The constructor. |
|
Point(Point point,
long time_stamp)
The constructor. |
|
| Method Summary | |
boolean |
containsGeometricObject(GeometricObject object)
Returns false if the argument is not completely inside this object. |
boolean |
containsGeometricObjects(GeometricObject[] objects)
Returns false if the objects in the input array are completely inside this object. |
double |
distance(Point p)
Return distance from this point to input. |
Polygon |
getDataPoints()
This method is used to get the original data points that forms this GeometricObject |
Polygon |
getPolygonalBounds()
This method should return a polygon that corresponds to this object. |
Rectangle |
getRectangularBounds()
Supplied for completeness. |
long |
getTimeStamp()
Returns the time stamp of the current Terminal |
String |
getType()
Implement GeometricObject |
double |
magnitude()
Return distance from origin. |
void |
paint()
Draw the object |
void |
paint(Graphics g)
Draw the object |
static void |
paint(Point[] points,
Graphics g)
paint points. |
void |
paintOriginal(Graphics g)
This method is used to paint the original data points that forms this GeometricObject |
boolean |
pointIsOn(Point point,
int radius)
Returns true if the point is within +-radius distance from this point. |
boolean |
pointIsOnOriginal(Point p,
int radius)
Returns true if the point is within +-radius distance from the original curve defining the object. |
void |
rotate(double radians)
Rotate about the origin by radians amount. |
void |
scale(double scale)
Multiply the x and y fields by the scale. |
void |
setDataPoints(Polygon points)
This method is used to set the original data points that forms this GeometricObject |
void |
setGraphicsContext(Graphics g)
Set graphics context for this Geometric object. |
void |
setTimeStamp(long time_stamp)
Sets the time stamp of the current Terminal |
int |
spatialRelation(GeometricObject object)
This method should return the spatial relation of the input parameter with respect to this object. |
String |
toString()
Override toString |
boolean |
touches(GeometricObject object)
This method should return true if the input objects touch. |
void |
translate(double x,
double y)
Add the arguments to the (x, y) position of the object. |
| Methods inherited from class java.awt.Point |
equals, getLocation, getX, getY, move, setLocation, setLocation, setLocation, translate |
| Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public long time_stamp
public transient Graphics graphics
| Constructor Detail |
public Point()
public Point(Point point)
public Point(int x,
int y)
public Point(Point point,
long time_stamp)
public Point(int x,
int y,
long time_stamp)
| Method Detail |
public String getType()
getType in interface Paintablepublic String toString()
toString in class Pointpublic void paint()
paint in interface Paintablepublic void paintOriginal(Graphics g)
paintOriginal in interface Paintablepublic void paint(Graphics g)
paint in interface Paintable
public boolean pointIsOn(Point point,
int radius)
pointIsOn in interface Translatable
public boolean pointIsOnOriginal(Point p,
int radius)
pointIsOnOriginal in interface Translatablepublic void setGraphicsContext(Graphics g)
setGraphicsContext in interface Paintablepublic boolean touches(GeometricObject object)
touches in interface GeometricObjectpublic boolean containsGeometricObject(GeometricObject object)
containsGeometricObject in interface GeometricObjectpublic Rectangle getRectangularBounds()
getRectangularBounds in interface GeometricObjectpublic Polygon getPolygonalBounds()
getPolygonalBounds in interface GeometricObjectpublic int spatialRelation(GeometricObject object)
spatialRelation in interface GeometricObjectpublic void setTimeStamp(long time_stamp)
setTimeStamp in interface Terminalpublic long getTimeStamp()
getTimeStamp in interface Terminalpublic void setDataPoints(Polygon points)
setDataPoints in interface GeometricObjectpublic Polygon getDataPoints()
getDataPoints in interface GeometricObjectpublic void rotate(double radians)
public void translate(double x,
double y)
translate in interface Translatablepublic boolean containsGeometricObjects(GeometricObject[] objects)
containsGeometricObjects in interface GeometricObjectpublic void scale(double scale)
public double magnitude()
public double distance(Point p)
public static void paint(Point[] points,
Graphics g)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||