APIdia Launch Partner
Top Description Inners Constructors Methods
java.awt.geom

public abstract Class RoundRectangle2D

extends RectangularShape
Class Inheritance
Known Direct Subclasses
java.awt.geom.RoundRectangle2D.Float, java.awt.geom.RoundRectangle2D.Double
Imports
java.io.Serial, .Serializable

The RoundRectangle2D class defines a rectangle with rounded corners defined by a location (x,y), a dimension (w x h), and the width and height of an arc with which to round the corners.

This class is the abstract superclass for all objects that store a 2D rounded rectangle. The actual storage representation of the coordinates is left to the subclass.

Author
Jim Graham
Since
1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
RoundRectangle2D.Double

The Double class defines a rectangle with rounded corners all specified in double coordinates.

public static class
RoundRectangle2D.Float

The Float class defines a rectangle with rounded corners all specified in float coordinates.

Constructor Summary

AccessConstructor and Description
protected
RoundRectangle2D()

This is an abstract class that cannot be instantiated directly.

Method Summary

Modifier and TypeMethod and Description
private int
classify(double coord, double left, double right, double arcsize)

public boolean
contains(double x, double y)

Implements java.awt.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape, as described by the definition of insideness.

public boolean
contains(double x, double y, double w, double h)

Implements java.awt.Shape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area.

public boolean

Returns:

true if obj is an instance of RoundRectangle2D and has the same values; false otherwise.
equals
(Object
an Object to be compared with this RoundRectangle2D.
obj
)

Overrides java.lang.Object.equals.

Determines whether or not the specified Object is equal to this RoundRectangle2D.

public abstract double

Returns:

the height of the arc that rounds off the corners of this RoundRectangle2D.
getArcHeight
()

Gets the height of the arc that rounds off the corners.

public abstract double

Returns:

the width of the arc that rounds off the corners of this RoundRectangle2D.
getArcWidth
()

Gets the width of the arc that rounds off the corners.

public PathIterator

Returns:

the PathIterator object that returns the geometry of the outline of this RoundRectangle2D, one segment at a time.
getPathIterator
(AffineTransform
an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired
at
)

Implements java.awt.Shape.getPathIterator.

Returns an iteration object that defines the boundary of this RoundRectangle2D.

public int

Returns:

the hashcode for this RoundRectangle2D.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this RoundRectangle2D.

public boolean
intersects(double x, double y, double w, double h)

Implements java.awt.Shape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area.

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

Implements abstract java.awt.geom.RectangularShape.setFrame.

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

public abstract void
setRoundRect(double
the X coordinate to which to set the location of this RoundRectangle2D
x
,
double
the Y coordinate to which to set the location of this RoundRectangle2D
y
,
double
the width to which to set this RoundRectangle2D
w
,
double
the height to which to set this RoundRectangle2D
h
,
double
the width to which to set the arc of this RoundRectangle2D
arcWidth
,
double
the height to which to set the arc of this RoundRectangle2D
arcHeight
)

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

public void
setRoundRect(RoundRectangle2D
the specified RoundRectangle2D
rr
)

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Inherited from java.awt.geom.RectangularShape:
clonecontainscontainsgetBoundsgetCenterXgetCenterYgetFramegetHeightgetMaxXgetMaxYgetMinXgetMinYgetPathIteratorgetWidthgetXgetYintersectsisEmptysetFramesetFramesetFrameFromCentersetFrameFromCentersetFrameFromDiagonalsetFrameFromDiagonal

Constructor Detail

RoundRectangle2Dback to summary
protected RoundRectangle2D()

This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.

Since
1.2
See Also
java.awt.geom.RoundRectangle2D.Float, java.awt.geom.RoundRectangle2D.Double

Method Detail

classifyback to summary
private int classify(double coord, double left, double right, double arcsize)
containsback to summary
public boolean contains(double x, double y)

Implements java.awt.Shape.contains.

Doc from java.awt.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape, as described by the definition of insideness.

Since
1.2
containsback to summary
public boolean contains(double x, double y, double w, double h)

Implements java.awt.Shape.contains.

Doc from java.awt.Shape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area. All coordinates that lie inside the rectangular area must lie within the Shape for the entire rectangular area to be considered contained within the Shape.

The Shape.contains() method allows a Shape implementation to conservatively return false when:

  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the rectangular area are prohibitively expensive.
This means that for some Shapes this method might return false even though the Shape contains the rectangular area. The Area class performs more accurate geometric computations than most Shape objects and therefore can be used if a more precise answer is required.
Since
1.2
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Determines whether or not the specified Object is equal to this RoundRectangle2D. The specified Object is equal to this RoundRectangle2D if it is an instance of RoundRectangle2D and if its location, size, and corner arc dimensions are the same as this RoundRectangle2D.

Parameters
obj:Object

an Object to be compared with this RoundRectangle2D.

Returns:boolean

true if obj is an instance of RoundRectangle2D and has the same values; false otherwise.

Since
1.6
getArcHeightback to summary
public abstract double getArcHeight()

Gets the height of the arc that rounds off the corners.

Returns:double

the height of the arc that rounds off the corners of this RoundRectangle2D.

Since
1.2
getArcWidthback to summary
public abstract double getArcWidth()

Gets the width of the arc that rounds off the corners.

Returns:double

the width of the arc that rounds off the corners of this RoundRectangle2D.

Since
1.2
getPathIteratorback to summary
public PathIterator getPathIterator(AffineTransform at)

Implements java.awt.Shape.getPathIterator.

Returns an iteration object that defines the boundary of this RoundRectangle2D. The iterator for this class is multi-threaded safe, which means that this RoundRectangle2D class guarantees that modifications to the geometry of this RoundRectangle2D object do not affect any iterations of that geometry that are already in process.

Parameters
at:AffineTransform

an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired

Returns:PathIterator

the PathIterator object that returns the geometry of the outline of this RoundRectangle2D, one segment at a time.

Since
1.2
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hashcode for this RoundRectangle2D.

Returns:int

the hashcode for this RoundRectangle2D.

Since
1.6
intersectsback to summary
public boolean intersects(double x, double y, double w, double h)

Implements java.awt.Shape.intersects.

Doc from java.awt.Shape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area. The rectangular area is considered to intersect the Shape if any point is contained in both the interior of the Shape and the specified rectangular area.

The Shape.intersects() method allows a Shape implementation to conservatively return true when:

  • there is a high probability that the rectangular area and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that for some Shapes this method might return true even though the rectangular area does not intersect the Shape. The Area class performs more accurate computations of geometric intersection than most Shape objects and therefore can be used if a more precise answer is required.
Since
1.2
setFrameback to summary
public void setFrame(double x, double y, double w, double h)

Implements abstract java.awt.geom.RectangularShape.setFrame.

Doc from java.awt.geom.RectangularShape.setFrame.

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

Since
1.2
setRoundRectback to summary
public abstract void setRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight)

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

Parameters
x:double

the X coordinate to which to set the location of this RoundRectangle2D

y:double

the Y coordinate to which to set the location of this RoundRectangle2D

w:double

the width to which to set this RoundRectangle2D

h:double

the height to which to set this RoundRectangle2D

arcWidth:double

the width to which to set the arc of this RoundRectangle2D

arcHeight:double

the height to which to set the arc of this RoundRectangle2D

Since
1.2
setRoundRectback to summary
public void setRoundRect(RoundRectangle2D rr)

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Parameters
rr:RoundRectangle2D

the specified RoundRectangle2D

Since
1.2
java.awt.geom back to summary

public Class RoundRectangle2D.Double

extends RoundRectangle2D
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

The Double class defines a rectangle with rounded corners all specified in double coordinates.
Since
1.2

