Method Summary |
boolean |
contains(double x,
double y)
Checks to see whether a point is inside the object. |
GRectangle |
getBounds()
Returns the bounding box for this object. |
GPoint |
getEndPoint()
Returns the end point of the line as a GPoint object. |
GPoint |
getStartPoint()
Returns the coordinates of the initial point in the line. |
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 line on the screen by the scale factors sx and sy . |
void |
setEndPoint(double x,
double y)
Sets the end point of the line to the point (x , y ). |
void |
setStartPoint(double x,
double y)
Sets the initial point in the line to (x , y ),
leaving the end point unchanged. |
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.
|
Color | getColor()
Returns the color used to display this object.
|
boolean | isVisible()
Checks to see whether this object is visible.
|
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 | setVisible(boolean visible)
Sets whether this object is visible.
|