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 ShapeStack controlled  
    private DrawingPanel effectedPanel  
    private java.util.Stack<MyShape> redoStack  
  • Constructor Summary

    Constructors 
    Constructor Description
    StackController​(ShapeStack stack, DrawingPanel effectedPanel)  
  • Method Summary

    Modifier and Type Method Description
    void clear()
    clear the screen
    private void finishChange()  
    void insert​(MyShape shape)
    insert new shape into the stack
    void redo()  
    void undo()
    undo the last user drawing

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait