com.mindfusion.diagramming
Class OrthogonalLayout

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

public class OrthogonalLayout
extends AbstractLayout

Implements an orthogonal graph layout algorithm. Each link is drawn as a chain of alternating horizontal and vertical segments. Nodes are placed in a way that facilitates few links bends and crossings.


Constructor Summary
OrthogonalLayout()
          Initializes a new instance of the OrthogonalLayout class with the default settings.
 
Method Summary
 boolean arrange(Diagram diagram, DiagramItemList items)
          Applies the layout on the specified subset of items from the specified Diagram instance.
 boolean getDirected()
          Gets a value indicating whether the graph being laid out is directed.
 float getMinLaneSize()
          Gets a value indicating the minimum size of a lane.
 float getPadding()
          Gets a value indicating how much space to leave between nodes in adjacent lanes.
 boolean getRefine()
          Gets a value indicating whether to refine the layout.
 void setDirected(boolean directed)
          Sets a value indicating whether the graph being laid out is directed.
 void setMinLaneSize(float value)
          Sets a value indicating the minimum size of a lane.
 void setPadding(float padding)
          Sets a value indicating how much space to leave between nodes in adjacent lanes.
 void setRefine(boolean refine)
          Sets a value indicating whether to refine the layout.
 
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

OrthogonalLayout

public OrthogonalLayout()
Initializes a new instance of the OrthogonalLayout class with the default settings.

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:
true if the diagram has been arranged successfully; otherwise, false.

getMinLaneSize

public float getMinLaneSize()
Gets a value indicating the minimum size of a lane.

Returns:

setMinLaneSize

public void setMinLaneSize(float value)
Sets a value indicating the minimum size of a lane.

Parameters:
value -

getPadding

public float getPadding()
Gets a value indicating how much space to leave between nodes in adjacent lanes.

Returns:

setPadding

public void setPadding(float padding)
Sets a value indicating how much space to leave between nodes in adjacent lanes.

Parameters:
padding -

getRefine

public boolean getRefine()
Gets a value indicating whether to refine the layout.

Returns:

setRefine

public void setRefine(boolean refine)
Sets a value indicating whether to refine the layout.

Parameters:
refine -

getDirected

public boolean getDirected()
Gets a value indicating whether the graph being laid out is directed.

Returns:

setDirected

public void setDirected(boolean directed)
Sets a value indicating whether the graph being laid out is directed.

Parameters:
directed -