public static class

Ellipse2D.Float

extends Ellipse2D
implements Serializable
java.lang.Object
   ↳ java.awt.geom.RectangularShape
     ↳ java.awt.geom.Ellipse2D
       ↳ java.awt.geom.Ellipse2D.Float

Class Overview

The Float class defines an ellipse specified in float precision.

Summary

Fields
public float height The overall height of this Ellipse2D.
public float width The overall width of this Ellipse2D.
public float x The X coordinate of the upper-left corner of the framing rectangle of this Ellipse2D.
public float y The Y coordinate of the upper-left corner of the framing rectangle of this Ellipse2D.
Public Constructors
Ellipse2D.Float()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Ellipse2D.Float(float x, float y, float w, float h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Public Methods
Rectangle2D getBounds2D()
double getHeight()
Returns the height of the framing rectangle in double precision.
double getWidth()
Returns the width of the framing rectangle in double precision.
double getX()
Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
double getY()
Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
boolean isEmpty()
Determines whether the RectangularShape is empty.
void setFrame(float x, float y, float w, float h)
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
void setFrame(double x, double y, double w, double h)
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
[Expand]
Inherited Methods
From class java.awt.geom.Ellipse2D
From class java.awt.geom.RectangularShape
From class java.lang.Object
From interface java.awt.Shape

Fields

public float height

The overall height of this Ellipse2D.

public float width

The overall width of this Ellipse2D.

public float x

The X coordinate of the upper-left corner of the framing rectangle of this Ellipse2D.

public float y

The Y coordinate of the upper-left corner of the framing rectangle of this Ellipse2D.

Public Constructors

public Ellipse2D.Float ()

Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).

public Ellipse2D.Float (float x, float y, float w, float h)

Constructs and initializes an Ellipse2D from the specified coordinates.

Parameters
x the X coordinate of the upper-left corner of the framing rectangle
y the Y coordinate of the upper-left corner of the framing rectangle
w the width of the framing rectangle
h the height of the framing rectangle

Public Methods

public Rectangle2D getBounds2D ()

public double getHeight ()

Returns the height of the framing rectangle in double precision.

Returns
  • the height of the framing rectangle.

public double getWidth ()

Returns the width of the framing rectangle in double precision.

Returns
  • the width of the framing rectangle.

public double getX ()

Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.

Returns
  • the X coordinate of the upper-left corner of the framing rectangle.

public double getY ()

Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.

Returns
  • the Y coordinate of the upper-left corner of the framing rectangle.

public boolean isEmpty ()

Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area.

Returns
  • true if the RectangularShape is empty; false otherwise.

public void setFrame (float x, float y, float w, float h)

Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.

Parameters
x the X coordinate of the upper-left corner of the specified rectangular shape
y the Y coordinate of the upper-left corner of the specified rectangular shape
w the width of the specified rectangular shape
h the height of the specified rectangular shape

public void setFrame (double x, double y, double w, double h)

Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.

Parameters
x the X coordinate of the upper-left corner of the specified rectangular shape
y the Y coordinate of the upper-left corner of the specified rectangular shape
w the width of the specified rectangular shape
h the height of the specified rectangular shape