public class GOval extends GObject implements acm.graphics.GFillable, GResizable
| Constructor and Description |
|---|
GOval(double d,
double d1) |
GOval(double d,
double d1,
double d2,
double d3) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(double d,
double d1)
Checks to see whether a point is inside the object.
|
GRectangle |
getBounds()
Returns the bounding box of this object, which is defined to be the
smallest rectangle that covers everything drawn by the figure.
|
Color |
getFillColor() |
acm.graphics.GDimension |
getSize()
Returns the size of the bounding box for this object.
|
boolean |
isFilled() |
protected void |
paint2d(Graphics2D graphics2d)
All subclasses of
GObject must define a paint2d
method which allows the object to draw itself on the Graphics
context passed in as the parameter g. |
void |
setBounds(double d,
double d1,
double d2,
double d3)
Changes the bounds of this object to the specified values.
|
void |
setBounds(GRectangle grectangle)
Changes the bounds of this object to the values from the specified
GRectangle. |
void |
setFillColor(Color color) |
void |
setFilled(boolean flag) |
void |
setSize(double d,
double d1)
Changes the size of this object to the specified width and height.
|
void |
setSize(acm.graphics.GDimension gdimension)
Changes the size of this object as specified by the
GDimension
object. |
addActionListener, addMouseListener, addMouseMotionListener, areMouseListenersEnabled, clone, colorName, colorName, colorNameFriendly, contains, createTransformedGraphics, fireActionEvent, fireActionEvent, fireMouseListeners, getBottomY, getCenterLocation, getCenterX, getCenterY, getColor, getComponent, getHeight, getLineWidth, getLocation, getMatrix, getObjectColor, getParent, getRightX, getWidth, getX, getY, intersects, isAntiAliasing, isVisible, move, movePolar, paint, paramString, pause, removeActionListener, removeMouseListener, removeMouseMotionListener, repaint, rotate, scale, scale, sendBackward, sendForward, sendToBack, sendToFront, setAntiAliasing, setBottomY, setCenterLocation, setCenterLocation, setCenterX, setCenterY, setColor, setLineWidth, setLocation, setLocation, setParent, setRightX, setVisible, setX, setY, start, start, toString, updateEnabledListpublic GOval(double d,
double d1)
public GOval(double d,
double d1,
double d2,
double d3)
public GRectangle getBounds()
GObjectgetLocation.
Given a GLabel object, for
example, getLocation
returns the coordinates of the point on the baseline at which the
string begins; getBounds, by contrast, returns a
rectangle that covers the entire window area occupied by the string.public boolean contains(double d,
double d1)
GObjectprotected void paint2d(Graphics2D graphics2d)
GObjectGObject must define a paint2d
method which allows the object to draw itself on the Graphics
context passed in as the parameter g.public void setFilled(boolean flag)
setFilled in interface acm.graphics.GFillablepublic boolean isFilled()
isFilled in interface acm.graphics.GFillablepublic void setFillColor(Color color)
setFillColor in interface acm.graphics.GFillablepublic Color getFillColor()
getFillColor in interface acm.graphics.GFillablepublic void setSize(double d,
double d1)
GResizablesetSize in interface GResizabled - The new width of the objectd1 - The new height of the objectpublic final void setSize(acm.graphics.GDimension gdimension)
GResizableGDimension
object.setSize in interface GResizablegdimension - A GDimension object specifying the new sizepublic acm.graphics.GDimension getSize()
GObjectpublic void setBounds(double d,
double d1,
double d2,
double d3)
GResizablesetBounds in interface GResizabled - The new x-coordinate for the objectd1 - The new y-coordinate for the objectd2 - The new width of the objectd3 - The new height of the objectpublic final void setBounds(GRectangle grectangle)
GResizableGRectangle.setBounds in interface GResizablegrectangle - A GRectangle specifying the new bounds