CH.ifa.draw.standard
Class PasteCommand

java.lang.Object
  extended by CH.ifa.draw.util.Command
      extended by CH.ifa.draw.standard.PasteCommand

public class PasteCommand
extends Command

Command to insert the clipboard into the drawing.

See Also:
Clipboard

Field Summary
protected  DrawingView fView
           
 
Constructor Summary
PasteCommand(java.lang.String name, DrawingView view)
          Constructs a paste command.
 
Method Summary
protected  void copySelection()
          Copies the selection to the clipboard.
protected  void deleteSelection()
          Deletes the selection from the drawing.
 void execute()
          Executes the command.
protected  void insertFigures(java.util.Vector figures, int dx, int dy)
          Inserts a vector of figures and translates them by the given offset.
 
Methods inherited from class CH.ifa.draw.util.Command
isExecutable, name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fView

protected DrawingView fView
Constructor Detail

PasteCommand

public PasteCommand(java.lang.String name,
                    DrawingView view)
Constructs a paste command.

Parameters:
name - the command name
image - the pathname of the image
view - the target view
Method Detail

execute

public void execute()
Description copied from class: Command
Executes the command.

Specified by:
execute in class Command

deleteSelection

protected void deleteSelection()
Deletes the selection from the drawing.


copySelection

protected void copySelection()
Copies the selection to the clipboard.


insertFigures

protected void insertFigures(java.util.Vector figures,
                             int dx,
                             int dy)
Inserts a vector of figures and translates them by the given offset.