Package Painting
Class StackController
java.lang.Object
Painting.StackController
public class StackController
extends java.lang.Object
send commands to the shape stack and update the drawing panel after the command have been done.
- Author:
- Itay Finci
-
Field Summary
Fields Modifier and Type Field Description private ShapeStackcontrolledprivate DrawingPaneleffectedPanelprivate java.util.Stack<MyShape>redoStack -
Constructor Summary
Constructors Constructor Description StackController(ShapeStack stack, DrawingPanel effectedPanel) -
Method Summary
-
Field Details
-
Constructor Details
-
Method Details
-
undo
public void undo()undo the last user drawing -
redo
public void redo() -
clear
public void clear()clear the screen -
insert
insert new shape into the stack- Parameters:
shape- the new shape that needs to be inserted
-
finishChange
private void finishChange()
-