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.

Location:
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj

    r14445 r14446  
    256256    <Compile Include="ScatterPlotMultiView.Designer.cs">
    257257      <DependentUpon>ScatterPlotMultiView.cs</DependentUpon>
    258     </Compile>
    259     <Compile Include="PreprocessingScatterPlotView.cs">
    260       <SubType>UserControl</SubType>
    261     </Compile>
    262     <Compile Include="PreprocessingScatterPlotView.Designer.cs">
    263       <DependentUpon>PreprocessingScatterPlotView.cs</DependentUpon>
    264258    </Compile>
    265259    <Compile Include="SearchAndReplaceDialog.cs">
  • 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
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs

    r14185 r14446  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.scatterPlotView = new HeuristicLab.DataPreprocessing.Views.PreprocessingScatterPlotView();
     47      this.scatterPlotControl = new HeuristicLab.Analysis.Views.ScatterPlotControl();
    4848      this.groupBox1 = new System.Windows.Forms.GroupBox();
     49      this.label3 = new System.Windows.Forms.Label();
    4950      this.label2 = new System.Windows.Forms.Label();
    5051      this.label1 = new System.Windows.Forms.Label();
     52      this.comboBoxColor = new System.Windows.Forms.ComboBox();
    5153      this.comboBoxYVariable = new System.Windows.Forms.ComboBox();
    5254      this.comboBoxXVariable = new System.Windows.Forms.ComboBox();
    53       this.label3 = new System.Windows.Forms.Label();
    54       this.comboBoxColor = new System.Windows.Forms.ComboBox();
    5555      this.groupBox1.SuspendLayout();
    5656      this.SuspendLayout();
    5757      //
    58       // scatterPlotView
     58      // scatterPlotControl
    5959      //
    60       this.scatterPlotView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    61             | System.Windows.Forms.AnchorStyles.Left)
     60      this.scatterPlotControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     61            | System.Windows.Forms.AnchorStyles.Left) 
    6262            | System.Windows.Forms.AnchorStyles.Right)));
    63       this.scatterPlotView.Caption = "ScatterPlot View";
    64       this.scatterPlotView.Content = null;
    65       this.scatterPlotView.Location = new System.Drawing.Point(169, 3);
    66       this.scatterPlotView.Name = "scatterPlotView";
    67       this.scatterPlotView.ReadOnly = false;
    68       this.scatterPlotView.Size = new System.Drawing.Size(689, 509);
    69       this.scatterPlotView.TabIndex = 0;
     63      this.scatterPlotControl.Content = null;
     64      this.scatterPlotControl.Location = new System.Drawing.Point(169, 3);
     65      this.scatterPlotControl.Name = "scatterPlotControl";
     66      this.scatterPlotControl.Size = new System.Drawing.Size(689, 509);
     67      this.scatterPlotControl.TabIndex = 0;
    7068      //
    7169      // groupBox1
     
    8381      this.groupBox1.TabStop = false;
    8482      this.groupBox1.Text = "Options";
     83      //
     84      // label3
     85      //
     86      this.label3.AutoSize = true;
     87      this.label3.Location = new System.Drawing.Point(17, 141);
     88      this.label3.Name = "label3";
     89      this.label3.Size = new System.Drawing.Size(31, 13);
     90      this.label3.TabIndex = 3;
     91      this.label3.Text = "Color";
    8592      //
    8693      // label2
     
    101108      this.label1.TabIndex = 2;
    102109      this.label1.Text = "X Variable";
     110      //
     111      // comboBoxColor
     112      //
     113      this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     114      this.comboBoxColor.FormattingEnabled = true;
     115      this.comboBoxColor.Location = new System.Drawing.Point(20, 164);
     116      this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
     117      this.comboBoxColor.Name = "comboBoxColor";
     118      this.comboBoxColor.Size = new System.Drawing.Size(121, 21);
     119      this.comboBoxColor.TabIndex = 1;
     120      this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    103121      //
    104122      // comboBoxYVariable
     
    124142      this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    125143      //
    126       // label3
    127       //
    128       this.label3.AutoSize = true;
    129       this.label3.Location = new System.Drawing.Point(17, 141);
    130       this.label3.Name = "label3";
    131       this.label3.Size = new System.Drawing.Size(31, 13);
    132       this.label3.TabIndex = 3;
    133       this.label3.Text = "Color";
    134       //
    135       // comboBoxColor
    136       //
    137       this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    138       this.comboBoxColor.FormattingEnabled = true;
    139       this.comboBoxColor.Location = new System.Drawing.Point(20, 164);
    140       this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
    141       this.comboBoxColor.Name = "comboBoxColor";
    142       this.comboBoxColor.Size = new System.Drawing.Size(121, 21);
    143       this.comboBoxColor.TabIndex = 1;
    144       this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);
    145       //
    146144      // ScatterPlotSingleView
    147145      //
     
    149147      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    150148      this.Controls.Add(this.groupBox1);
    151       this.Controls.Add(this.scatterPlotView);
     149      this.Controls.Add(this.scatterPlotControl);
    152150      this.Name = "ScatterPlotSingleView";
    153151      this.Size = new System.Drawing.Size(863, 517);
     
    160158    #endregion
    161159
    162     private HeuristicLab.DataPreprocessing.Views.PreprocessingScatterPlotView scatterPlotView;
     160    private HeuristicLab.Analysis.Views.ScatterPlotControl scatterPlotControl;
    163161    private System.Windows.Forms.GroupBox groupBox1;
    164162    private System.Windows.Forms.Label label2;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs

    r14185 r14446  
    8888    private void UpdateScatterPlot() {
    8989      if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) {
    90         //get scatter plot with selected x and y variable
    91         ScatterPlot scatterPlot = Content.CreateScatterPlot(
    92           (string)comboBoxXVariable.SelectedItem,
    93           (string)comboBoxYVariable.SelectedItem,
    94           (string)comboBoxColor.SelectedItem);
    95         scatterPlotView.Content = scatterPlot;
     90        var xVariable = (string)comboBoxXVariable.SelectedItem;
     91        var yVariable = (string)comboBoxYVariable.SelectedItem;
     92        var colorVariable = (string)comboBoxColor.SelectedItem;
     93        ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, colorVariable);
     94        var vp = scatterPlot.VisualProperties;
     95        vp.Title = string.Empty;
     96        vp.XAxisTitle = xVariable;
     97        vp.YAxisTitle = yVariable;
    9698
     99        scatterPlotControl.Content = scatterPlot;
     100       
    97101        //save selected x and y variable in content
    98102        this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem;
Note: See TracChangeset for help on using the changeset viewer.