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

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

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

creates a new Link to connect two given LinkableObjects.

Author:
John Bradley

Constructor Summary
LOLinkCreateCommand()
           
 
Method Summary
 void execute()
           
 LinkableObject getFrom()
           
 LinkableObject getTo()
           
 boolean isComplete()
          checks to see if both a from and to (source and target) LinkableObject has been provided.
 void setFrom(LinkableObject obj)
          provides the source end of the link.
 void setTo(LinkableObject obj)
          provides the target end of the link.
 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

LOLinkCreateCommand

public LOLinkCreateCommand()
Method Detail

setFrom

public void setFrom(LinkableObject obj)
provides the source end of the link.

Parameters:
obj - source LinkableObject

getFrom

public LinkableObject getFrom()

setTo

public void setTo(LinkableObject obj)
provides the target end of the link.

Parameters:
obj - target LinkableObject

getTo

public LinkableObject getTo()

isComplete

public boolean isComplete()
checks to see if both a from and to (source and target) LinkableObject has been provided.

Returns:
indicates that all needed data has been provided.

execute

public void execute()

undo

public void undo()