public class GRoundRect extends GRect
GRoundRect
class is a graphical object whose appearance
consists of a rounded rectangle.Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ARC
The default arc diameter used for the corners of a rounded rectangle.
|
Constructor and Description |
---|
GRoundRect(double width,
double height)
Constructs a new rounded rectangle with the specified width and height,
positioned at the origin.
|
GRoundRect(double x,
double y,
double width,
double height)
Constructs a new rounded rectangle with the specified bounds.
|
GRoundRect(double x,
double y,
double width,
double height,
double arcSize)
Constructs a new rounded rectangle with the specified bounds and a single
parameter describing both the describing the curvature at the corners.
|
GRoundRect(double x,
double y,
double width,
double height,
double arcWidth,
double arcHeight)
Constructs a new rounded rectangle with the specified bounds and arc
parameters describing the curvature at the corners.
|
Modifier and Type | Method and Description |
---|---|
double |
getArcHeight()
Returns the y component of the corner radius.
|
double |
getArcWidth()
Returns the x component of the corner radius.
|
void |
paint(java.awt.Graphics g)
Implements the
paint operation for this graphical object. |
getAWTBounds, getBounds, getFillColor, getHeight, getSize, getWidth, isFilled, scale, scale, setBounds, setBounds, setFillColor, setFilled, setSize, setSize
addActionListener, addMouseListener, addMouseMotionListener, areMouseListenersEnabled, colorName, contains, contains, fireActionEvent, fireActionEvent, fireMouseListeners, getColor, getComponent, getLocation, getObjectColor, getParent, getX, getY, isVisible, move, movePolar, paintObject, paramString, pause, removeActionListener, removeMouseListener, removeMouseMotionListener, repaint, sendBackward, sendForward, sendToBack, sendToFront, setColor, setLocation, setLocation, setParent, setVisible, start, start, toString, updateEnabledList
public static final double DEFAULT_ARC
public GRoundRect(double width, double height)
width
- The width of the rectangle in pixelsheight
- The height of the rectangle in pixelspublic GRoundRect(double x, double y, double width, double height)
x
- The x-coordinate of the upper left cornery
- The y-coordinate of the upper left cornerwidth
- The width of the rectangle in pixelsheight
- The height of the rectangle in pixelspublic GRoundRect(double x, double y, double width, double height, double arcSize)
x
- The x-coordinate of the upper left cornery
- The y-coordinate of the upper left cornerwidth
- The width of the rectangle in pixelsheight
- The height of the rectangle in pixelsarcSize
- The diameter of the circle in place at each cornerpublic GRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
x
- The x-coordinate of the upper left cornery
- The y-coordinate of the upper left cornerwidth
- The width of the rectangle in pixelsheight
- The height of the rectangle in pixelsarcWidth
- The width of the oval in place at each cornerarcHeight
- The height of the oval in place at each cornerpublic double getArcWidth()
public double getArcHeight()