TreeLayoutProcessor
The tree layout algorithms.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public class TreeLayoutProcessor
Inheritance: objectTreeLayoutProcessor
Constructors
Initializes a new instance of the TreeLayoutProcessor class.
public TreeLayoutProcessor(TreeLayoutSettings settings = null)
The settings.
Properties
Gets or sets the center of the current layout.
public Node<TreeLayoutData, object> LayoutCenter { get; set; }
The center.
Methods
A standard depth first traversal (DFT) of the tree starting from the given node.
public static void DepthFirstTraversal(Node<TreeLayoutData, object> node, Action<Node<TreeLayoutData, object>> action)
The node.
actionAction<Node<TreeLayoutData, object>>The action.
Performs a tree-layout of the tree-graph.
public void Layout(Graph<TreeLayoutData, object> treeGraph, Node<TreeLayoutData, object> root, TreeLayoutSettings layoutSettings = null)
A graph which is supposedly a tree. If not, please use the spanning tree algorithms (Kruskal or Prim).
rootNode<TreeLayoutData, object>The root to be used as the starting point for the layout pass..
layoutSettingsTreeLayoutSettingsThe tree layout settings. If none supplied defaults will be used, see the TreeLayoutSettings.
Returns the actual size of the node. The given size is the allowed space wherein the node can lay out itself.
public Size Measure(Node<TreeLayoutData, object> node, Size givenSize)
The node.
givenSizeSizeThe maximum space given to this node wherein it can organize itself.
Returns:Size
Sets the children direction recursively.
public void SetChildrenDirection(Node<TreeLayoutData, object> node, TreeDirection direction, bool includeStart)
The shape.
directionTreeDirectionThe direction.
includeStartboolIf set to true the given start shape will be set as well..
Sets the children layout recursively.
public void SetChildrenLayout(Node<TreeLayoutData, object> node, ChildrenLayout layout, bool includeStart, int startFromLevel = 0)
The shape.
layoutChildrenLayoutThe layout.
includeStartboolIf set to true the given start shape will be set as well.
The layout is assigned starting from a certain level on, the node node being level zero.
Gets the tree with the given shape as root of the tree.
public static IList<Node<TreeLayoutData, object>> Subtree(Node<TreeLayoutData, object> shape)
The shape.
Returns: