Package commands

Class CmdRemoveShape

  • All Implemented Interfaces:
    Command

    public class CmdRemoveShape
    extends java.lang.Object
    implements Command
    Class that represent command for remove existing shape from the draw.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Remove shape from the draw.
      int getSize()
      Return number of deleted shapes to undo/redo multiple commands from log at once if multiple shapes are deleted at once.
      void unexecute()
      Return previous deleted shape to the draw.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmdRemoveShape

        public CmdRemoveShape​(java.util.ArrayList<Shape> shapes,
                              DrawingModel model)
    • Method Detail

      • execute

        public void execute()
        Remove shape from the draw.
        Specified by:
        execute in interface Command
      • unexecute

        public void unexecute()
        Return previous deleted shape to the draw.
        Specified by:
        unexecute in interface Command
      • getSize

        public int getSize()
        Return number of deleted shapes to undo/redo multiple commands from log at once if multiple shapes are deleted at once.
        Returns: