|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.geom.Point2D
view.MyPoint2D
public class MyPoint2D
An extension to point allowing construction with a comma-separated string.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Point2D |
|---|
Point2D.Double, Point2D.Float |
| Field Summary | |
|---|---|
double |
x
The x coordinate in double precision. |
double |
y
The y coordinate in double precision. |
| Constructor Summary | |
|---|---|
MyPoint2D(double x,
double y)
Constructs a enw point from x and y in double precision. |
|
MyPoint2D(Point2D source)
Constructs a new point from a point. |
|
MyPoint2D(String desc)
Constrcuts a new point from a comma-separated string. |
|
| Method Summary | |
|---|---|
double |
getX()
Returns x. |
double |
getY()
Returns y. |
static Point2D |
parsePoint(String desc)
Parses a point from a String. |
void |
setLocation(double newx,
double newy)
Sets a new location for this point. |
String |
toString()
Overrides the string representation. |
static String |
toString(Point2D p)
Overrides the string representation. |
| Methods inherited from class java.awt.geom.Point2D |
|---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
| Constructor Detail |
|---|
public MyPoint2D(String desc)
public MyPoint2D(Point2D source)
public MyPoint2D(double x,
double y)
| Method Detail |
|---|
public double getX()
getX in class Point2Dpublic double getY()
getY in class Point2D
public void setLocation(double newx,
double newy)
setLocation in class Point2Dpublic static Point2D parsePoint(String desc)
public static String toString(Point2D p)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||