2,2c2,2 < * @(#)FigureTransferCommand.java 5.2 --- > * @(#)FigureTransferCommand.java 3a4,9 > * Project: JHotdraw - a GUI framework for technical drawings > * http://www.jhotdraw.org > * http://jhotdraw.sourceforge.net > * Copyright: © by the original author(s) and all contributors > * License: Lesser GNU Public License (LGPL) > * http://www.opensource.org/licenses/lgpl-license.html 14a21,22 > * > * @version <$CURRENT_VERSION$> 16,16c24,24 < abstract class FigureTransferCommand extends Command { --- > public abstract class FigureTransferCommand extends AbstractCommand { 17,18d24 < < protected DrawingView fView; 26,26c32,32 < super(name); --- > super(name, view); 27,27d32 < fView = view; 32a38,43 > protected void deleteFigures(FigureEnumeration fe) { > while (fe.hasMoreElements()) { > view().drawing().orphan(fe.nextFigure()); > } > > view().clearSelection(); 33,35d37 < protected void deleteSelection() { < fView.drawing().removeAll(fView.selection()); < fView.clearSelection(); 39,39c47,47 < * Copies the selection to the clipboard. --- > * Copies the FigureEnumeration to the clipboard. 40a49,50 > protected void copyFigures(FigureEnumeration fe, int figureCount) { > Clipboard.getClipboard().setContents(new StandardFigureSelection(fe, figureCount)); 41,43d48 < protected void copySelection() { < FigureSelection selection = fView.getFigureSelection(); < Clipboard.getClipboard().setContents(selection); 49a57,58 > FigureEnumeration insertFigures(FigureEnumeration fe, int dx, int dy) { > return view().insertFigures(fe, dx, dy, false); 50,57d56 < protected void insertFigures(Vector figures, int dx, int dy) { < FigureEnumeration e = new FigureEnumerator(figures); < while (e.hasMoreElements()) { < Figure figure = e.nextFigure(); < figure.moveBy(dx, dy); < figure = fView.add(figure); < fView.addToSelection(figure); < } 59,59d59 <