ca.sqlpower.architect.layout
Class LineStraightenerLayout

java.lang.Object
  extended by ca.sqlpower.architect.layout.AbstractLayout
      extended by ca.sqlpower.architect.layout.LineStraightenerLayout
All Implemented Interfaces:
ArchitectLayout

public class LineStraightenerLayout
extends AbstractLayout

A layout implementation that leaves all tables in their original positions, but manipulates the relationship connection points to make them straight lines (horizontal only or vertical only) if at all possible.

Author:
fuerth

Field Summary
 
Fields inherited from class ca.sqlpower.architect.layout.AbstractLayout
frame
 
Constructor Summary
LineStraightenerLayout()
           
 
Method Summary
 void done()
          Does nothing, since this layout happens in a single step.
 boolean isDone()
          Returns true iff the layout is finished.
 void nextFrame()
          Updates all the node locations to correspond with the positions they should have in the next frame.
 void setup(java.util.Collection<? extends LayoutNode> nodes, java.util.Collection<? extends LayoutEdge> edges, java.awt.Rectangle rect)
          Sets up this layout.
 
Methods inherited from class ca.sqlpower.architect.layout.AbstractLayout
getNewArea, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineStraightenerLayout

public LineStraightenerLayout()
Method Detail

setup

public void setup(java.util.Collection<? extends LayoutNode> nodes,
                  java.util.Collection<? extends LayoutEdge> edges,
                  java.awt.Rectangle rect)
Sets up this layout. Until the LayoutNode and LayoutEdge interfaces start supporting specific connection points, this class assumes all the nodes are TablePane instances, and all the edges are Relationships.

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

done

public void done()
Does nothing, since this layout happens in a single step.


isDone

public boolean isDone()
Description copied from interface: ArchitectLayout
Returns true iff the layout is finished.

Returns:
true if the layout algorithm is finished with the layout, false otherwise

nextFrame

public void nextFrame()
Description copied from interface: ArchitectLayout
Updates all the node locations to correspond with the positions they should have in the next frame.



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