|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--DrawableShape
|
+--Rectangle
CLASS: Rectangle
PURPOSE: This class represent one of the shapes that can be drawn -- Rectangle
IMPORT: java.awt.Graphics, java.awt.Color, DrawableShape, Point
EXPORT: New Class|Rectangle
New Method| Rectangle,
copyClone, hitTest, hitTestPointBox, paint
| Fields inherited from class DrawableShape |
bFill, bSelected, color, pointList, xPointChange, yPointChange |
| Constructor Summary | |
Rectangle(Point startPoint,
Point endPoint)
PRE: None POST: Initialize all the variables needed for Rectangle shape |
|
| Method Summary | |
DrawableShape |
copyClone()
PRE: None POST: A new DrawableShape object is copy from the current instance and returned |
boolean |
hitTest(Point p)
PRE: A valid Point Object POST: Check to see if the point hit the shape |
boolean |
hitTestPointBox(Point p)
PRE: A valid Point Object POST: Check to see if the point hit the shape's PointBox if it has been selected |
void |
paint(java.awt.Graphics g)
PRE: A valid Graphics object to paint on POST: Current object will be draw using the Graphics object |
| Methods inherited from class DrawableShape |
addPoint, getColor, getLeastX, getLeastY, move, movePointBox, removeLastPoint, setColor, setEndPoint, setFill, setSelected, setStartPoint |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Rectangle(Point startPoint,
Point endPoint)
| Method Detail |
public DrawableShape copyClone()
copyClone in class DrawableShapepublic void paint(java.awt.Graphics g)
paint in class DrawableShapepublic boolean hitTest(Point p)
hitTest in class DrawableShapepublic boolean hitTestPointBox(Point p)
hitTestPointBox in class DrawableShape
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||