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

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

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

Creates a new annotation in a Pliny reference or annotation area. It is invoked from a GEF policy ScalableImageXYLayoutEditPolicy.getCreateCommand(org.eclipse.gef.requests.CreateRequest). An annotation is an anchor, a note with a note reference and a connection line between them.

Author:
John Bradley

Constructor Summary
CreateAnnotationCommand(Resource resource, org.eclipse.draw2d.geometry.Rectangle bounds)
          constructor for command to create a new annotation.
 
Method Summary
 void execute()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateAnnotationCommand

public CreateAnnotationCommand(Resource resource,
                               org.eclipse.draw2d.geometry.Rectangle bounds)
constructor for command to create a new annotation.

Parameters:
resource - Resource who will own the annotation
bounds - Rectangle where the anchor is to be placed.
Method Detail

execute

public void execute()

undo

public void undo()