ca.sqlpower.architect.layout
Class AbstractLayout

java.lang.Object
  extended by ca.sqlpower.architect.layout.AbstractLayout
All Implemented Interfaces:
ArchitectLayout
Direct Known Subclasses:
ArchitectGridLayout, BasicTreeAutoLayout, FruchtermanReingoldForceLayout, LineStraightenerLayout

public abstract class AbstractLayout
extends java.lang.Object
implements ArchitectLayout


Field Summary
protected  java.awt.Rectangle frame
           
 
Constructor Summary
protected AbstractLayout()
           
 
Method Summary
 java.awt.Dimension getNewArea(java.util.List<? extends LayoutNode> nodes)
           
 java.lang.Object getProperty(java.lang.String key)
           
 void setProperty(java.lang.String key, java.lang.Object value)
           
 void setup(java.util.Collection<? extends LayoutNode> nodes, java.util.Collection<? extends LayoutEdge> edges, java.awt.Rectangle rect)
          Sets up the layout algoritm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.architect.layout.ArchitectLayout
done, isDone, nextFrame
 

Field Detail

frame

protected java.awt.Rectangle frame
Constructor Detail

AbstractLayout

protected AbstractLayout()
Method Detail

setup

public void setup(java.util.Collection<? extends LayoutNode> nodes,
                  java.util.Collection<? extends LayoutEdge> edges,
                  java.awt.Rectangle rect)
Description copied from interface: ArchitectLayout
Sets up the layout algoritm. You have to call this before attempting to use an ArchitectLayout instance to perform a layout. TODO change the Rectangle into a point. This should indicate where to start but the layout should determine dimensions

Specified by:
setup in interface ArchitectLayout
Parameters:
nodes - The list of entities to be placed on

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)

getProperty

public java.lang.Object getProperty(java.lang.String key)

getNewArea

public java.awt.Dimension getNewArea(java.util.List<? extends LayoutNode> nodes)
Specified by:
getNewArea in interface ArchitectLayout


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca