CLASS: DrawableShape
PURPOSE: Serve as a super class for other shape, force the subclass to have method
for drawing and editing.
IMPORT: java.awt.Graphics, java.awt.Color, java.util.Vector, Point
EXPORT: None, This is an abstract class with partial implementation.
CLASS: DrawPadDoc
PURPOSE: This class keep track of all the shapes and provide methods to
manipulate them
IMPORT: java.awt.Graphics, java.util.Vector, java.awt.Color, DrawableShape,
Point
EXPORT: New Class|DrawPadDoc New Method|DrawPadDoc, addShape,
copySelectedShape, deleteSelectedShape, drawAllShapes,
getSelectedShapeColor, moveSelectedPointBox, moveSelectedShapeToBack,
moveSelectedShapeToFront, moveShape, pasteShape, selectNextShape,
selectPointBox, selectedPreviousShape, selectShape,
setSelectedShapeColor, setShapeEndPoint, unSelectShape
CLASS: DrawPadView
PURPOSE: This class handle all the GUI action and this is also
the main class for the applet
IMPORT: java.awt.Color, java.applet.Applet, java.awt.Graphics,
java.awt.Image, java.awt.event.MouseEvent,
java.awt.event.MouseListener, java.awt.event.MouseMotionListener,
java.awt.event.KeyListener, java.awt.event.KeyEvent, Ellipse,
Rectangle, Line, Polygon, DrawableShape, DrawPadDoc, Point
EXPORT: New Class|DrawPadView New Method| init, keyPressed, keyReleased,
keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited,
mouseMoved, mousePressed, mouseReleased, paint, setSelectedColor,
update, drawBorder, drawColorBar, drawCurrentColor,
drawOptionBar
CLASS: Ellipse
PURPOSE: This class represent one of the shapes that can be drawn -- Ellipse
IMPORT: java.awt.Graphics, java.awt.Color, DrawableShape, Point
EXPORT: New Class|Ellipse New Method| Ellipse,
copyClone, hitTest, hitTestPointBox, paint
CLASS: Line
PURPOSE: This class represent one of the shapes that can be drawn -- Line
IMPORT: java.awt.Graphics, java.awt.Color, DrawableShape, Point
EXPORT: New Class|Line New Method| copyClone,
hitTest, hitTestPointBox, paint
CLASS: Point
PURPOSE: This class represent a point that contain an x y components
(both int)
IMPORT: None
EXPORT: New Class|Point New Methods|Point,copyClone
CLASS: Polygon
PURPOSE: This class represent one of the shapes that can be drawn -- Polygon
IMPORT: java.awt.Graphics, java.awt.Color, DrawableShape, Point
EXPORT: New Class|Polygon New Method| copyClone, hitTest,
hitTestPointBox, paint
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