JHotDraw 6.0b1

Class FigureTransferCommand

  extended by org.jhotdraw.standard.AbstractCommand
      extended by org.jhotdraw.standard.FigureTransferCommand
All Implemented Interfaces:
FigureSelectionListener, Command
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.

Nested Class Summary
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractCommand
Constructor Summary
protected FigureTransferCommand(java.lang.String name, DrawingEditor newDrawingEditor)
          Constructs a drawing command.
Method Summary
protected  void copyFigures(FigureEnumeration fe, int figureCount)
          Copies the FigureEnumeration to the clipboard.
protected  void deleteFigures(FigureEnumeration fe)
          Deletes the selection from the drawing.
 FigureEnumeration insertFigures(FigureEnumeration fe, int dx, int dy)
          Inserts an enumeration of figures and translates them by the given offset.
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

Constructor Detail


protected FigureTransferCommand(java.lang.String name,
                                DrawingEditor newDrawingEditor)
Constructs a drawing command.

name - the command name
newDrawingEditor - the DrawingEditor which manages the views
Method Detail


protected void deleteFigures(FigureEnumeration fe)
Deletes the selection from the drawing.


protected void copyFigures(FigureEnumeration fe,
                           int figureCount)
Copies the FigureEnumeration to the clipboard.


public FigureEnumeration insertFigures(FigureEnumeration fe,
                                       int dx,
                                       int dy)
Inserts an enumeration of figures and translates them by the given offset.

JHotDraw 6.0b1