- package cn.edu.nju.software.grapheditor.cmd;
- import java.awt.Point;
- import cn.edu.nju.software.grapheditor.Drawing;
- import cn.edu.nju.software.grapheditor.shape.Shape;
- public class BackCmd extends Command{
- Shape s;
- public void executeClick(Point p, Drawing dwg){
- s= dwg.getFrontmostContainer(p);
- if(s!=null){
- for(int i=dwg.a.indexOf(s);i>0;i--){
- dwg.a.set(i, dwg.a.get(i-1));
- }
- dwg.a.set(0,s);
- }
- }
- }