Class TreeLayoutProcessor
The tree layout algorithms.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class TreeLayoutProcessor
Constructors
TreeLayoutProcessor(TreeLayoutSettings)
Initializes a new instance of the TreeLayoutProcessor class.
Declaration
public TreeLayoutProcessor(TreeLayoutSettings settings = null)
Parameters
TreeLayoutSettings
settings
The settings. |
Properties
Center
Gets or sets the center of the layout.
Declaration
[Obsolete("Use the non-static LayoutCenter property.")]
public static Node<TreeLayoutData, object> Center { get; set; }
Property Value
Node<TreeLayoutData, System.Object>
The center. |
LayoutCenter
Gets or sets the center of the current layout.
Declaration
public Node<TreeLayoutData, object> LayoutCenter { get; set; }
Property Value
Node<TreeLayoutData, System.Object>
The center. |
Methods
DepthFirstTraversal(Node<TreeLayoutData, Object>, Action<Node<TreeLayoutData, Object>>)
A standard depth first traversal (DFT) of the tree starting from the given node.
Declaration
public static void DepthFirstTraversal(Node<TreeLayoutData, object> node, Action<Node<TreeLayoutData, object>> action)
Parameters
Node<TreeLayoutData, System.Object>
node
The node. |
System.Action<Node<TreeLayoutData, System.Object>>
action
The action. |
Layout(Graph<TreeLayoutData, Object>, Node<TreeLayoutData, Object>, TreeLayoutSettings)
Performs a tree-layout of the tree-graph.
Declaration
public void Layout(Graph<TreeLayoutData, object> treeGraph, Node<TreeLayoutData, object> root, TreeLayoutSettings layoutSettings = null)
Parameters
Graph<TreeLayoutData, System.Object>
treeGraph
A graph which is supposedly a tree. If not, please use the spanning tree algorithms (Kruskal or Prim). |
Node<TreeLayoutData, System.Object>
root
The root to be used as the starting point for the layout pass.. |
TreeLayoutSettings
layoutSettings
The tree layout settings. If none supplied defaults will be used, see the TreeLayoutSettings. |
Measure(Node<TreeLayoutData, Object>, Size)
Returns the actual size of the node. The given size is the allowed space wherein the node can lay out itself.
Declaration
public Size Measure(Node<TreeLayoutData, object> node, Size givenSize)
Parameters
Node<TreeLayoutData, System.Object>
node
The node. |
System.Windows.Size
givenSize
The maximum space given to this node wherein it can organize itself. |
Returns
System.Windows.Size
|
SetChildrenDirection(Node<TreeLayoutData, Object>, TreeDirection, Boolean)
Sets the children direction recursively.
Declaration
public void SetChildrenDirection(Node<TreeLayoutData, object> node, TreeDirection direction, bool includeStart)
Parameters
Node<TreeLayoutData, System.Object>
node
The shape. |
TreeDirection
direction
The direction. |
System.Boolean
includeStart
If set to |
SetChildrenLayout(Node<TreeLayoutData, Object>, ChildrenLayout, Boolean, Int32)
Sets the children layout recursively.
Declaration
public void SetChildrenLayout(Node<TreeLayoutData, object> node, ChildrenLayout layout, bool includeStart, int startFromLevel = 0)
Parameters
Node<TreeLayoutData, System.Object>
node
The shape. |
ChildrenLayout
layout
The layout. |
System.Boolean
includeStart
If set to |
System.Int32
startFromLevel
The layout is assigned starting from a certain level on, the |
Subtree(Node<TreeLayoutData, Object>)
Gets the tree with the given shape as root of the tree.
Declaration
public static IList<Node<TreeLayoutData, object>> Subtree(Node<TreeLayoutData, object> shape)
Parameters
Node<TreeLayoutData, System.Object>
shape
The shape. |
Returns
System.Collections.Generic.IList<Node<TreeLayoutData, System.Object>>
|