Package commands
Class CmdToFront
- java.lang.Object
-
- commands.CmdToFront
-
-
Field Summary
Fields Modifier and Type Field Description private int
index
private DrawingModel
model
private Shape
shape
-
Constructor Summary
Constructors Constructor Description CmdToFront(DrawingModel model, Shape shape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Get index of shape, remove it from that position and add it to position at index greater by one.void
unexecute()
Get index of shape, remove it from previous position and return it to old position.
-
-
-
Field Detail
-
model
private DrawingModel model
-
shape
private Shape shape
-
index
private int index
-
-
Constructor Detail
-
CmdToFront
public CmdToFront(DrawingModel model, Shape shape)
-
-