コード例 #1
0
 public void execute() {
   Point lastClick = view().lastClick();
   FigureSelection selection = (FigureSelection) Clipboard.getClipboard().getContents();
   if (selection != null) {
     FigureEnumerator affectedFigures =
         (FigureEnumerator) selection.getData(StandardFigureSelection.TYPE);
     if (! /*@AJHD getUndoActivity().getAffectedFigures()*/affectedFigures.hasNextFigure()) {
       return;
     }
     Rectangle r = getBounds(affectedFigures);
     affectedFigures.reset();
     view().clearSelection();
     FigureEnumeration fe = insertFigures(affectedFigures, lastClick.x - r.x, lastClick.y - r.y);
   }
 }
コード例 #2
0
 public boolean isExecutableWithView() {
   return Clipboard.getClipboard().getContents() != null;
 }