|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object acm.graphics.GObject acm.graphics.GRect acm.graphics.GRoundRect
public class GRoundRect
The GRoundRect
class is a graphical object whose appearance consists
of a rounded rectangle.
Field Summary | |
---|---|
static double |
DEFAULT_ARC
The default arc diameter used for the corners of a rounded rectangle. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
double |
getArcHeight()
Returns the y component of the corner radius. |
double |
getArcWidth()
Returns the x component of the corner radius. |
void |
paint(Graphics g)
Implements the paint operation for this graphical object. |
Methods inherited from class acm.graphics.GRect |
---|
getAWTBounds, getBounds, getFillColor, getHeight, getSize, getWidth, isFilled, scale, scale, setBounds, setBounds, setFillColor, setFilled, setSize, setSize |
Methods inherited from class acm.graphics.GObject |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_ARC
Constructor Detail |
---|
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 cornerMethod Detail |
---|
public double getArcHeight()
public double getArcWidth()
public void paint(Graphics g)
paint
operation for this graphical object. This method
is not called directly by clients.
paint
in class GRect
g
- The graphics context into which the painting is done
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |