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

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

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

This command provides the mechanism for the orphaning of LinkableObjects that are being moved from one container to another (what GEF calls 're-parenting'). Re-parenting in GEF involves two commands -- one to remove the item from its old parent (called 'orphaning') and then a second to reconnect the item to its new parent. It is this first operation that is defined here.

These commands are invoked from GEF policy objects method getOrphanChildrenCommand in GEF's ContainerEditPolicy.

Author:
John Bradley
See Also:
ResourceObjectsContainerEditPolicy.getOrphanChildrenCommand(org.eclipse.gef.requests.GroupRequest)

Constructor Summary
OrphanLinkableObjectsCommand(Vector linkableObjects)
          the constructor used in the policy code to set up this command.
 
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

OrphanLinkableObjectsCommand

public OrphanLinkableObjectsCommand(Vector linkableObjects)
the constructor used in the policy code to set up this command.

Parameters:
linkableObjects - collection of LinkableOjects that need to be orphaned in preparation for the subsequent reparenting.
Method Detail

execute

public void execute()

undo

public void undo()