java.awt.geom
Class Point2D.Float

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Float
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Point
Enclosing class:
Point2D

public static class Point2D.Float
extends Point2D

A point with float coordinates.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 float x
          The x coordinate of the point
 float y
          The y coordinate of the point
 
Constructor Summary
Point2D.Float()
          Create a point at (0,0) with float coordinates
Point2D.Float(float x, float y)
          Create a point at (x,y) with float 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
 void setLocation(float x, float y)
          Set the location of the point
 String toString()
          Represent the Point2SD.Float 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 float x
The x coordinate of the point


y

public float y
The y coordinate of the point

Constructor Detail

Point2D.Float

public Point2D.Float()
Create a point at (0,0) with float coordinates


Point2D.Float

public Point2D.Float(float x,
                     float y)
Create a point at (x,y) with float 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

setLocation

public void setLocation(float x,
                        float y)
Set the location of the point

Parameters:
x - the new x coordinate
y - the new y coordinate

toString

public String toString()
Represent the Point2SD.Float as a String

Overrides:
toString in class Object