uk.ac.kcl.cch.jb.pliny.containmentView.layout
Class GraphLayoutManager

java.lang.Object
  extended byorg.eclipse.draw2d.AbstractLayout
      extended byuk.ac.kcl.cch.jb.pliny.containmentView.layout.GraphLayoutManager
All Implemented Interfaces:
org.eclipse.draw2d.LayoutManager

public class GraphLayoutManager
extends org.eclipse.draw2d.AbstractLayout

Uses the DirectedGraphLayoutVisitor to automatically lay out figures on Containment View's screen. This code was borrowed with only minor changes from com.realpersist.gef.schemaeditor with thanks to the original authors.

Author:
Phil Zoio, minor adaptations John Bradley
See Also:
ContainmentSetPart

Field Summary
 
Fields inherited from class org.eclipse.draw2d.AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
GraphLayoutManager(ContainmentSetPart diagram)
           
 
Method Summary
protected  org.eclipse.draw2d.geometry.Dimension calculatePreferredSize(org.eclipse.draw2d.IFigure container, int wHint, int hHint)
           
 void layout(org.eclipse.draw2d.IFigure container)
           
 
Methods inherited from class org.eclipse.draw2d.AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLayoutManager

public GraphLayoutManager(ContainmentSetPart diagram)
Method Detail

calculatePreferredSize

protected org.eclipse.draw2d.geometry.Dimension calculatePreferredSize(org.eclipse.draw2d.IFigure container,
                                                                       int wHint,
                                                                       int hHint)

layout

public void layout(org.eclipse.draw2d.IFigure container)