com.mindfusion.diagramming
Class OrthogonalRouter

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

public class OrthogonalRouter
extends AbstractLayout

Implements an orthogonal graph layout algorithm.


Constructor Summary
OrthogonalRouter()
          Initializes a new instance of the OrthogonalLayout class.
 
Method Summary
 boolean arrange(Diagram diagram, DiagramItemList items)
          Applies the layout on the specified subset of items from the specified Diagram instance.
 int getBaseLayout()
          Gets a value indicating whether to arrange nodes or use their current configuration.
 float getBendDistance()
          Gets how far from its adjacent node a link should bend.
 int getDirection()
          Gets the direction of the arranged diagram when BaseLayout is set to Layered.
 int getEndOrientation()
          Gets the desired orientation of the last segments of routed links.
 float getGridSize()
          Gets the distance between adjacent grid points when BaseLayout is set to Grid.
 float getLayerDistance()
          Gets the desired distance between layer axis lines.
 float getNodeDistance()
          Gets the desired distance between adjacent nodes in a layer.
 int getOrientation()
          Gets the overall orientation of the arranged diagram when BaseLayout is set to Layered.
 boolean getPutEndPointsAtNodeBorders()
          Gets a value indicating whether the end points of a link should be placed at the outlines of the nodes connected by that link.
 int getRandomSeed()
          Gets the randomization seed to use for generating random node positions.
 DiagramNode getRoot()
          Gets a node indicating which subgraph of the diagram must be laid out.
 boolean getSplitGraph()
          Gets a value indicating whether unconnected subgraphs should be laid out independently from each other.
 int getStartOrientation()
          Gets the desired orientation of the first segments of routed links.
 void setBaseLayout(int value)
          Sets a value indicating whether to arrange nodes or use their current configuration.
 void setBendDistance(float value)
          Sets how far from its adjacent node a link should bend.
 void setDirection(int value)
          Sets the direction of the arranged diagram when BaseLayout is set to Layered.
 void setEndOrientation(int value)
          Sets the desired orientation of the last segments of routed links.
 void setGridSize(float value)
          Sets the distance between adjacent grid points when BaseLayout is set to Grid.
 void setLayerDistance(float value)
          Sets the desired distance between layer axis lines.
 void setNodeDistance(float value)
          Sets the desired distance between adjacent nodes in a layer.
 void setOrientation(int value)
          Sets the overall orientation of the arranged diagram when BaseLayout is set to Layered.
 void setPutEndPointsAtNodeBorders(boolean value)
          Sets a value indicating whether the end points of a link should be placed at the outlines of the nodes connected by that link.
 void setRandomSeed(int value)
          Sets the randomization seed to use for generating random node positions.
 void setRoot(DiagramNode value)
          Sets a node indicating which subgraph of the diagram must be laid out.
 void setSplitGraph(boolean value)
          Sets a value indicating whether unconnected subgraphs should be laid out independently from each other.
 void setStartOrientation(int value)
          Sets the desired orientation of the first segments of routed links.
 
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

OrthogonalRouter

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

getBaseLayout

public int getBaseLayout()
Gets a value indicating whether to arrange nodes or use their current configuration.


setBaseLayout

public void setBaseLayout(int value)
Sets a value indicating whether to arrange nodes or use their current configuration.


getBendDistance

public float getBendDistance()
Gets how far from its adjacent node a link should bend.


setBendDistance

public void setBendDistance(float value)
Sets how far from its adjacent node a link should bend.


getGridSize

public float getGridSize()
Gets the distance between adjacent grid points when BaseLayout is set to Grid.


setGridSize

public void setGridSize(float value)
Sets the distance between adjacent grid points when BaseLayout is set to Grid.


getRandomSeed

public int getRandomSeed()
Gets the randomization seed to use for generating random node positions.


setRandomSeed

public void setRandomSeed(int value)
Sets the randomization seed to use for generating random node positions.


getSplitGraph

public boolean getSplitGraph()
Gets a value indicating whether unconnected subgraphs should be laid out independently from each other.


setSplitGraph

public void setSplitGraph(boolean value)
Sets a value indicating whether unconnected subgraphs should be laid out independently from each other.


getRoot

public DiagramNode getRoot()
Gets a node indicating which subgraph of the diagram must be laid out.


setRoot

public void setRoot(DiagramNode value)
Sets a node indicating which subgraph of the diagram must be laid out.


getOrientation

public int getOrientation()
Gets the overall orientation of the arranged diagram when BaseLayout is set to Layered.


setOrientation

public void setOrientation(int value)
Sets the overall orientation of the arranged diagram when BaseLayout is set to Layered.


getDirection

public int getDirection()
Gets the direction of the arranged diagram when BaseLayout is set to Layered.


setDirection

public void setDirection(int value)
Sets the direction of the arranged diagram when BaseLayout is set to Layered.


getLayerDistance

public float getLayerDistance()
Gets the desired distance between layer axis lines.


setLayerDistance

public void setLayerDistance(float value)
Sets the desired distance between layer axis lines.


getNodeDistance

public float getNodeDistance()
Gets the desired distance between adjacent nodes in a layer.


setNodeDistance

public void setNodeDistance(float value)
Sets the desired distance between adjacent nodes in a layer.


getPutEndPointsAtNodeBorders

public boolean getPutEndPointsAtNodeBorders()
Gets a value indicating whether the end points of a link should be placed at the outlines of the nodes connected by that link.


setPutEndPointsAtNodeBorders

public void setPutEndPointsAtNodeBorders(boolean value)
Sets a value indicating whether the end points of a link should be placed at the outlines of the nodes connected by that link.


getStartOrientation

public int getStartOrientation()
Gets the desired orientation of the first segments of routed links.


setStartOrientation

public void setStartOrientation(int value)
Sets the desired orientation of the first segments of routed links.


getEndOrientation

public int getEndOrientation()
Gets the desired orientation of the last segments of routed links.


setEndOrientation

public void setEndOrientation(int value)
Sets the desired orientation of the last segments of routed links.