java.awt.geom
Class Point2D.Double

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
All Implemented Interfaces:
Cloneable
Enclosing class:
Point2D

public static class Point2D.Double
extends Point2D

A point with double coordinates.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 double x
          The x coordinate of the point
 double y
          The y coordinate of the point
 
Constructor Summary
Point2D.Double()
          Create a point at (0,0) with double coordinates
Point2D.Double(double x, double y)
          Create a point at (x,y) with double coordinates
 
Method Summary
 double getX()
          Get the x coordinate as a double
 double getY()
          Get the y coordinate as a double
 void setLocation(double x, double y)
          Set the location of this Point2D using double coordinates
 String toString()
          Represent the Point2D.Double as a String
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The x coordinate of the point


y

public double y
The y coordinate of the point

Constructor Detail

Point2D.Double

public Point2D.Double()
Create a point at (0,0) with double coordinates


Point2D.Double

public Point2D.Double(double x,
                      double y)
Create a point at (x,y) with double coordinates

Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

getX

public double getX()
Description copied from class: Point2D
Get the x coordinate as a double

Specified by:
getX in class Point2D
Returns:
the x co-ordinate (as a double)

getY

public double getY()
Description copied from class: Point2D
Get the y coordinate as a double

Specified by:
getY in class Point2D
Returns:
the y coordinate (as a double)

setLocation

public void setLocation(double x,
                        double y)
Description copied from class: Point2D
Set the location of this Point2D using double coordinates

Specified by:
setLocation in class Point2D
Parameters:
x - the new x coordinate
y - the new y coordinate

toString

public String toString()
Represent the Point2D.Double as a String

Overrides:
toString in class Object