Back to index

moin  1.9.0~rc2
DeleteCommand.java
Go to the documentation of this file.
00001 /*
00002  * @(#)DeleteCommand.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.standard;
00007 
00008 import java.util.*;
00009 import CH.ifa.draw.util.Command;
00010 import CH.ifa.draw.framework.*;
00011 
00015 public class DeleteCommand extends FigureTransferCommand {
00016 
00022     public DeleteCommand(String name, DrawingView view) {
00023         super(name, view);
00024     }
00025 
00026     public void execute() {
00027         deleteSelection();
00028         fView.checkDamage();
00029     }
00030 
00031     public boolean isExecutable() {
00032         return fView.selectionCount() > 0;
00033     }
00034 
00035 }
00036 
00037