com.mindfusion.diagramming
Class CascadeLayout

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

public class CascadeLayout
extends AbstractLayout

Performs cascading layout on simple, connected graphs. The cascade layout places vertices on a virtual grid and arranges edges orthogonally, such that if the source graph is planar it is guaranteed that all edges will have no more than two bends and will not intersect.


Constructor Summary
CascadeLayout()
          Initializes a new instance of the CascadeLayout class.
 
Method Summary
 boolean arrange(Diagram diagram, DiagramItemList items)
          Applies the layout on the specified subset of items from the specified Diagram instance.
 int getOrientation()
          Gets a the orientation of the arranged graph.
 float getPadding()
          Gets the spacing between nodes in adjacent layers.
 void setOrientation(int value)
          Sets a the orientation of the arranged graph.
 void setPadding(float value)
          Sets the spacing between nodes in adjacent layers.
 
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

CascadeLayout

public CascadeLayout()
Initializes a new instance of the CascadeLayout 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.

getOrientation

public int getOrientation()
Gets a the orientation of the arranged graph.

Returns:
One of the Orientation constants.

setOrientation

public void setOrientation(int value)
Sets a the orientation of the arranged graph.

Parameters:
value - One of the Orientation constants.

getPadding

public float getPadding()
Gets the spacing between nodes in adjacent layers.


setPadding

public void setPadding(float value)
Sets the spacing between nodes in adjacent layers.