java.awt.geom

Class RoundRectangle2D.Float

public static class RoundRectangle2D.Float extends RoundRectangle2D

A subclass of RoundRectangle which keeps its parameters as floats.
Field Summary
floatarcheight
The height of the corner arc.
floatarcwidth
The width of the corner arc.
floatheight
The height of this object.
floatwidth
The width of this object.
floatx
The x coordinate of this object.
floaty
The y coordinate of this object.
Constructor Summary
Float()
Construct a new instance, with all parameters set to 0.
Float(float x, float y, float w, float h, float arcWidth, float arcHeight)
Construct a new instance with the given arguments.
Method Summary
doublegetArcHeight()
doublegetArcWidth()
Rectangle2DgetBounds2D()
doublegetHeight()
doublegetWidth()
doublegetX()
doublegetY()
booleanisEmpty()
voidsetRoundRect(float x, float y, float w, float h, float arcWidth, float arcHeight)
Sets the dimensions for this rounded rectangle.
voidsetRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight)

Field Detail

archeight

public float archeight
The height of the corner arc.

arcwidth

public float arcwidth
The width of the corner arc.

height

public float height
The height of this object.

width

public float width
The width of this object.

x

public float x
The x coordinate of this object.

y

public float y
The y coordinate of this object.

Constructor Detail

Float

public Float()
Construct a new instance, with all parameters set to 0.

Float

public Float(float x, float y, float w, float h, float arcWidth, float arcHeight)
Construct a new instance with the given arguments.

Parameters: x The x coordinate y The y coordinate w The width h The height arcWidth The arc width arcHeight The arc height

Method Detail

getArcHeight

public double getArcHeight()

getArcWidth

public double getArcWidth()

getBounds2D

public Rectangle2D getBounds2D()

getHeight

public double getHeight()

getWidth

public double getWidth()

getX

public double getX()

getY

public double getY()

isEmpty

public boolean isEmpty()

setRoundRect

public void setRoundRect(float x, float y, float w, float h, float arcWidth, float arcHeight)
Sets the dimensions for this rounded rectangle.

Parameters: x the x-coordinate of the top left corner. y the y-coordinate of the top left corner. w the width of the rectangle. h the height of the rectangle. arcWidth the arc width. arcHeight the arc height.

See Also: Float

setRoundRect

public void setRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight)