ca.sqlpower.architect.layout
Class BasicTreeAutoLayout

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

public class BasicTreeAutoLayout
extends AbstractLayout


Constructor Summary
BasicTreeAutoLayout()
           
 
Method Summary
 void done()
          Interrupts the algorithm and node bounds in a consistent state.
 boolean isAnimationEnabled()
           
 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 setAnimationEnabled(boolean animationEnabled)
           
 void setup(java.util.Collection<? extends LayoutNode> nodes, java.util.Collection<? extends LayoutEdge> edges, java.awt.Rectangle frame)
          Sets up the layout algoritm.
 
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

BasicTreeAutoLayout

public BasicTreeAutoLayout()
Method Detail

isAnimationEnabled

public boolean isAnimationEnabled()

setAnimationEnabled

public void setAnimationEnabled(boolean animationEnabled)

setup

public void setup(java.util.Collection<? extends LayoutNode> nodes,
                  java.util.Collection<? extends LayoutEdge> edges,
                  java.awt.Rectangle frame)
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
Overrides:
setup in class AbstractLayout
Parameters:
nodes - The list of entities to be placed on

done

public void done()
Description copied from interface: ArchitectLayout
Interrupts the algorithm and node bounds in a consistent state.


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