Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt.geom
Class Ellipse2D.Float  view Ellipse2D.Float download Ellipse2D.Float.java

java.lang.Object
  extended byjava.awt.geom.RectangularShape
      extended byjava.awt.geom.Ellipse2D
          extended byjava.awt.geom.Ellipse2D.Float
All Implemented Interfaces:
java.lang.Cloneable, java.awt.Shape
Enclosing class:
Ellipse2D

public static class Ellipse2D.Float
extends Ellipse2D

An Ellipse2D that stores its coordinates using float primitives.


Nested Class Summary
 
Nested classes inherited from class java.awt.geom.Ellipse2D
Ellipse2D.Double, Ellipse2D.Float
 
Field Summary
 float height
          The height of the ellipse.
 float width
          The width of the ellipse.
 float x
          The upper-left x coordinate of the bounding-box
 float y
          The upper-left y coordinate of the bounding-box
 
Constructor Summary
Ellipse2D.Float()
          Creates a new Ellipse2D with an upper-left coordinate of (0,0) and a zero size.
Ellipse2D.Float(float x, float y, float w, float h)
          Creates a new Ellipse2D within a given rectangle using floating-point precision.
 
Method Summary
 Rectangle2D getBounds2D()
          Returns the bounding-box of the ellipse.
 double getHeight()
          Returns the height of the ellipse.
 double getWidth()
          Returns the width of the ellipse.
 double getX()
          Returns x coordinate of the upper-left corner of the ellipse's bounding-box.
 double getY()
          Returns y coordinate of the upper-left corner of the ellipse's bounding-box.
 boolean isEmpty()
          Returns true if the ellipse encloses no area, and false otherwise.
 void setFrame(double x, double y, double w, double h)
          Sets the geometry of the ellipse's bounding box.
 void setFrame(float x, float y, float w, float h)
          Sets the geometry of the ellipse's bounding box.
 
Methods inherited from class java.awt.geom.Ellipse2D
contains, contains, getPathIterator, intersects
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

public float height
The height of the ellipse.


width

public float width
The width of the ellipse.


x

public float x
The upper-left x coordinate of the bounding-box


y

public float y
The upper-left y coordinate of the bounding-box

Constructor Detail

Ellipse2D.Float

public Ellipse2D.Float()
Creates a new Ellipse2D with an upper-left coordinate of (0,0) and a zero size.


Ellipse2D.Float

public Ellipse2D.Float(float x,
                       float y,
                       float w,
                       float h)
Creates a new Ellipse2D within a given rectangle using floating-point precision.

Method Detail

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounding-box of the ellipse.


getHeight

public double getHeight()
Returns the height of the ellipse.

Specified by:
getHeight in class RectangularShape

getWidth

public double getWidth()
Returns the width of the ellipse.

Specified by:
getWidth in class RectangularShape

getX

public double getX()
Returns x coordinate of the upper-left corner of the ellipse's bounding-box.

Specified by:
getX in class RectangularShape

getY

public double getY()
Returns y coordinate of the upper-left corner of the ellipse's bounding-box.

Specified by:
getY in class RectangularShape

isEmpty

public boolean isEmpty()
Returns true if the ellipse encloses no area, and false otherwise.

Specified by:
isEmpty in class RectangularShape

setFrame

public void setFrame(float x,
                     float y,
                     float w,
                     float h)
Sets the geometry of the ellipse's bounding box.


setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the geometry of the ellipse's bounding box. Note: This leads to a loss of precision.

Specified by:
setFrame in class RectangularShape