Changeset 10656 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs
- Timestamp:
- 03/26/14 01:52:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/FragmentGraphView.cs
r10655 r10656 23 23 base.Content = value; 24 24 MakeTiles(); 25 Draw(); 25 26 } 26 27 } … … 31 32 layoutEngine = new ReingoldTilfordLayoutEngine<TileLayoutNode>(n => n.Children); 32 33 symbolicExpressionEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees); 34 tileDictionary = new Dictionary<IGenealogyGraphNode<IFragment<ISymbolicExpressionTreeNode>>, TileLayoutNode>(); 33 35 } 34 36 35 37 private void MakeTiles() { 36 38 var chart = symbolicExpressionChartControl.Chart; 39 tileDictionary.Clear(); 37 40 foreach (var node in Content.Nodes.Cast<IGenealogyGraphNode<IFragment<ISymbolicExpressionTreeNode>>>()) { 38 var tile = new SymbolicExpressionTreeTile(chart) { 39 Root = node.Content.Root, 40 LayoutEngine = symbolicExpressionEngine 41 }; 41 var tile = new SymbolicExpressionTreeTile(chart); 42 tile.LayoutEngine = symbolicExpressionEngine; 43 tile.Root = node.Content.Root; 42 44 var tileNode = new TileLayoutNode { 43 45 Tile = tile … … 59 61 var root = tileDictionary[(IGenealogyGraphNode<IFragment<ISymbolicExpressionTreeNode>>)Content.Nodes[0]]; 60 62 var visualNodes = layoutEngine.CalculateLayout(root); 63 64 symbolicExpressionChartControl.UpdateEnabled = false; 65 foreach (var visualNode in visualNodes) { 66 var tile = visualNode.Content.Tile; 67 symbolicExpressionChartControl.Add(tile); 68 } 69 symbolicExpressionChartControl.UpdateEnabled = true; 70 symbolicExpressionChartControl.EnforceUpdate(); 61 71 } 62 72
Note: See TracChangeset
for help on using the changeset viewer.