Field Summary

Modifier and TypeField and Description
public double
archeight

The height of the arc that rounds off the corners.

public double
arcwidth

The width of the arc that rounds off the corners.

public double
height

The height of this RoundRectangle2D.

private static final long
serialVersionUID

Use serialVersionUID from JDK 1.6 for interoperability.

public double
width

The width of this RoundRectangle2D.

public double
x

The X coordinate of this RoundRectangle2D.

public double
y

The Y coordinate of this RoundRectangle2D.

Constructor Summary

AccessConstructor and Description
public
Double()

Constructs a new RoundRectangle2D, initialized to location (0.0, 0.0), size (0.0, 0.0), and corner arcs of radius 0.0.

public
Double(double
the X coordinate of the newly constructed RoundRectangle2D
x
,
double
the Y coordinate of the newly constructed RoundRectangle2D
y
,
double
the width to which to set the newly constructed RoundRectangle2D
w
,
double
the height to which to set the newly constructed RoundRectangle2D
h
,
double
the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arcw
,
double
the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arch
)

Constructs and initializes a RoundRectangle2D from the specified double coordinates.

Method Summary

Modifier and TypeMethod and Description
public double
getArcHeight()

Implements abstract java.awt.geom.RoundRectangle2D.getArcHeight.

Gets the height of the arc that rounds off the corners.

public double
getArcWidth()

Implements abstract java.awt.geom.RoundRectangle2D.getArcWidth.

Gets the width of the arc that rounds off the corners.

public Rectangle2D
getBounds2D()

Implements java.awt.Shape.getBounds2D.

Returns a high precision and more accurate bounding box of the Shape than the getBounds method.

public double
getHeight()

Implements abstract java.awt.geom.RectangularShape.getHeight.

Returns the height of the framing rectangle in double precision.

public double
getWidth()

Implements abstract java.awt.geom.RectangularShape.getWidth.

Returns the width of the framing rectangle in double precision.

public double
getX()

Implements abstract java.awt.geom.RectangularShape.getX.

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

public double
getY()

Implements abstract java.awt.geom.RectangularShape.getY.

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

public boolean
isEmpty()

Implements abstract java.awt.geom.RectangularShape.isEmpty.

Determines whether the RectangularShape is empty.

public void
setRoundRect(double x, double y, double w, double h, double arcw, double arch)

Implements abstract java.awt.geom.RoundRectangle2D.setRoundRect.

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

public void
setRoundRect(RoundRectangle2D rr)

Overrides java.awt.geom.RoundRectangle2D.setRoundRect.

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Inherited from java.awt.geom.RoundRectangle2D:
containscontainsequalsgetPathIteratorhashCodeintersectssetFrame

Field Detail

archeightback to summary
public double archeight

The height of the arc that rounds off the corners.

Since
1.2
arcwidthback to summary
public double arcwidth

The width of the arc that rounds off the corners.

Since
1.2
heightback to summary
public double height

The height of this RoundRectangle2D.

Since
1.2
serialVersionUIDback to summary
private static final long serialVersionUID

Use serialVersionUID from JDK 1.6 for interoperability.

Annotations
@Serial
widthback to summary
public double width

The width of this RoundRectangle2D.

Since
1.2
xback to summary
public double x

The X coordinate of this RoundRectangle2D.

Since
1.2
yback to summary
public double y

The Y coordinate of this RoundRectangle2D.

Since
1.2

Constructor Detail

Doubleback to summary
public Double()

Constructs a new RoundRectangle2D, initialized to location (0.0, 0.0), size (0.0, 0.0), and corner arcs of radius 0.0.

Since
1.2
Doubleback to summary
public Double(double x, double y, double w, double h, double arcw, double arch)

Constructs and initializes a RoundRectangle2D from the specified double coordinates.

Parameters
x:double

the X coordinate of the newly constructed RoundRectangle2D

y:double

