- 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 FrontCmd extends Command{
- Shape s;
- public void executeClick(Point p,Drawing dwg){
- s=dwg.getFrontmostContainer(p);
- if(s!=null){
- dwg.a.remove(s);
- dwg.a.add(s);
- }
- }
- }