Method Summary |
GRectangle |
getBounds()
Returns the bounding box of this object. |
Color |
getFillColor()
Returns the color used to display the filled region of this object. |
double |
getHeight()
Returns the height of this object as a double-precision value, which
is defined to be the height of the bounding box. |
GDimension |
getSize()
Returns the size of this object as a GDimension . |
double |
getWidth()
Returns the width of this object as a double-precision value, which
is defined to be the width of the bounding box. |
boolean |
isFilled()
Returns whether this object is filled. |
void |
scale(double sf)
Scales the object on the screen by the scale factor sf , which applies
in both dimensions. |
void |
scale(double sx,
double sy)
Scales the object on the screen by the scale factors sx and sy . |
void |
setBounds(double x,
double y,
double width,
double height)
Changes the bounds of this object to the specified values. |
void |
setBounds(GRectangle bounds)
Changes the bounds of this object to the values from the specified
GRectangle . |
void |
setFillColor(Color color)
Sets the color used to display the filled region of this object. |
void |
setFilled(boolean fill)
Sets whether this object is filled. |
void |
setSize(double width,
double height)
Changes the size of this object to the specified width and height. |
Inherited Method Summary |
void | addMouseListener(MouseListener listener)
Adds a mouse listener to this graphical object.
|
void | addMouseMotionListener(MouseMotionListener listener)
Adds a mouse motion listener to this graphical object.
|
boolean | contains(GPoint pt)
Checks to see whether a point is inside the object.
|
boolean | contains(double x, double y)
Checks to see whether a point is inside the object.
|
Color | getColor()
Returns the color used to display this object.
|
GPoint | getLocation()
Returns the location of this object as a GPoint .
|
double | getX()
Returns the x-coordinate of the object.
|
double | getY()
Returns the y-coordinate of the object.
|
boolean | isVisible()
Checks to see whether this object is visible.
|
void | move(double dx, double dy)
Moves the object on the screen using the displacements dx and dy .
|
void | movePolar(double r, double theta)
Moves the object using displacements given in polar coordinates.
|
void | removeMouseListener(MouseListener listener)
Removes a mouse listener from this graphical object.
|
void | removeMouseMotionListener(MouseMotionListener listener)
Removes a mouse motion listener from this graphical object.
|
void | sendBackward()
Moves this object one step toward the back in the z dimension.
|
void | sendForward()
Moves this object one step toward the front in the z dimension.
|
void | sendToBack()
Moves this object to the back of the display in the z dimension.
|
void | sendToFront()
Moves this object to the front of the display in the z dimension.
|
void | setColor(Color color)
Sets the color used to display this object.
|
void | setLocation(GPoint pt)
Sets the location of this object to the specified point.
|
void | setLocation(double x, double y)
Sets the location of this object to the point (x , y ).
|
void | setVisible(boolean visible)
Sets whether this object is visible.
|