java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
- All Implemented Interfaces:
- java.lang.Cloneable
- Enclosing class:
- Point2D
- public static class Point2D.Double
- extends Point2D
This class defines a point in double precision.
- Since:
- 1.2
|
Field Summary |
double |
x
The X coordinate. |
double |
y
The Y coordinate. |
|
Method Summary |
double |
getX()
Return the x coordinate. |
double |
getY()
Return the y coordinate. |
void |
setLocation(double x,
double y)
Sets the location of this point. |
java.lang.String |
toString()
Returns a string representation of this object. |
x
public double x
- The X coordinate.
y
public double y
- The Y coordinate.
Point2D.Double
public Point2D.Double()
- Create a new point at (0,0).
Point2D.Double
public Point2D.Double(double x,
double y)
- Create a new point at (x,y).
getX
public double getX()
- Return the x coordinate.
- Specified by:
getX in class Point2D
getY
public double getY()
- Return the y coordinate.
- Specified by:
getY in class Point2D
setLocation
public void setLocation(double x,
double y)
- Sets the location of this point.
- Specified by:
setLocation in class Point2D
toString
public java.lang.String toString()
- Returns a string representation of this object. The format is:
"Point2D.Double[" + x + ", " + y + ']'.