the Y coordinate of the newly constructed RoundRectangle2D

w:double

the width to which to set the newly constructed RoundRectangle2D

h:double

the height to which to set the newly constructed RoundRectangle2D

arcw:double

the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D

arch:double

the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D

Since
1.2

Method Detail

getArcHeightback to summary
public double getArcHeight()

Implements abstract java.awt.geom.RoundRectangle2D.getArcHeight.

Doc from java.awt.geom.RoundRectangle2D.getArcHeight.

Gets the height of the arc that rounds off the corners.

Since
1.2
getArcWidthback to summary
public double getArcWidth()

Implements abstract java.awt.geom.RoundRectangle2D.getArcWidth.

Doc from java.awt.geom.RoundRectangle2D.getArcWidth.

Gets the width of the arc that rounds off the corners.

Since
1.2
getBounds2Dback to summary
public Rectangle2D getBounds2D()

Implements java.awt.Shape.getBounds2D.

Doc from java.awt.Shape.getBounds2D.

Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.

Note that the definition of insideness can lead to situations where points on the defining outline of the shape may not be considered contained in the returned bounds object, but only in cases where those points are also not considered contained in the original shape.

If a point is inside the shape according to the contains(point) method, then it must be inside the returned Rectangle2D bounds object according to the contains(point) method of the bounds. Specifically:

shape.contains(p) requires bounds.contains(p)

If a point is not inside the shape, then it might still be contained in the bounds object:

bounds.contains(p) does not imply shape.contains(p)

Since
1.2
getHeightback to summary
public double getHeight()

Implements abstract java.awt.geom.RectangularShape.getHeight.

Doc from java.awt.geom.RectangularShape.getHeight.

Returns the height of the framing rectangle in double precision.

Since
1.2
getWidthback to summary
public double getWidth()

Implements abstract java.awt.geom.RectangularShape.getWidth.

Doc from java.awt.geom.RectangularShape.getWidth.

Returns the width of the framing rectangle in double precision.

Since
1.2
getXback to summary
public double getX()

Implements abstract java.awt.geom.RectangularShape.getX.

Doc from java.awt.geom.RectangularShape.getX.

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

Since
1.2
getYback to summary
public double getY()

Implements abstract java.awt.geom.RectangularShape.getY.

Doc from java.awt.geom.RectangularShape.getY.

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

Since
1.2
isEmptyback to summary
public boolean isEmpty()

Implements abstract java.awt.geom.RectangularShape.isEmpty.

Doc from java.awt.geom.RectangularShape.isEmpty.

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

Since
1.2
setRoundRectback to summary
public void setRoundRect(double x, double y, double w, double h, double arcw, double arch)

Implements abstract java.awt.geom.RoundRectangle2D.setRoundRect.

Doc from java.awt.geom.RoundRectangle2D.setRoundRect.

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

Since
1.2
setRoundRectback to summary
public void setRoundRect(RoundRectangle2D rr)

Overrides java.awt.geom.RoundRectangle2D.setRoundRect.

Doc from java.awt.geom.RoundRectangle2D.setRoundRect.

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Since
1.2
java.awt.geom back to summary

public Class RoundRectangle2D.Float

extends RoundRectangle2D
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

The Float class defines a rectangle with rounded corners all specified in float coordinates.
Since
1.2

Field Summary

Modifier and TypeField and Description
public float
archeight

The height of the arc that rounds off the corners.

public float
arcwidth

The width of the arc that rounds off the corners.

public float
height

The height of this RoundRectangle2D.

private static final long
serialVersionUID

Use serialVersionUID from JDK 1.6 for interoperability.

public float
width

The width of this RoundRectangle2D.

public float
x

The X coordinate of this RoundRectangle2D.

public float
y

The Y coordinate of this RoundRectangle2D.

Constructor Summary

AccessConstructor and Description
public
Float()

