uk.ac.kcl.cch.jb.pliny.commands
Class CreateLinkableObjectCommand
java.lang.Object
org.eclipse.gef.commands.Command
uk.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 |
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 |
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
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 CreationTooltheContainer
- Resource in which it should appearrectangle
- place in the area where it should appear
execute
public void execute()
undo
public void undo()
redo
public void redo()