SHARE
TWEET

Untitled

AishaAli Nov 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /*
  3.   @(#)DuplicateCommand.java 5.2
  4.   */
  5.  
  6. package CH.ifa.draw.standard;
  7.  
  8. import java.util.*;
  9. import CH.ifa.draw.util.*;
  10. import CH.ifa.draw.framework.*;
  11.  
  12. public class DuplicateCommand extends FigureTransferCommand {
  13.  
  14.     public DuplicateCommand(String name, DrawingView view) {
  15.         super(name, view);
  16.     }
  17.  
  18.     public void execute() {
  19.         FigureSelection selection = fView.getFigureSelection();
  20.  
  21.         fView.clearSelection();
  22.  
  23.         Vector figures = (Vector)selection.getData(FigureSelection.TYPE);
  24.         insertFigures(figures, 10, 10);
  25.         fView.checkDamage();
  26.     }
  27.  
  28.     public boolean isExecutable() {
  29.         return fView.selectionCount() > 0;
  30.     }
  31.  
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top