2,2c2,2 < * @(#)DuplicateCommand.java 5.2 --- > * @(#)DuplicateCommand.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 7a15,15 > import CH.ifa.draw.util.*; 8,8c16,16 < import java.util.*; --- > import java.util.*; 9,9d16 < import CH.ifa.draw.util.*; 13a20,21 > * > * @version <$CURRENT_VERSION$> 26a35,36 > setUndoActivity(createUndoActivity()); > FigureSelection selection = view().getFigureSelection(); 27,29d34 < FigureSelection selection = fView.getFigureSelection(); < < fView.clearSelection(); 30a38,45 > // create duplicate figure(s) > FigureEnumeration figures = (FigureEnumeration)selection.getData(StandardFigureSelection.TYPE); > getUndoActivity().setAffectedFigures(figures); > > view().clearSelection(); > getUndoActivity().setAffectedFigures( > insertFigures(getUndoActivity().getAffectedFigures(), 10, 10)); > view().checkDamage(); 31,33d37 < Vector figures = (Vector)selection.getData(FigureSelection.TYPE); < insertFigures(figures, 10, 10); < fView.checkDamage(); 37,37c49,49 < return fView.selectionCount() > 0; --- > return view().selectionCount() > 0; 39a52,57 > /** > * Factory method for undo activity > */ > protected Undoable createUndoActivity() { > return new PasteCommand.UndoActivity(view()); > } 41,42d58 < <