com.mindfusion.diagramming
Class FractalLayout

java.lang.Object
  extended by com.mindfusion.diagramming.AbstractLayout
      extended by com.mindfusion.diagramming.FractalLayout

public class FractalLayout
extends AbstractLayout

A tree layout algorithm that places child nodes symmetrically around their parent node. Nodes at the lowest level are arranged directly in a circle around their parent. At the upper level, the already arranged nodes form branches that are arranged in a circle around the new parent node. The algorithm is recursively repeated till the highest level is reached.


Constructor Summary
FractalLayout()
          Initializes a new instance of the FractalLayout class.
 
Method Summary
 boolean arrange(Diagram diagram, DiagramItemList items)
          Applies the layout on the specified subset of items from the specified Diagram instance.
 DiagramNode getRoot()
          Gets the tree root.
 void setRoot(DiagramNode value)
          Sets the tree root.
 
Methods inherited from class com.mindfusion.diagramming.AbstractLayout
arrange, getAnchoring, getKeepGroupLayout, getLayoutLink, getLayoutNode, getMargins, getMultipleGraphsPlacement, getProgress, removeMidleSegmentPoint, setAnchoring, setKeepGroupLayout, setLayoutLink, setLayoutNode, setMargins, setMultipleGraphsPlacement, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractalLayout

public FractalLayout()
Initializes a new instance of the FractalLayout class.

Method Detail

arrange

public boolean arrange(Diagram diagram,
                       DiagramItemList items)
Applies the layout on the specified subset of items from the specified Diagram instance.

Specified by:
arrange in class AbstractLayout
Parameters:
diagram - The Diagram that should be arranged.
items - A collection of nodes and links from diagram that define the subgraph to arrange.
Returns:
This method always returns true.

getRoot

public DiagramNode getRoot()
Gets the tree root.

Returns:
A DiagramNode specifying the root.

setRoot

public void setRoot(DiagramNode value)
Sets the tree root.

Parameters:
value - A DiagramNode specifying the root.