DrawCanvas.java (constructor)
DrawCanvas(PolyDraw thePD) {
pd = thePD;
ct = pd.getControls();
theDrawnObjects = new Vector();
MouseHandlerForDrawCanvas mh =
new MouseHandlerForDrawCanvas();
addMouseListener(mh);
addMouseMotionListener(mh);
selectionRect = new SelectionRect();
selecting = false;
movingSelection = false;
selection = new Vector();
}
Previous slide
Next slide
Back to first slide
View graphic version