Changeset 16150


Ignore:
Timestamp:
09/15/18 11:54:41 (13 months ago)
Author:
pfleck
Message:

#2947

  • Added context menu to open the VisualProperties dialog for the IndexedDataTableView.
  • Changed the StatterPlotView.ShowName into ShowChartOnly to match the property names if the (Indexed)DataTableView.
Location:
branches/2947_ConfigurableIndexedDataTable
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.Designer.cs

    r15583 r16150  
    5050      System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
    5151      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
     52      this.configureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5253      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5354      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
     
    100101      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
    101102      //
     103      // configureToolStripMenuItem
     104      //
     105      this.configureToolStripMenuItem.Name = "configureToolStripMenuItem";
     106      this.configureToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
     107      this.configureToolStripMenuItem.Text = "Configure Chart...";
     108      this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click);
     109      //
    102110      // DataTableView
    103111      //
     
    121129
    122130    protected HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
    123 
     131    private System.Windows.Forms.ToolStripMenuItem configureToolStripMenuItem;
    124132  }
    125133}
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.cs

    r16149 r16150  
    4949      chart.ChartAreas[0].CursorX.Interval = 1;
    5050      chart.SuppressExceptions = true;
     51      chart.ContextMenuStrip.Items.Add(configureToolStripMenuItem);
    5152    }
    5253
     
    518519    }
    519520    #endregion
     521    private void configureToolStripMenuItem_Click(object sender, EventArgs e) {
     522      ShowConfiguration();
     523    }
    520524    #endregion
    521525
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs

    r15583 r16150  
    4040    protected Dictionary<Series, Series> seriesToRegressionSeriesTable;
    4141    private double xMin, xMax, yMin, yMax;
     42    protected bool showChartOnly = false;
    4243
    4344    public new ScatterPlot Content {
     
    4647    }
    4748
    48     public bool ShowName {
    49       get { return nameTextBox.Visible; }
     49    public bool ShowChartOnly {
     50      get { return showChartOnly; }
    5051      set {
    51         if (nameTextBox.Visible != value) {
    52           foreach (Control c in Controls) {
    53             if (c == chart) continue;
    54             c.Visible = value;
    55           }
    56           chart.Dock = value ? DockStyle.None : DockStyle.Fill;
     52        if (showChartOnly != value) {
     53          showChartOnly = value;
     54          UpdateControlsVisibility();
    5755        }
    5856      }
     
    137135        }
    138136      } else MessageBox.Show("Nothing to configure.");
     137    }
     138
     139    protected void UpdateControlsVisibility() {
     140      if (InvokeRequired)
     141        Invoke(new Action(UpdateControlsVisibility));
     142      else {
     143        foreach (Control c in Controls) {
     144          if (c == chart) continue;
     145          c.Visible = !showChartOnly;
     146        }
     147        chart.Dock = showChartOnly ? DockStyle.Fill : DockStyle.None;
     148      }
    139149    }
    140150
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis/3.3/DataVisualization/IndexedDataRow.cs

    r15583 r16150  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
     24using System.ComponentModel;
     25using System.Linq;
    2226using HeuristicLab.Collections;
    2327using HeuristicLab.Common;
    2428using HeuristicLab.Core;
    2529using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using System;
    27 using System.Collections.Generic;
    28 using System.ComponentModel;
    29 using System.Linq;
    3030
    3131namespace HeuristicLab.Analysis {
    3232  [Item("IndexedDataRow", "A data row that contains a series of points.")]
    3333  [StorableClass]
    34   public class IndexedDataRow<T> : NamedItem {
     34  public class IndexedDataRow<T> : NamedItem, IDataRow {
    3535
    3636    private DataRowVisualProperties visualProperties;
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs

    r15583 r16150  
    457457            Content = scatterPlot,
    458458            Dock = DockStyle.Fill,
    459             ShowName = false
     459            ShowChartOnly = true
    460460            //ShowLegend = false,
    461461            //XAxisFormat = "G3"
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs

    r15583 r16150  
    8686      this.scatterPlotView.Name = "scatterPlotView";
    8787      this.scatterPlotView.ReadOnly = false;
    88       this.scatterPlotView.ShowName = false;
     88      this.scatterPlotView.ShowChartOnly = true;
    8989      this.scatterPlotView.Size = new System.Drawing.Size(618, 517);
    9090      this.scatterPlotView.TabIndex = 0;
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Problems.TestFunctions.Views/3.3/ParetoFrontScatterPlotView.Designer.cs

    r15583 r16150  
    6262      this.scatterPlotView.Name = "scatterPlotView";
    6363      this.scatterPlotView.ReadOnly = false;
    64       this.scatterPlotView.ShowName = false;
     64      this.scatterPlotView.ShowChartOnly = false;
    6565      this.scatterPlotView.Size = new System.Drawing.Size(615, 342);
    6666      this.scatterPlotView.TabIndex = 3;
Note: See TracChangeset for help on using the changeset viewer.