com.mindfusion.diagramming
Class TopologicalLayout
java.lang.Object
com.mindfusion.diagramming.AbstractLayout
com.mindfusion.diagramming.TopologicalLayout
public class TopologicalLayout
- extends AbstractLayout
Implements a circular graph layout algorithm. Nodes are distributed
evenly on the circumference of a circle at positions that result in
as few link crossing as possible.
Constructor Summary |
TopologicalLayout()
Initializes a new instance of the CircularLayout class
with the default settings. |
Methods inherited from class com.mindfusion.diagramming.AbstractLayout |
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 |
TopologicalLayout
public TopologicalLayout()
- Initializes a new instance of the CircularLayout class
with the default settings.
arrange
public boolean arrange(Diagram diagram)
- Applies the layout on the specified Diagram instance.
- Overrides:
arrange
in class AbstractLayout
- Parameters:
diagram
- The Diagram that should be arranged.
- Returns:
- true if the diagram has been arranged successfully; otherwise, false.
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:
- true if the diagram has been arranged successfully; otherwise, false.
setOrientation
public void setOrientation(int orientation)
getOrientation
public int getOrientation()
setDirection
public void setDirection(int direction)
getDirection
public int getDirection()
setNodeDistance
public void setNodeDistance(float nodeDistance)
getNodeDistance
public float getNodeDistance()
setBendAdjacentLinks
public void setBendAdjacentLinks(boolean bendAdjacentLinks)
getBendAdjacentLinks
public boolean getBendAdjacentLinks()