com.mindfusion.diagramming
Class AbstractLayout

java.lang.Object
  extended by com.mindfusion.diagramming.AbstractLayout
Direct Known Subclasses:
CircularLayout, FlowchartLayout, LayeredLayout, OrthogonalLayout, OrthogonalRouter

public abstract class AbstractLayout
extends java.lang.Object


Constructor Summary
protected AbstractLayout()
          Initializes a new instance of the AbstractLayout class.
 
Method Summary
 boolean arrange(Diagram diagram)
          Applies the layout to the specified Diagram instance.
abstract  boolean arrange(Diagram diagram, DiagramItemList items)
          Applies the layout on the specified subset of items from the specified Diagram instance.
 int getAnchoring()
          Gets how to align links to the anchor points of nodes.
 boolean getKeepGroupLayout()
          Gets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph.
 LayoutLink getLayoutLink()
          Gets an object, which is notified when the position of a link is changed by the layout.
 LayoutNode getLayoutNode()
          Gets an object, which is notified when the position of a node is changed by the layout.
 XDimension2D.Double getMargins()
          Gets the distance between the top-left corner of the smallest rectangle containing the arranged diagram and the top-left point of the document bounds.
 int getMultipleGraphsPlacement()
          Gets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other.
 LayoutProgress getProgress()
          Gets the progress callback delegate.
static void removeMidleSegmentPoint(Link link, boolean uniq)
           
 void setAnchoring(int value)
          Sets how to align links to the anchor points of nodes.
 void setKeepGroupLayout(boolean value)
          Sets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph.
 void setLayoutLink(LayoutLink value)
          Sets an object, which is notified when the position of a link is changed by the layout.
 void setLayoutNode(LayoutNode value)
          Sets an object, which is notified when the position of a node is changed by the layout.
 void setMargins(XDimension2D.Double value)
          Sets the distance between the top-left corner of the smallest rectangle containing the arranged diagram and the top-left point of the document bounds.
 void setMultipleGraphsPlacement(int value)
          Sets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other.
 void setProgress(LayoutProgress value)
          Sets the progress callback delegate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLayout

protected AbstractLayout()
Initializes a new instance of the AbstractLayout class.

Method Detail

arrange

public boolean arrange(Diagram diagram)
Applies the layout to the specified Diagram instance.

Parameters:
diagram - The Diagram that should be arranged.
Returns:
true if the diagram has been arranged successfully; otherwise, false.

arrange

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

Parameters:
diagam - The Diagram that should be arranged.
items - A collection of nodes and links from diagram that define the subgraph to arrange.
Returns:
true if the diagram has been arranged successfully; otherwise, false.

removeMidleSegmentPoint

public static void removeMidleSegmentPoint(Link link,
                                           boolean uniq)

getProgress

public LayoutProgress getProgress()
Gets the progress callback delegate.


setProgress

public void setProgress(LayoutProgress value)
Sets the progress callback delegate.


getLayoutNode

public LayoutNode getLayoutNode()
Gets an object, which is notified when the position of a node is changed by the layout.


setLayoutNode

public void setLayoutNode(LayoutNode value)
Sets an object, which is notified when the position of a node is changed by the layout.


getLayoutLink

public LayoutLink getLayoutLink()
Gets an object, which is notified when the position of a link is changed by the layout.


setLayoutLink

public void setLayoutLink(LayoutLink value)
Sets an object, which is notified when the position of a link is changed by the layout.


getMultipleGraphsPlacement

public int getMultipleGraphsPlacement()
Gets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other.


setMultipleGraphsPlacement

public void setMultipleGraphsPlacement(int value)
Sets a value indicating how multiple independent graphs in the diagram should be positioned relatively to each other.


getMargins

public XDimension2D.Double getMargins()
Gets the distance between the top-left corner of the smallest rectangle containing the arranged diagram and the top-left point of the document bounds.


setMargins

public void setMargins(XDimension2D.Double value)
Sets the distance between the top-left corner of the smallest rectangle containing the arranged diagram and the top-left point of the document bounds.


getKeepGroupLayout

public boolean getKeepGroupLayout()
Gets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph.


setKeepGroupLayout

public void setKeepGroupLayout(boolean value)
Sets a value indicating whether to treat each Group of nodes as a single vertex in the arranged graph.


getAnchoring

public int getAnchoring()
Gets how to align links to the anchor points of nodes.


setAnchoring

public void setAnchoring(int value)
Sets how to align links to the anchor points of nodes.