All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.geom.Point2D

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

public abstract class Point2D
extends Object
A point representing a location in (x, y) coordinate space.

This class is only the abstract superclass for all objects which store a 2D coordinate. The actual storage representation of the coordinates is left to the subclass.


Class Index

 o Point2D.Double
A point specified in double precision.
 o Point2D.Float
A point specified in float precision.

Constructor Index

 o Point2D()

Method Index

 o equals(Object)
Determines whether two points are equal.
 o getX()
Returns the X coordinate of the point in double precision.
 o getY()
Returns the Y coordinate of the point in double precision.
 o setLocation(double, double)
Sets the location of this point to the specified float coordinates.
 o setLocation(Point2D)
Sets the location of this point to the same coordinates as the specified Point object.

Constructors

 o Point2D
protected Point2D()

Methods

 o getX
public abstract double getX()
Returns the X coordinate of the point in double precision.

 o getY
public abstract double getY()
Returns the Y coordinate of the point in double precision.

 o setLocation
public abstract void setLocation(double x,
                                 double y)
Sets the location of this point to the specified float coordinates.

 o setLocation
public void setLocation(Point2D p)
Sets the location of this point to the same coordinates as the specified Point object.

 o equals
public boolean equals(Object obj)
Determines whether two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.

Parameters:
obj - an object to be compared with this point.
Returns:
true if the object to be compared is an instance of Point2D and has the same values; false otherwise.
Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature