Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/02/16 15:37:51 (7 years ago)
Author:
pfleck
Message:

#2709 Removed the PreprocessingScatterPlotView and use the HL ScatterPlotControl instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs

    r14388 r14446  
    55using System.Windows.Forms;
    66using HeuristicLab.Analysis;
     7using HeuristicLab.Analysis.Views;
    78using HeuristicLab.Collections;
    89using HeuristicLab.Common;
    9 using HeuristicLab.Core.Views;
    1010using HeuristicLab.Data;
    1111using HeuristicLab.MainForm;
     
    1818    private readonly IDictionary<string, Label> columnHeaderCache;
    1919    private readonly IDictionary<string, Label> rowHeaderCache;
    20     private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, ItemView> bodyCache;
     20    private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, Control> bodyCache;
    2121
    2222    public ScatterPlotMultiView() {
     
    4343      columnHeaderCache = new Dictionary<string, Label>();
    4444      rowHeaderCache = new Dictionary<string, Label>();
    45       bodyCache = new Dictionary<Tuple<string, string>, ItemView>();
     45      bodyCache = new Dictionary<Tuple<string, string>, Control>();
    4646
    4747      bodyScrollPanel.MouseWheel += bodyScrollPanel_MouseWheel;
     
    249249      return rowHeaderCache[variable];
    250250    }
    251     private ItemView GetBody(string colVariable, string rowVariable) {
     251    private Control GetBody(string colVariable, string rowVariable) {
    252252      var key = Tuple.Create(colVariable, rowVariable);
    253253      if (!bodyCache.ContainsKey(key)) {
     
    266266          bodyCache.Add(key, pcv);
    267267        } else { //scatter plot
    268           ScatterPlot scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable);
    269           PreprocessingScatterPlotView pspv = new PreprocessingScatterPlotView {
     268          var scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable);
     269          scatterPlot.VisualProperties.Title = string.Empty;
     270          var scatterPlotControl = new /*Preprocessing*/ScatterPlotControl {
    270271            Name = key.ToString(),
    271272            Content = scatterPlot,
    272273            Dock = DockStyle.Fill,
    273             ShowLegend = false,
    274             XAxisFormat = "G3"
     274            //ShowLegend = false,
     275            //XAxisFormat = "G3"
    275276          };
    276           pspv.ChartDoubleClick += ScatterPlotDoubleClick;
    277           bodyCache.Add(key, pspv);
     277          scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart
     278          bodyCache.Add(key, scatterPlotControl);
    278279        }
    279280      }
     
    344345    //Open scatter plot in new tab with new content when double clicked
    345346    private void ScatterPlotDoubleClick(object sender, EventArgs e) {
    346       PreprocessingScatterPlotView pspv = (PreprocessingScatterPlotView)sender;
     347      var scatterPlotControl = (ScatterPlotControl)sender;
    347348      ScatterPlotContent scatterContent = new ScatterPlotContent(Content, new Cloner());  // create new content
    348       ScatterPlot scatterPlot = pspv.Content;
     349      ScatterPlot scatterPlot = scatterPlotControl.Content;
    349350
    350351      //Extract variable names from scatter plot and set them in content
Note: See TracChangeset for help on using the changeset viewer.