uk.ac.kcl.cch.jb.pliny.commands
Class PastePlinyCommand

java.lang.Object
  extended byorg.eclipse.gef.commands.Command
      extended byuk.ac.kcl.cch.jb.pliny.commands.PastePlinyCommand

public class PastePlinyCommand
extends org.eclipse.gef.commands.Command

handles the paste part of a copy/paste operation, for pasting into the reference/annotation area.

Author:
John Bradley

Constructor Summary
PastePlinyCommand(Resource myMainResource, Collection items)
          constructs an instance of this command so that the collecion of objects in items is placed in the reference/annotation area for the resource myMainResource.
PastePlinyCommand(Resource myMainResource, Collection items, boolean allowAnchors)
          constructs an instance of this command so that the collecion of objects in items is placed in the reference/annotation area for the resource myMainResource.
 
Method Summary
 void execute()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PastePlinyCommand

public PastePlinyCommand(Resource myMainResource,
                         Collection items)
constructs an instance of this command so that the collecion of objects in items is placed in the reference/annotation area for the resource myMainResource. The list of items in items may contain either Resources or LinkableObjects. Anchor objects (LinkableObjects that do not have a Surrogate) are not copied when the command is created with this constructor.

Parameters:
myMainResource - destination Resource for the objects
items - list of Resources or LinkableObjects to be pasted.

PastePlinyCommand

public PastePlinyCommand(Resource myMainResource,
                         Collection items,
                         boolean allowAnchors)
constructs an instance of this command so that the collecion of objects in items is placed in the reference/annotation area for the resource myMainResource. The list of items in items may contain either Resources or LinkableObjects. Anchors will be copied if allowAnchors is true.

Parameters:
myMainResource - destination Resource for the objects
items - list of Resources or LinkableObjects to be pasted.
allowAnchors - set true to request pasting of Anchor type LinkableObjects.
Method Detail

execute

public void execute()

undo

public void undo()

redo

public void redo()