Class DirectedTreeLayoutManager
The DirectedTreeLayoutManager class, a specialization of the GraphLayoutManager base, implements a layout manager for arranging nodes in a tree-like structure. The DirectedTreeLayoutManager can be applied to any diagram that is composed as a directed tree graph with a unique root and child nodes. The layout manager lets you orient the tree in just about any direction around the root, and can be used for creating arrangements such as top-to-bottom vertical trees, bottom-to-top vertical trees, right-to-left horizontal trees, left-to-right horizontal trees, angular trees etc., GraphLayoutManager RadialTreeLayoutManager
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class DirectedTreeLayoutManager : GraphLayoutManager
Constructors
DirectedTreeLayoutManager()
Initializes a new instance of the DirectedTreeLayoutManager class.
Declaration
public DirectedTreeLayoutManager()
DirectedTreeLayoutManager(Model, Single, Single, Single)
Initializes a new instance of the DirectedTreeLayoutManager class.
Declaration
public DirectedTreeLayoutManager(Model model, float fRotationDegree, float fVerticalOffset, float fHorizontalOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model | The diagram Model. |
| System.Single | fRotationDegree | The root to child orientation to be used for the tree. |
| System.Single | fVerticalOffset | Specifies the vertical distance between adjacent nodes. |
| System.Single | fHorizontalOffset | Specifies the horizontal distance between adjacent nodes. |
DirectedTreeLayoutManager(Model, Single, Single, Single, LayoutType, Int32)
Initializes a new instance of the DirectedTreeLayoutManager class.
Declaration
public DirectedTreeLayoutManager(Model model, float fRotationDegree, float fVerticalOffset, float fHorizontalOffset, LayoutType layoutType, int nTreeLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model | The diagram Model. |
| System.Single | fRotationDegree | The root to child orientation to be used for the tree. |
| System.Single | fVerticalOffset | Specifies the vertical distance between adjacent nodes. |
| System.Single | fHorizontalOffset | Specifies the horizontal distance between adjacent nodes. |
| LayoutType | layoutType | Specifies the layout type of tree |
| System.Int32 | nTreeLevel | Specifies the tree level upto which the default layout has to be maintained |
DirectedTreeLayoutManager(Model, Single, Single, Single, LayoutType, Int32, Boolean)
Initializes a new instance of the DirectedTreeLayoutManager class.
Declaration
public DirectedTreeLayoutManager(Model model, float fRotationDegree, float fVerticalOffset, float fHorizontalOffset, LayoutType layoutType, int nTreeLevel, bool bSingleChildLayout)
Parameters
| Type | Name | Description |
|---|---|---|
| Model | model | The diagram Model. |
| System.Single | fRotationDegree | The root to child orientation to be used for the tree. |
| System.Single | fVerticalOffset | Specifies the vertical distance between adjacent nodes. |
| System.Single | fHorizontalOffset | Specifies the horizontal distance between adjacent nodes. |
| LayoutType | layoutType | Specifies the layout type of tree |
| System.Int32 | nTreeLevel | Specifies the tree level upto which the default layout has to be maintained |
| System.Boolean | bSingleChildLayout | Determines whether the layout needs to done on single child node |
Fields
m_LayoutType
Declaration
protected LayoutType m_LayoutType
Field Value
| Type |
|---|
| LayoutType |
Properties
RotationAngle
Gets or sets the rotation angle for graph.
Declaration
public float RotationAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The rotation angle. |
Methods
ApplyRotation(Graph)
Rotates Graph.
Declaration
protected void ApplyRotation(Graph graphSorting)
Parameters
| Type | Name | Description |
|---|---|---|
| Graph | graphSorting | The graph to rotate. |
CalcRankPositionVerticalLayout(Int32, Graph)
Calculates the rank position vertical layout.
Declaration
protected float CalcRankPositionVerticalLayout(int nRank, Graph graph)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | nRank | The rank. |
| Graph | graph | The graph. |
Returns
| Type | Description |
|---|---|
| System.Single | The value. |
DoGraphLayout()
Applies the directed tree layout strategy on the diagram.
Declaration
protected override void DoGraphLayout()
Overrides
DoInitXLayout(Graph)
Does the init X layout.
Declaration
protected void DoInitXLayout(Graph graphToSort)
Parameters
| Type | Name | Description |
|---|---|---|
| Graph | graphToSort | The graph to sort. |
ExtractSubGraph(GraphNode, Int32, ref Graph)
Extracts subGraph from specified node.
Declaration
protected void ExtractSubGraph(GraphNode dtgnFrom, int nRank, ref Graph graphToFill)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphNode | dtgnFrom | new graph TopNode. |
| System.Int32 | nRank | current Rank. |
| Graph | graphToFill | Graph to extract to. |
GetSubGraphDimension(Int32, Int32, Dimension, Graph)
Gets the sub graph dimension.
Declaration
protected float GetSubGraphDimension(int nFromRank, int nToRank, Dimension dimension, Graph graph)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | nFromRank | The rank from. |
| System.Int32 | nToRank | The rank to. |
| Dimension | dimension | The dimension. |
| Graph | graph | The graph. |
Returns
| Type | Description |
|---|---|
| System.Single | The value. |
MakeGraphLayout(Graph)
Applies Layout Manager logic to given graph.
Declaration
protected void MakeGraphLayout(Graph graphSorting)
Parameters
| Type | Name | Description |
|---|---|---|
| Graph | graphSorting | Affecting graph. |
MakeLayout(Graph)
Performs the graph layout.
Declaration
protected void MakeLayout(Graph graphSorting)
Parameters
| Type | Name | Description |
|---|---|---|
| Graph | graphSorting | The graph. |
MakeLayout(ArrayList, Int32, Graph)
Makes the layout.
Declaration
protected virtual void MakeLayout(ArrayList lstRank, int nRank, Graph graph)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | lstRank | The last rank. |
| System.Int32 | nRank | The rank. |
| Graph | graph | The graph. |
NormalizeNodes(ArrayList, Int32)
Normalizes the nodes.
Declaration
protected virtual void NormalizeNodes(ArrayList nodes, int nRank)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | nodes | The nodes. |
| System.Int32 | nRank | The n rank. |
WaterFallNodePosition(GraphNode)
Method that sets the location of nodes in Waterfall layout.
Declaration
protected void WaterFallNodePosition(GraphNode currentNode)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphNode | currentNode | The node whose child has to be positioned, |
XCoordRoutine(IGBounds, ref Single)
X coordinate routine.
Declaration
protected virtual void XCoordRoutine(IGBounds gnBounds, ref float fX)
Parameters
| Type | Name | Description |
|---|---|---|
| IGBounds | gnBounds | The bounds. |
| System.Single | fX | The value. |
YCoordinateRoutine(ArrayList, Single)
Y coordinate routine.
Declaration
protected virtual void YCoordinateRoutine(ArrayList lstRank, float fYRank)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | lstRank | The last rank. |
| System.Single | fYRank | The rank. |