Class TreeLayoutProcessor
The tree layout algorithms.
Inheritance
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class TreeLayoutProcessor : Object
Constructors
TreeLayoutProcessor(TreeLayoutSettings)
Initializes a new instance of the Tree
Declaration
public TreeLayoutProcessor(TreeLayoutSettings settings = null)
Parameters
Tree The settings. |
Properties
LayoutCenter
Gets or sets the center of the current layout.
Declaration
public Node<TreeLayoutData, object> LayoutCenter { get; set; }
Property Value
Node<Tree 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<Tree The node. |
System. 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<Tree A graph which is supposedly a tree. If not, please use the spanning tree algorithms (Kruskal or Prim). |
Node<Tree The root to be used as the starting point for the layout pass.. |
Tree The tree layout settings. If none supplied defaults will be used, see the Tree |
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<Tree The node. |
System. The maximum space given to this node wherein it can organize itself. |
Returns
System.
|
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<Tree The shape. |
Tree The direction. |
System. 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<Tree The shape. |
Children The layout. |
System. If set to |
System. 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<Tree The shape. |
Returns
System.
|