Constructs a new RoundRectangle2D, initialized to location (0.0, 0.0), size (0.0, 0.0), and corner arcs of radius 0.0.

public
Float(float
the X coordinate of the newly constructed RoundRectangle2D
x
,
float
the Y coordinate of the newly constructed RoundRectangle2D
y
,
float
the width to which to set the newly constructed RoundRectangle2D
w
,
float
the height to which to set the newly constructed RoundRectangle2D
h
,
float
the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arcw
,
float
the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D
arch
)

Constructs and initializes a RoundRectangle2D from the specified float coordinates.

Method Summary

Modifier and TypeMethod and Description
public double
getArcHeight()

Implements abstract java.awt.geom.RoundRectangle2D.getArcHeight.

Gets the height of the arc that rounds off the corners.

public double
getArcWidth()

Implements abstract java.awt.geom.RoundRectangle2D.getArcWidth.

Gets the width of the arc that rounds off the corners.

public Rectangle2D
getBounds2D()

Implements java.awt.Shape.getBounds2D.

Returns a high precision and more accurate bounding box of the Shape than the getBounds method.

public double
getHeight()

Implements abstract java.awt.geom.RectangularShape.getHeight.

Returns the height of the framing rectangle in double precision.

public double
getWidth()

Implements abstract java.awt.geom.RectangularShape.getWidth.

Returns the width of the framing rectangle in double precision.

public double
getX()

Implements abstract java.awt.geom.RectangularShape.getX.

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

public double
getY()

Implements abstract java.awt.geom.RectangularShape.getY.

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

public boolean
isEmpty()

Implements abstract java.awt.geom.RectangularShape.isEmpty.

Determines whether the RectangularShape is empty.

public void
setRoundRect(float
the X coordinate to which to set the location of this RoundRectangle2D
x
,
float
the Y coordinate to which to set the location of this RoundRectangle2D
y
,
float
the width to which to set this RoundRectangle2D
w
,
float
the height to which to set this RoundRectangle2D
h
,
float
the width to which to set the arc of this RoundRectangle2D
arcw
,
float
the height to which to set the arc of this RoundRectangle2D
arch
)

Sets the location, size, and corner radii of this RoundRectangle2D to the specified float values.

public void
setRoundRect(double x, double y, double w, double h, double arcw, double arch)

Implements abstract java.awt.geom.RoundRectangle2D.setRoundRect.

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

public void
setRoundRect(RoundRectangle2D rr)

Overrides java.awt.geom.RoundRectangle2D.setRoundRect.

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Inherited from java.awt.geom.RoundRectangle2D:
containscontainsequalsgetPathIteratorhashCodeintersectssetFrame

Field Detail

archeightback to summary
public float archeight

The height of the arc that rounds off the corners.

Since
1.2
arcwidthback to summary
public float arcwidth

The width of the arc that rounds off the corners.

Since
1.2
heightback to summary
public float height

The height of this RoundRectangle2D.

Since
1.2
serialVersionUIDback to summary
private static final long serialVersionUID

Use serialVersionUID from JDK 1.6 for interoperability.

Annotations
@Serial
widthback to summary
public float width

The width of this RoundRectangle2D.

Since
1.2
xback to summary
public float x

The X coordinate of this RoundRectangle2D.

Since
1.2
yback to summary
public float y

The Y coordinate of this RoundRectangle2D.

Since
1.2

Constructor Detail

Floatback to summary
public Float()

Constructs a new RoundRectangle2D, initialized to location (0.0, 0.0), size (0.0, 0.0), and corner arcs of radius 0.0.

Since
1.2
Floatback to summary
public Float(float x, float y, float w, float h, float arcw, float arch)

Constructs and initializes a RoundRectangle2D from the specified float coordinates.

Parameters
x:float

the X coordinate of the newly constructed RoundRectangle2D

y:float

the Y coordinate of the newly constructed RoundRectangle2D

w:float

