- 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 DeleteCmd extends Command{
- public void executeClick(Point p, Drawing dwg) {
- Shape wantedshape= dwg.getFrontmostContainer(p);
- dwg.a.remove(wantedshape);
- }
- }