Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.geom

Class Point2D.Double

java.lang.Object
|
+--java.awt.geom.Point2D
   |
   +--java.awt.geom.Point2D.Double


public static class Point2D.Double

extends Point2D

This class defines a point in double precision.

Since:Author:

Field Summary

doublex

The X coordinate.
doubley

The Y coordinate.

Constructor Summary

Double()

Create a new point at (0,0).
Double(double x, double y)

Create a new point at (x,y).

Method Summary

doublegetX()

Return the x coordinate.
doublegetY()

Return the y coordinate.
voidsetLocation(double x, double y)

Sets the location of this point.
java.lang.StringtoString()

Returns a string representation of this object.

Field Details

x

public double x

The X coordinate.


y

public double y

The Y coordinate.


Constructor Details

Double

public Double()

Create a new point at (0,0).


Double

public Double(double x, double y)

Create a new point at (x,y).

Parameters:


Method Details

getX

public double getX()

Return the x coordinate.

Returns:


getY

public double getY()

Return the y coordinate.

Returns:


setLocation

public void setLocation(double x, double y)

Sets the location of this point.

Parameters:


toString

public String toString()

Returns a string representation of this object. The format is: "Point2D.Double[" + x + ", " + y + ']'.

Returns: