Package commands
Class CmdRemoveShape
- java.lang.Object
-
- commands.CmdRemoveShape
-
-
Constructor Summary
Constructors Constructor Description CmdRemoveShape(java.util.ArrayList<Shape> shapes, DrawingModel model)
CmdRemoveShape(Shape shape, DrawingModel model)
-
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.
-
-
-
Field Detail
-
shapes
private java.util.ArrayList<Shape> shapes
-
shape
private Shape shape
-
model
private DrawingModel model
-
-
Constructor Detail
-
CmdRemoveShape
public CmdRemoveShape(java.util.ArrayList<Shape> shapes, DrawingModel model)
-
CmdRemoveShape
public CmdRemoveShape(Shape shape, DrawingModel model)
-
-
Method Detail
-
execute
public void execute()
Remove shape from the draw.
-
unexecute
public void unexecute()
Return previous deleted shape to the draw.
-
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:
-
-