|
|||||||||
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.G3DRect
public class G3DRect
The G3DRect
class is used to represent a rectangle whose
borders are drawn to create a three-dimensional effect. The
G3DRect
class is a subclass of
GRect
, and therefore
implements all the methods defined for that class. In addition, the
G3DRect
class supports the following methods:
|
The appearance of a G3DRect
object depends on the system on
which it is displayed and is typically more effective if the
G3DRect
is filled.
Constructor Summary | |
---|---|
G3DRect(double width,
double height)
Constructs a new 3D rectangle with the specified width and height, positioned at the origin. |
|
G3DRect(double x,
double y,
double width,
double height)
Constructs a new 3D rectangle with the specified bounds. |
|
G3DRect(double x,
double y,
double width,
double height,
boolean raised)
Constructs a new 3D rectangle with the specified bounds which is raised if the final parameter is true . |
Method Summary | |
---|---|
boolean |
isRaised()
Tests whether this object appears raised. |
void |
paint(Graphics g)
Implements the paint operation for this graphical object. |
void |
setRaised(boolean raised)
Sets whether this object appears raised. |
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 |
Constructor Detail |
---|
public G3DRect(double width, double height)
width
- The width of the rectangle in pixelsheight
- The height of the rectangle in pixelspublic G3DRect(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 G3DRect(double x, double y, double width, double height, boolean raised)
true
.
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 pixelsraised
- true
if this rectangle should appear raisedMethod Detail |
---|
public boolean isRaised()
true
if the object appears raised, false
otherwisepublic 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 donepublic void setRaised(boolean raised)
raised
- true
if the object appears raised, false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |