org.jhotdraw.standard
Class FigureTransferCommand
java.lang.Object
org.jhotdraw.standard.AbstractCommand
org.jhotdraw.standard.FigureTransferCommand
- All Implemented Interfaces:
- Command, FigureSelectionListener
- Direct Known Subclasses:
- CopyCommand, CutCommand, DeleteCommand, DuplicateCommand, PasteCommand
- public abstract class FigureTransferCommand
- extends AbstractCommand
Common base clase for commands that transfer figures
between a drawing and the clipboard.
- Version:
- <$CURRENT_VERSION$>
Methods inherited from class org.jhotdraw.standard.AbstractCommand |
addCommandListener, createEventDispatcher, createViewChangeListener, dispose, execute, figureSelectionChanged, getDrawingEditor, getEventDispatcher, getUndoActivity, isExecutable, isExecutableWithView, isViewRequired, name, removeCommandListener, setName, setUndoActivity, view, viewCreated, viewDestroying, viewSelectionChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FigureTransferCommand
protected FigureTransferCommand(java.lang.String name,
DrawingEditor newDrawingEditor)
- Constructs a drawing command.
- Parameters:
name
- the command namenewDrawingEditor
- the DrawingEditor which manages the views
deleteFigures
protected void deleteFigures(FigureEnumeration fe)
- Deletes the selection from the drawing.
copyFigures
protected void copyFigures(FigureEnumeration fe,
int figureCount)
- Copies the FigureEnumeration to the clipboard.
insertFigures
public FigureEnumeration insertFigures(FigureEnumeration fe,
int dx,
int dy)
- Inserts an enumeration of figures and translates them by the
given offset.