Class java.awt.geom.RoundRectangle2D.Double
java.lang.Object
|
+----java.awt.geom.RectangularShape
|
+----java.awt.geom.RoundRectangle2D
|
+----java.awt.geom.RoundRectangle2D.Double
- public static class RoundRectangle2D.Double
- extends RoundRectangle2D
A rectangle with rounded corners all specified in double coordinates.
Field Summary
|
double
|
archeight
The height of the arc that rounds off the corners.
|
double
|
arcwidth
The width of the arc that rounds off the corners.
|
double
|
height
The height of the rectangle.
|
double
|
width
The width of the rectangle.
|
double
|
x
The x coordinate of the rectangle.
|
double
|
y
The y coordinate of the rectangle.
|
Constructor Summary
|
RoundRectangle2D.Double()
Constructs a new rounded rectangle,
initialized to location (0.0, 0.0),
size (0.0, 0.0),
and corner arcs of radius 0.0.
|
RoundRectangle2D.Double(double x,
double y,
double w,
double h,
double arcw,
double arch)
Constructs and initializes a rectangle from the
specified coordinates.
|
Method Summary
|
double
|
getArcHeight()
Gets the height of the arc that rounds off the corners.
|
double
|
getArcWidth()
Gets the width of the arc that rounds off the corners.
|
Rectangle2D
|
getBounds2D()
Return the high precision bounding box of the shape.
|
double
|
getHeight()
Returns the height of the rounded rectangle in double precision.
|
double
|
getWidth()
Returns the width of the rounded rectangle in
double precision.
|
double
|
getX()
Returns the X coordinate of the rounded rectangle in
double precision.
|
double
|
getY()
Returns the Y coordinate of the rounded rectangle in
double precision.
|
boolean
|
isEmpty()
Determines whether the rounded rectangle is empty.
|
void
|
setRoundRect(double x,
double y,
double w,
double h,
double arcw,
double arch)
Sets the location, size, and arc radii of this rectangle to the
specified double values.
|
void
|
setRoundRect(RoundRectangle2D rr)
Sets this rounded rectangle to be the same as the specified
RoundRectangle.
|
Methods inherited from class java.awt.geom.RectangularShape
|
clone, contains, contains, getBottom, getBounds, getCenterX, getCenterY, getHeight, getLeft, getPathIterator, getRight, getTop, getWidth, getX, getY, intersects, isEmpty, setBounds, setBounds, setBounds, setBoundsFromCenter, setBoundsFromCenter, setBoundsFromDiagonal, setBoundsFromDiagonal |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
public double x
- The x coordinate of the rectangle.
y
public double y
- The y coordinate of the rectangle.
width
public double width
- The width of the rectangle.
height
public double height
- The height of the rectangle.
arcwidth
public double arcwidth
- The width of the arc that rounds off the corners.
archeight
public double archeight
- The height of the arc that rounds off the corners.
RoundRectangle2D.Double
public RoundRectangle2D.Double()
- Constructs a new rounded rectangle,
initialized to location (0.0, 0.0),
size (0.0, 0.0),
and corner arcs of radius 0.0.
RoundRectangle2D.Double
public RoundRectangle2D.Double(double x,
double y,
double w,
double h,
double arcw,
double arch)
- Constructs and initializes a rectangle from the
specified coordinates.
- Parameters:
x
- the x coordinate
y
- the y coordinate
width
- the width of the rectangle
height
- the height of the rectangle
getX
public double getX()
- Returns the X coordinate of the rounded rectangle in
double precision.
- Overrides:
- getX in class RectangularShape
getY
public double getY()
- Returns the Y coordinate of the rounded rectangle in
double precision.
- Overrides:
- getY in class RectangularShape
getWidth
public double getWidth()
- Returns the width of the rounded rectangle in
double precision.
- Overrides:
- getWidth in class RectangularShape
getHeight
public double getHeight()
- Returns the height of the rounded rectangle in double precision.
- Overrides:
- getHeight in class RectangularShape
getArcWidth
public double getArcWidth()
- Gets the width of the arc that rounds off the corners.
- Overrides:
- getArcWidth in class RoundRectangle2D
getArcHeight
public double getArcHeight()
- Gets the height of the arc that rounds off the corners.
- Overrides:
- getArcHeight in class RoundRectangle2D
isEmpty
public boolean isEmpty()
- Determines whether the rounded rectangle is empty.
- Overrides:
- isEmpty in class RectangularShape
setRoundRect
public void setRoundRect(double x,
double y,
double w,
double h,
double arcw,
double arch)
- Sets the location, size, and arc radii of this rectangle to the
specified double values.
- Overrides:
- setRoundRect in class RoundRectangle2D
setRoundRect
public void setRoundRect(RoundRectangle2D rr)
- Sets this rounded rectangle to be the same as the specified
RoundRectangle.
- Overrides:
- setRoundRect in class RoundRectangle2D
getBounds2D
public Rectangle2D getBounds2D()
- Return the high precision bounding box of the shape.
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.