Ignore:
Timestamp:
05/06/14 15:33:50 (5 years ago)
Author:
bburlacu
Message:

#2076: Improved visual aspect of trees using the Boxes layout engine (decreased horizontal spacing to a minimum of 1px). Refactored some code in the InteractiveSymbolicDataAnalysisSolutionSimplifierView to throw an exception when the visual node content is null, and to only update the tree when necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r10565 r10799  
    3939    private const int preferredNodeWidth = 70;
    4040    private const int preferredNodeHeight = 46;
    41     private const int minHorizontalDistance = 30;
    42     private const int minVerticalDistance = 30;
     41    private int minHorizontalDistance = 30;
     42    private int minVerticalDistance = 30;
    4343
    4444    public SymbolicExpressionTreeChart() {
     
    6262      reingoldTilfordToolStripMenuItem.Checked = true;
    6363    }
    64 
    65     //private ILayoutEngine<ISymbolicExpressionTreeNode> TreeLayoutEngine {
    66     //  get { return layoutEngine; }
    67     //  set {
    68     //    layoutEngine = value;
    69     //    InitializeLayout();
    70     //    Repaint();
    71     //  }
    72     //}
    7364
    7465    public SymbolicExpressionTreeChart(ISymbolicExpressionTree tree)
     
    412403
    413404    private void reingoldTilfordToolStripMenuItem_Click(object sender, EventArgs e) {
     405      minHorizontalDistance = 30;
    414406      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees) {
    415407        NodeWidth = preferredNodeWidth,
     
    424416
    425417    private void boxesToolStripMenuItem_Click(object sender, EventArgs e) {
     418      minHorizontalDistance = 1; // the boxes layout engine has no horizontal requirements, it automatically spaces nodes with boxes
    426419      layoutEngine = new BoxesLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees, n => n.GetLength(), n => n.GetDepth()) {
    427420        NodeWidth = preferredNodeWidth,
Note: See TracChangeset for help on using the changeset viewer.