public PositionNodes ( |
||
nodeGroup | ||
depth | int | |
Résultat | void |
public void SortLeftToRight() { lock (_columns) { _columns.Clear(); _trees.Clear(); List <NodeRenderer> leftMostNodes = GetLeftMostNodes(); leftMostNodes.Sort(new Comparison <NodeRenderer>(NodePositionComparison)); _columns[1] = leftMostNodes; PopulateColumns(2, leftMostNodes, true); //position the X coord of each column SetNodeXLocations(); foreach (NodeRenderer leftMostNode in leftMostNodes) { TreeNodeGroup treeStructure = BuildTreeNodeGroup(leftMostNode); _trees.Add(treeStructure); } double marginFromTop = 20; //the margin between the breadcrumb and top of the map foreach (TreeNodeGroup treeStructure in _trees) { TreeRenderer renderer = new TreeRenderer(marginFromTop); renderer.PositionNodes(treeStructure, 1); marginFromTop = renderer.GetMaximumYPosition(); } //Store the new locations foreach (NodeRenderer nodeRenderer in ViewManager.CurrentView.NodeRenderers.Values) { nodeRenderer.StoreLocation(); } } }
public void SortLeftToRight() { lock (_columns) { _columns.Clear(); _trees.Clear(); List<NodeRenderer> leftMostNodes = GetLeftMostNodes(); leftMostNodes.Sort(new Comparison<NodeRenderer>(NodePositionComparison)); _columns[1] = leftMostNodes; PopulateColumns(2, leftMostNodes, true); //position the X coord of each column SetNodeXLocations(); foreach (NodeRenderer leftMostNode in leftMostNodes) { TreeNodeGroup treeStructure = BuildTreeNodeGroup(leftMostNode); _trees.Add(treeStructure); } double marginFromTop = 20; //the margin between the breadcrumb and top of the map foreach (TreeNodeGroup treeStructure in _trees) { TreeRenderer renderer = new TreeRenderer(marginFromTop); renderer.PositionNodes(treeStructure, 1); marginFromTop = renderer.GetMaximumYPosition(); } //Store the new locations foreach (NodeRenderer nodeRenderer in ViewManager.CurrentView.NodeRenderers.Values) { nodeRenderer.StoreLocation(); } } }