A B C D G I L M O P R S

A

actionPerformed(ActionEvent) - Method in class DrawingBoard
on the button click: if shape button is pressed, set the shape to be drawn if clear button is pressed, remove objects from vector and repaint if undo button is pressed, remove last odject from vector and repaint

B

b_circle - Variable in class DrawingBoard
declair window controls
b_clear - Variable in class DrawingBoard
declair window controls
b_line - Variable in class DrawingBoard
declair window controls
b_polygon - Variable in class DrawingBoard
declair window controls
b_rectangle - Variable in class DrawingBoard
declair window controls
b_undo - Variable in class DrawingBoard
declair window controls

C

checkbox_filled - Variable in class DrawingBoard
 
choice_back_color - Variable in class DrawingBoard
 
choice_shape_color - Variable in class DrawingBoard
 
controls1 - Variable in class DrawingBoard
 
controls2 - Variable in class DrawingBoard
 
currentShape - Variable in class DrawingBoard
declare variable to hold the current shape, initialize to oval

D

DrawCircle - class DrawCircle.
Extends Abstract class DrawObj, used for drawing triangle
DrawCircle(int, int, int, int, boolean, Color) - Constructor for class DrawCircle
call constructor of the parent class DrawObj
DrawingBoard - class DrawingBoard.
Drawing Board with controls allows to draw oval, rectangle, line and triangle extends Applet implements ActionListener for button controls, implements ItemListener for choice boxes, implements MouseMotionListener for rubber band drawing implements MouseListener for finishing the drawing
DrawingBoard() - Constructor for class DrawingBoard
 
DrawLine - class DrawLine.
Extends Abstract class DrawObj, used for drawing rectangle
DrawLine(int, int, int, int, boolean, Color) - Constructor for class DrawLine
call constructor of the parent class DrawObj
DrawObj - class DrawObj.
abstract class from which all shapes will be descendants
DrawObj(int, int, int, int, boolean, Color) - Constructor for class DrawObj
contructor used for circle, rectangle and line
DrawObj(Point, Point, Point, boolean, Color) - Constructor for class DrawObj
contructor used for polygon
DrawPolygon - class DrawPolygon.
Extends Abstract class DrawObj, used for drawing triangle
DrawPolygon(Point, Point, Point, boolean, Color) - Constructor for class DrawPolygon
call constructor of the parent class DrawObj
DrawRect - class DrawRect.
Extends Abstract class DrawObj, used for drawing rectangle
DrawRect(int, int, int, int, boolean, Color) - Constructor for class DrawRect
call constructor of the parent class DrawObj
drawRubberBand(int, int, int, int) - Method in class DrawingBoard
draw the rubberband shape, by first erasing the previous, as mouse is dragged, then save the last points for the redraw on the next pass
drawShape(Graphics) - Method in class DrawObj
method to be overridden by descendants
drawShape(Graphics) - Method in class DrawCircle
 
drawShape(Graphics) - Method in class DrawRect
 
drawShape(Graphics) - Method in class DrawLine
 
drawShape(Graphics) - Method in class DrawPolygon
 

G

getColor() - Method in class DrawObj
getting color of the object to be drawn

I

init() - Method in class DrawingBoard
initialization sets up the screen and controls
itemStateChanged(ItemEvent) - Method in class DrawingBoard
this is used to change background color from the choice_back_color box

L

LINE - Static variable in class DrawingBoard
 

M

mouseClicked(MouseEvent) - Method in class DrawingBoard
When drawing a triangle and mouse is clicked, use the saved points to call the drawShape method for the triangle.
mouseDragged(MouseEvent) - Method in class DrawingBoard
when mouse is dragged: if drawing a triangle and mouse has been released before, call mouseMove event logic; set the coordinates and call drawRubberBand
mouseEntered(MouseEvent) - Method in class DrawingBoard
displays a message on the status bar
mouseExited(MouseEvent) - Method in class DrawingBoard
since event handling is implemented directly, have to implement all
mouseMoved(MouseEvent) - Method in class DrawingBoard
draw the rubberband shape for the triangle, by first erasing the previous, as mouse moves, then save the previous points for the redraw on the next pass
mousePressed(MouseEvent) - Method in class DrawingBoard
assign coordinates of initial point of the shape
mouseReleased(MouseEvent) - Method in class DrawingBoard
When mouse is released, use the final point to call the drawShape method for the selected shape.

O

OVAL - Static variable in class DrawingBoard
assign constants to be used in a switch statement that will determine the shape

P

paint(Graphics) - Method in class DrawingBoard
paintMethod - tell all shape objects in the Vector to repaint themselves.
POLYGON - Static variable in class DrawingBoard
 

R

RECTANGLE - Static variable in class DrawingBoard
 

S

shapeObjects - Variable in class DrawingBoard
create Vector object to hold the shape objects for repainting purposes

A B C D G I L M O P R S