Back to index

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