API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.geom. Point2D View Source
Author(s)
Jim Graham
Since
1.2
Version
1.21, 02/24/06
Serial
Hierarchy
 Object
      Point2D
Implements
 Cloneable
Subclasses
Description
publicabstract abstract class Point2D
  The Point2D class defines a point representing a location in (x,y) coordinate space.
See also:   
Constructors
protected Point2D ()
  This is an abstract class that cannot be instantiated directly.
Methods
Hide/Show inherited methods
public Object clone ()
  Creates a new object of the same class and with the same contents as this object.
public double distance (double px, double py)
  Returns the distance from this Point2D to a specified point.
publicstatic double distance (double x1, double y1, double x2, double y2)
  Returns the distance between two points.
public double distance (Point2D pt)
  Returns the distance from this Point2D to a specified Point2D.
public double distanceSq (double px, double py)
  Returns the square of the distance from this Point2D to a specified point.
publicstatic double distanceSq (double x1, double y1, double x2, double y2)
  Returns the square of the distance between two points.
public double distanceSq (Point2D pt)
  Returns the square of the distance from this Point2D to a specified Point2D.
public boolean equals (Object obj)
  Determines whether or not two points are equal.
publicabstract double getX ()
  Returns the X coordinate of this Point2D in double precision.
publicabstract double getY ()
  Returns the Y coordinate of this Point2D in double precision.
public int hashCode ()
  Returns the hashcode for this Point2D.
publicabstract void setLocation (double x, double y)
  Sets the location of this Point2D to the specified double coordinates.
public void setLocation (Point2D p)
  Sets the location of this Point2D to the same coordinates as the specified Point2D object.
Fields
Hide/Show inherited fields
Nested Classes
  Point2D.Float
The Float class defines a point specified in float precision.
  Point2D.Double
The Double class defines a point specified in double precision.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar