|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HiResPoint
A HiResPoint is like a simplified version of java.awt.Point, but it maintains its coordinates as doubles instead of integers. This class is useful when one simply needs to keep track of coordinate pairs, but the fractional part of the coordinates is significant.
Field Summary | |
double |
x The x coorinate of this point |
double |
y The y coordinate of this point |
Constructor Summary | |
HiResPoint()
Construct a new point whose coorinates are (0.0, 0.0) |
|
HiResPoint(double x,
double y) Construct a new point with the specified set of coordinates |
|
HiResPoint(HiResPoint p)
Construct a new HiResPoint from an existing one. |
|
HiResPoint(java.awt.Point p)
Construct a new HiResPoint from the given java.awt.point |
Method Summary | |
boolean |
equals(HiResPoint p)
Test to see if the given point has the same x and y coordinates as this one |
java.awt.Point |
pointValue()
Create a new java.awt.Point from this HiResPoint, where the coordinate of the awt point are the rounded coordinates of this point |
java.lang.String |
toString() Return a string representation of this HiResPoint. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public double x
public double y
Constructor Detail |
public HiResPoint()
public HiResPoint(double x, double y)
x
- the x coordinatey
- the y coordinatepublic HiResPoint(HiResPoint p)
p
- the existing HiResPointpublic HiResPoint(java.awt.Point p)
p
- the existing java.awt.PointMethod Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(HiResPoint p)
p
- the other HiResPointpublic java.awt.Point pointValue()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |