DeleteCmd.java
上传用户:sdzznc
上传日期:2022-07-23
资源大小:51k
文件大小:0k
源码类别:

绘图程序

开发平台:

Java

  1. package cn.edu.nju.software.grapheditor.cmd;
  2. import java.awt.Point;
  3. import cn.edu.nju.software.grapheditor.Drawing;
  4. import cn.edu.nju.software.grapheditor.shape.Shape;
  5. public class DeleteCmd extends Command{
  6. public void executeClick(Point p, Drawing dwg) {
  7. Shape wantedshape= dwg.getFrontmostContainer(p);
  8. dwg.a.remove(wantedshape);
  9. }
  10. }