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

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

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

groups a Vector of LinkableObjects by first creating a new note to hold them and putting the group into the new note's reference area and then creating a new reference object (LinkableObject) for the new note in the place where the LinkableObjects came from.

Author:
John Bradley

Constructor Summary
GroupLinkableObjectsCommand(Vector list)
          creates an instance of this command ready to group together LinkableObjects found in the given list.
 
Method Summary
 boolean canUndo()
           
 void execute()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, 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

GroupLinkableObjectsCommand

public GroupLinkableObjectsCommand(Vector list)
creates an instance of this command ready to group together LinkableObjects found in the given list. The code assumes that only LinkableObjects are in the list.

Parameters:
list - a collection of LinkableObjects to be grouped.
Method Detail

execute

public void execute()

canUndo

public boolean canUndo()

undo

public void undo()