the width to which to set the newly constructed RoundRectangle2D

h:float

the height to which to set the newly constructed RoundRectangle2D

arcw:float

the width of the arc to use to round off the corners of the newly constructed RoundRectangle2D

arch:float

the height of the arc to use to round off the corners of the newly constructed RoundRectangle2D

Since
1.2

Method Detail

getArcHeightback to summary
public double getArcHeight()

Implements abstract java.awt.geom.RoundRectangle2D.getArcHeight.

Doc from java.awt.geom.RoundRectangle2D.getArcHeight.

Gets the height of the arc that rounds off the corners.

Since
1.2
getArcWidthback to summary
public double getArcWidth()

Implements abstract java.awt.geom.RoundRectangle2D.getArcWidth.

Doc from java.awt.geom.RoundRectangle2D.getArcWidth.

Gets the width of the arc that rounds off the corners.

Since
1.2
getBounds2Dback to summary
public Rectangle2D getBounds2D()

Implements java.awt.Shape.getBounds2D.

Doc from java.awt.Shape.getBounds2D.

Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.

Note that the definition of insideness can lead to situations where points on the defining outline of the shape may not be considered contained in the returned bounds object, but only in cases where those points are also not considered contained in the original shape.

If a point is inside the shape according to the contains(point) method, then it must be inside the returned Rectangle2D bounds object according to the contains(point) method of the bounds. Specifically:

shape.contains(p) requires bounds.contains(p)

If a point is not inside the shape, then it might still be contained in the bounds object:

bounds.contains(p) does not imply shape.contains(p)

Since
1.2
getHeightback to summary
public double getHeight()

Implements abstract java.awt.geom.RectangularShape.getHeight.

Doc from java.awt.geom.RectangularShape.getHeight.

Returns the height of the framing rectangle in double precision.

Since
1.2
getWidthback to summary
public double getWidth()

Implements abstract java.awt.geom.RectangularShape.getWidth.

Doc from java.awt.geom.RectangularShape.getWidth.

Returns the width of the framing rectangle in double precision.

Since
1.2
getXback to summary
public double getX()

Implements abstract java.awt.geom.RectangularShape.getX.

Doc from java.awt.geom.RectangularShape.getX.

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

Since
1.2
getYback to summary
public double getY()

Implements abstract java.awt.geom.RectangularShape.getY.

Doc from java.awt.geom.RectangularShape.getY.

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

Since
1.2
isEmptyback to summary
public boolean isEmpty()

Implements abstract java.awt.geom.RectangularShape.isEmpty.

Doc from java.awt.geom.RectangularShape.isEmpty.

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

Since
1.2
setRoundRectback to summary
public void setRoundRect(float x, float y, float w, float h, float arcw, float arch)

Sets the location, size, and corner radii of this RoundRectangle2D to the specified float values.

Parameters
x:float

the X coordinate to which to set the location of this RoundRectangle2D

y:float

the Y coordinate to which to set the location of this RoundRectangle2D

w:float

the width to which to set this RoundRectangle2D

h:float

the height to which to set this RoundRectangle2D

arcw:float

the width to which to set the arc of this RoundRectangle2D

arch:float

the height to which to set the arc of this RoundRectangle2D

Since
1.2
setRoundRectback to summary
public void setRoundRect(double x, double y, double w, double h, double arcw, double arch)

Implements abstract java.awt.geom.RoundRectangle2D.setRoundRect.

Doc from java.awt.geom.RoundRectangle2D.setRoundRect.

Sets the location, size, and corner radii of this RoundRectangle2D to the specified double values.

Since
1.2
setRoundRectback to summary
public void setRoundRect(RoundRectangle2D rr)

Overrides java.awt.geom.RoundRectangle2D.setRoundRect.

Doc from java.awt.geom.RoundRectangle2D.setRoundRect.

Sets this RoundRectangle2D to be the same as the specified RoundRectangle2D.

Since
1.2