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

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

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

places a new LinkableObject in the reference/annotation area of a given Resource. The LinkableObject has been already created by the GEF CreateTool. It is the job of this command to place it in the appropriate place.

This used in the GEF policy ResourceObjectsXYLayoutPolicy.getCreateCommand(org.eclipse.gef.requests.CreateRequest) and ScalableImageXYLayoutEditPolicy.getCreateCommand(org.eclipse.gef.requests.CreateRequest)

Author:
John Bradley

Field Summary
static org.eclipse.draw2d.geometry.Dimension DEFAULT_DIMENSION
          a standard dimension for a new LinkableObject reference when closed
static org.eclipse.draw2d.geometry.Dimension DEFAULT_NOTE_DIMENSION
          a standard dimension for a new LinkableObject reference when open
 
Constructor Summary
CreateLinkableObjectCommand(LinkableObject object, Resource theContainer, org.eclipse.draw2d.geometry.Rectangle rectangle)
          constructor to place given LinkableObject within the resource/annotation area of a given Resource.
 
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
 

Field Detail

DEFAULT_NOTE_DIMENSION

public static org.eclipse.draw2d.geometry.Dimension DEFAULT_NOTE_DIMENSION
a standard dimension for a new LinkableObject reference when open


DEFAULT_DIMENSION

public static org.eclipse.draw2d.geometry.Dimension DEFAULT_DIMENSION
a standard dimension for a new LinkableObject reference when closed

Constructor Detail

CreateLinkableObjectCommand

public CreateLinkableObjectCommand(LinkableObject object,
                                   Resource theContainer,
                                   org.eclipse.draw2d.geometry.Rectangle rectangle)
constructor to place given LinkableObject within the resource/annotation area of a given Resource.

Parameters:
object - LinkableObject created by the CreationTool
theContainer - Resource in which it should appear
rectangle - place in the area where it should appear
Method Detail

execute

public void execute()

undo

public void undo()

redo

public void redo()