Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1972


Ignore:
Timestamp:
05/30/09 12:19:16 (16 years ago)
Author:
shofstad
Message:

DataRowSettings updated (#636)

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.Test/3.2/LineChartTests.cs

    r1962 r1972  
    3434      row3.RowSettings.Label = "Maxi";
    3535
    36       row1.Style = DrawingStyle.Solid;
    37       row2.Style = DrawingStyle.Solid;
    38       row3.Style = DrawingStyle.Dashed;
     36      row1.RowSettings.Style = DrawingStyle.Solid;
     37      row2.RowSettings.Style = DrawingStyle.Solid;
     38      row3.RowSettings.Style = DrawingStyle.Dashed;
    3939
    4040
     
    100100      row1.RowSettings.Color = Color.Red;
    101101      row1.RowSettings.Thickness = 3;
    102       row1.Style = DrawingStyle.Solid;
     102      row1.RowSettings.Style = DrawingStyle.Solid;
    103103      row1.RowSettings.Label = "Die Rote";
    104104
    105105      row2.RowSettings.Color = Color.Green;
    106106      row2.RowSettings.Thickness = 3;
    107       row2.Style = DrawingStyle.Solid;
     107      row2.RowSettings.Style = DrawingStyle.Solid;
    108108      row2.RowSettings.Label = "Die Grüne";
    109109
    110110      row3.RowSettings.Color = Color.Blue;
    111111      row3.RowSettings.Thickness = 3;
    112       row3.Style = DrawingStyle.Solid;
     112      row3.RowSettings.Style = DrawingStyle.Solid;
    113113      row3.RowSettings.Label = "Die Blaue";
    114114      row3.YAxis = yaxis2;
     
    143143      row1.RowSettings.Color = Color.Red;
    144144      row1.RowSettings.Thickness = 3;
    145       row1.Style = DrawingStyle.Solid;
     145      row1.RowSettings.Style = DrawingStyle.Solid;
    146146
    147147      model.AddDataRow(row1);
     
    152152      aggregator.RowSettings.Color = Color.Pink;
    153153      aggregator.RowSettings.Thickness = 5;
    154       aggregator.Style = DrawingStyle.Solid;
    155       aggregator.LineType = DataRowType.SingleValue;
     154      aggregator.RowSettings.Style = DrawingStyle.Solid;
     155      aggregator.RowSettings.LineType = DataRowType.SingleValue;
    156156      aggregator.AddWatch(row1);
    157157
     
    182182        row1.RowSettings.Thickness = 2;
    183183        row1.RowSettings.Label = "Sinus";
    184         row1.Style = DrawingStyle.Solid;
    185         row1.ShowMarkers = false;
     184        row1.RowSettings.Style = DrawingStyle.Solid;
     185        row1.RowSettings.ShowMarkers = false;
    186186        model.AddDataRow(row1);
    187187
     
    190190        row2.RowSettings.Thickness = 3;
    191191        row2.RowSettings.Label = "Growing";
    192         row2.Style = DrawingStyle.Solid;
    193         row2.ShowMarkers = false;
     192        row2.RowSettings.Style = DrawingStyle.Solid;
     193        row2.RowSettings.ShowMarkers = false;
    194194        model.AddDataRow(row2);
    195195
     
    198198        multiAvgAggregator.RowSettings.Color = Color.DarkOliveGreen;
    199199        multiAvgAggregator.RowSettings.Thickness = 3;
    200         multiAvgAggregator.Style = DrawingStyle.Solid;
    201         multiAvgAggregator.LineType = DataRowType.SingleValue;
    202         multiAvgAggregator.ShowMarkers = false;
     200        multiAvgAggregator.RowSettings.Style = DrawingStyle.Solid;
     201        multiAvgAggregator.RowSettings.LineType = DataRowType.SingleValue;
     202        multiAvgAggregator.RowSettings.ShowMarkers = false;
    203203        multiAvgAggregator.AddWatch(row1);
    204204        multiAvgAggregator.AddWatch(row2);
     
    209209        multiMaxAggregator.RowSettings.Color = Color.DarkKhaki;
    210210        multiMaxAggregator.RowSettings.Thickness = 3;
    211         multiMaxAggregator.Style = DrawingStyle.Solid;
    212         multiMaxAggregator.LineType = DataRowType.SingleValue;
    213         multiMaxAggregator.ShowMarkers = false;
     211        multiMaxAggregator.RowSettings.Style = DrawingStyle.Solid;
     212        multiMaxAggregator.RowSettings.LineType = DataRowType.SingleValue;
     213        multiMaxAggregator.RowSettings.ShowMarkers = false;
    214214        multiMaxAggregator.AddWatch(row1);
    215215        multiMaxAggregator.AddWatch(row2);
     
    220220        multiMinAggregator.RowSettings.Color = Color.DarkRed;
    221221        multiMinAggregator.RowSettings.Thickness = 3;
    222         multiMinAggregator.Style = DrawingStyle.Solid;
    223         multiMinAggregator.LineType = DataRowType.SingleValue;
    224         multiMinAggregator.ShowMarkers = false;
     222        multiMinAggregator.RowSettings.Style = DrawingStyle.Solid;
     223        multiMinAggregator.RowSettings.LineType = DataRowType.SingleValue;
     224        multiMinAggregator.RowSettings.ShowMarkers = false;
    225225        multiMinAggregator.AddWatch(row1);
    226226        multiMinAggregator.AddWatch(row2);
     
    260260        row1.RowSettings.Thickness = 2;
    261261        row1.RowSettings.Label = "Sinus";
    262         row1.Style = DrawingStyle.Solid;
    263         row1.ShowMarkers = false;
     262        row1.RowSettings.Style = DrawingStyle.Solid;
     263        row1.RowSettings.ShowMarkers = false;
    264264        model.AddDataRow(row1);
    265265
     
    268268        row2.RowSettings.Thickness = 3;
    269269        row2.RowSettings.Label = "Growing";
    270         row2.Style = DrawingStyle.Solid;
    271         row2.ShowMarkers = false;
     270        row2.RowSettings.Style = DrawingStyle.Solid;
     271        row2.RowSettings.ShowMarkers = false;
    272272        model.AddDataRow(row2);
    273273
     
    276276        aggregator.RowSettings.Color = Color.Pink;
    277277        aggregator.RowSettings.Thickness = 3;
    278         aggregator.Style = DrawingStyle.Solid;
    279         aggregator.LineType = DataRowType.SingleValue;
     278        aggregator.RowSettings.Style = DrawingStyle.Solid;
     279        aggregator.RowSettings.LineType = DataRowType.SingleValue;
    280280        aggregator.AddWatch(row1);
    281281        model.AddDataRow(aggregator);
     
    285285        maxAggregator.RowSettings.Color = Color.DeepSkyBlue;
    286286        maxAggregator.RowSettings.Thickness = 3;
    287         maxAggregator.Style = DrawingStyle.Solid;
    288         maxAggregator.LineType = DataRowType.SingleValue;
     287        maxAggregator.RowSettings.Style = DrawingStyle.Solid;
     288        maxAggregator.RowSettings.LineType = DataRowType.SingleValue;
    289289        maxAggregator.AddWatch(row1);
    290290        model.AddDataRow(maxAggregator);
     
    294294        avgAggregator.RowSettings.Color = Color.Violet;
    295295        avgAggregator.RowSettings.Thickness = 3;
    296         avgAggregator.Style = DrawingStyle.Solid;
    297         avgAggregator.LineType = DataRowType.SingleValue;
     296        avgAggregator.RowSettings.Style = DrawingStyle.Solid;
     297        avgAggregator.RowSettings.LineType = DataRowType.SingleValue;
    298298        avgAggregator.AddWatch(row1);
    299299        model.AddDataRow(avgAggregator);
     
    319319        row1.RowSettings.Thickness = 2;
    320320        row1.RowSettings.Label = "Sinus";
    321         row1.Style = DrawingStyle.Solid;
    322         row1.ShowMarkers = false;
     321        row1.RowSettings.Style = DrawingStyle.Solid;
     322        row1.RowSettings.ShowMarkers = false;
    323323        model.AddDataRow(row1);
    324324
     
    327327        row2.RowSettings.Thickness = 3;
    328328        row2.RowSettings.Label = "Growing";
    329         row2.Style = DrawingStyle.Solid;
    330         row2.ShowMarkers = false;
     329        row2.RowSettings.Style = DrawingStyle.Solid;
     330        row2.RowSettings.ShowMarkers = false;
    331331        model.AddDataRow(row2);
    332332
     
    335335        avgLineAggregator.RowSettings.Color = Color.Violet;
    336336        avgLineAggregator.RowSettings.Thickness = 3;
    337         avgLineAggregator.Style = DrawingStyle.Solid;
    338         avgLineAggregator.LineType = DataRowType.Normal;
    339         avgLineAggregator.ShowMarkers = false;
     337        avgLineAggregator.RowSettings.Style = DrawingStyle.Solid;
     338        avgLineAggregator.RowSettings.LineType = DataRowType.Normal;
     339        avgLineAggregator.RowSettings.ShowMarkers = false;
    340340        avgLineAggregator.AddWatch(row1);
    341341        avgLineAggregator.AddWatch(row2);
     
    361361        row1.RowSettings.Thickness = 2;
    362362        row1.RowSettings.Label = "SinusHacked";
    363         row1.Style = DrawingStyle.Solid;
    364         row1.ShowMarkers = false;
     363        row1.RowSettings.Style = DrawingStyle.Solid;
     364        row1.RowSettings.ShowMarkers = false;
    365365        model.AddDataRow(row1);
    366366
     
    369369        row2.RowSettings.Thickness = 3;
    370370        row2.RowSettings.Label = "GrowingHacked";
    371         row2.Style = DrawingStyle.Solid;
    372         row2.ShowMarkers = false;
     371        row2.RowSettings.Style = DrawingStyle.Solid;
     372        row2.RowSettings.ShowMarkers = false;
    373373        model.AddDataRow(row2);
    374374
     
    377377        avgAggregator.RowSettings.Label = "floatingAvg";
    378378        avgAggregator.RowSettings.Color = Color.Peru;
    379         avgAggregator.ShowMarkers = false;
    380         avgAggregator.Style = DrawingStyle.Solid;
     379        avgAggregator.RowSettings.ShowMarkers = false;
     380        avgAggregator.RowSettings.Style = DrawingStyle.Solid;
    381381
    382382        avgAggregator.AddWatch(row1);
     
    387387        avgAggregator2.RowSettings.Label = "floatingAvg";
    388388        avgAggregator2.RowSettings.Color = Color.Aqua;
    389         avgAggregator2.ShowMarkers = false;
    390         avgAggregator2.Style = DrawingStyle.Solid;
     389        avgAggregator2.RowSettings.ShowMarkers = false;
     390        avgAggregator2.RowSettings.Style = DrawingStyle.Solid;
    391391
    392392        avgAggregator2.AddWatch(row2);
     
    491491      row1.RowSettings.Color = Color.Red;
    492492      row1.RowSettings.Thickness = 3;
    493       row1.Style = DrawingStyle.Solid;
     493      row1.RowSettings.Style = DrawingStyle.Solid;
    494494
    495495      model.AddDataRow(row1);
     
    543543      row6.RowSettings.Label = "anyways";
    544544
    545       row1.Style = DrawingStyle.Solid;
    546       row2.Style = DrawingStyle.Solid;
    547       row3.Style = DrawingStyle.Dashed;
    548 
    549       row4.Style = DrawingStyle.Solid;
    550       row5.Style = DrawingStyle.Solid;
    551       row6.Style = DrawingStyle.Dashed;
    552 
    553       row1.LineType = DataRowType.SingleValue;
    554       row2.LineType = DataRowType.SingleValue;
     545      row1.RowSettings.Style = DrawingStyle.Solid;
     546      row2.RowSettings.Style = DrawingStyle.Solid;
     547      row3.RowSettings.Style = DrawingStyle.Dashed;
     548
     549      row4.RowSettings.Style = DrawingStyle.Solid;
     550      row5.RowSettings.Style = DrawingStyle.Solid;
     551      row6.RowSettings.Style = DrawingStyle.Dashed;
     552
     553      row1.RowSettings.LineType = DataRowType.SingleValue;
     554      row2.RowSettings.LineType = DataRowType.SingleValue;
    555555      row1.AddValue(12);
    556556
     
    591591      row1.RowSettings.Color = Color.Red;
    592592      row1.RowSettings.Thickness = 3;
    593       row1.Style = DrawingStyle.Dashed;
    594 
    595       row1.LineType = DataRowType.Points;
     593      row1.RowSettings.Style = DrawingStyle.Dashed;
     594
     595      row1.RowSettings.LineType = DataRowType.Points;
    596596      model.AddDataRow(row1);
    597597
  • trunk/sources/HeuristicLab.Visualization/3.2/DataRow.cs

    r1962 r1972  
    3232      this.RowSettings.Color = color;
    3333      this.RowSettings.Thickness = thickness;
    34       this.Style = style;
     34      this.RowSettings.Style = style;
    3535      this.dataRow = dataRow;
    36       this.ShowMarkers = true;
     36      this.RowSettings.ShowMarkers = true;
    3737    }
    3838
     
    4141      this.RowSettings.Color = color;
    4242      this.RowSettings.Thickness = thickness;
    43       this.Style = style;
    44       this.ShowMarkers = showMarkers;
     43      this.RowSettings.Style = style;
     44      this.RowSettings.ShowMarkers = showMarkers;
    4545      this.dataRow = dataRow;
    4646    }
  • trunk/sources/HeuristicLab.Visualization/3.2/DataRowBase.cs

    r1962 r1972  
    66    //private Color color = Color.Black;
    77    //private int thickness = 2;
    8     private DrawingStyle style = DrawingStyle.Solid;
    9     private DataRowType lineType = DataRowType.Normal;
     8//    private DrawingStyle style = DrawingStyle.Solid;
     9//    private DataRowType lineType = DataRowType.Normal;
    1010    private YAxisDescriptor yAxis;
    11     private bool showMarkers = true;
     11//    private bool showMarkers = true;
    1212
    13     private DataRowSettings rowSettings = new DataRowSettings();
     13    private DataRowSettings rowSettings ;
    1414
    1515    public DataRowSettings RowSettings {
    1616      get { return rowSettings; }
    17       set { rowSettings = value; }
     17      set {
     18        rowSettings.DataVisualSettingChanged -= value_DataVisualSettingChanged;
     19        value.DataVisualSettingChanged += value_DataVisualSettingChanged;
     20        rowSettings = value;
     21      }
    1822    }
    1923
    20     public bool ShowMarkers {
    21       get { return showMarkers; }
    22       set {
    23         showMarkers = value;
    24         OnDataRowChanged(this);
    25       }
    26     }         
     24    public DataRowBase() {
     25      rowSettings = new DataRowSettings();
     26      rowSettings.DataVisualSettingChanged += value_DataVisualSettingChanged;
     27    }
     28
     29    void value_DataVisualSettingChanged(DataRowSettings row) {
     30      OnDataRowChanged(this);
     31    }
     32
     33//    public bool ShowMarkers {
     34//      get { return showMarkers; }
     35//      set {
     36//        showMarkers = value;
     37//        OnDataRowChanged(this);
     38//      }
     39//    }         
    2740
    2841//    public string Label {
     
    5063//    }
    5164
    52     public DrawingStyle Style {
    53       get { return style; }
    54       set {
    55         style = value;
    56         OnDataRowChanged(this);
    57       }
    58     }
    59 
    60     public DataRowType LineType {
    61       get { return lineType; }
    62       set {
    63         lineType = value;
    64         OnDataRowChanged(this);
    65       }
    66     }
     65//    public DrawingStyle Style {
     66//      get { return style; }
     67//      set {
     68//        style = value;
     69//        OnDataRowChanged(this);
     70//      }
     71//    }
     72//
     73//    public DataRowType LineType {
     74//      get { return lineType; }
     75//      set {
     76//        lineType = value;
     77//        OnDataRowChanged(this);
     78//      }
     79//    }
    6780
    6881    public YAxisDescriptor YAxis {
  • trunk/sources/HeuristicLab.Visualization/3.2/IDataRow.cs

    r1962 r1972  
    1111    //Color Color { get; set; }
    1212    //int Thickness { get; set; }
    13     DrawingStyle Style { get; set; }
    14     DataRowType LineType { get; set; }
    15     bool ShowMarkers { get; set; }
     13//    DrawingStyle Style { get; set; }
     14//    DataRowType LineType { get; set; }
     15//    bool ShowMarkers { get; set; }
    1616    DataRowSettings RowSettings { get; set; }
    1717 
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/DataRowSettings.cs

    r1962 r1972  
    44  public class DataRowSettings {
    55    public event UpdateDataRowSettingsHandler OnUpdateDataRowSettings;
     6    public event DataVisualSettingChangedHandler DataVisualSettingChanged;
    67
    78    private string label;
     
    3637    }
    3738
    38 //    public bool ShowMarkers {
    39 //      get { return showMarkers; }
    40 //      set {
    41 //        showMarkers = value;
    42 //        //OnDataRowChanged(this);
    43 //      }
    44 //    }
    45 
    4639    public string Label {
    4740      get { return label; }
    4841      set {
    4942        label = value;
    50         //OnDataRowChanged(this);
     43        OnDataVisualSettingChanged(this);
    5144      }
    5245    }
    53 
     46   
    5447    public Color Color {
    5548      get { return color; }
    5649      set {
    5750        color = value;
    58         //OnDataRowChanged(this);
     51        OnDataVisualSettingChanged(this);
    5952      }
    6053    }
     
    6457      set {
    6558        thickness = value;
    66         //OnDataRowChanged(this);
     59        OnDataVisualSettingChanged(this);
    6760      }
    6861    }
    6962
    70 //    public DrawingStyle Style {
    71 //      get { return style; }
    72 //      set {
    73 //        style = value;
    74 //        //OnDataRowChanged(this);
    75 //      }
    76 //    }
    77 //
    78 //    public DataRowType LineType {
    79 //      get { return lineType; }
    80 //      set {
    81 //        lineType = value;
    82 //        //OnDataRowChanged(this);
    83 //      }
    84 //    }
     63    public DrawingStyle Style {
     64      get { return style; }
     65      set {
     66        style = value;
     67        OnDataVisualSettingChanged(this);
     68      }
     69    }
     70
     71    public DataRowType LineType {
     72      get { return lineType; }
     73      set {
     74        lineType = value;
     75        OnDataVisualSettingChanged(this);
     76      }
     77    }
     78
     79    public bool ShowMarkers {
     80      get { return showMarkers; }
     81      set {
     82        showMarkers = value;
     83        OnDataVisualSettingChanged(this);
     84      }
     85    }
     86   
     87    protected void OnDataVisualSettingChanged(DataRowSettings row) {
     88      if (DataVisualSettingChanged != null) {
     89        DataVisualSettingChanged(this);
     90      }
     91    }
     92
    8593  }
    8694  public delegate void UpdateDataRowSettingsHandler();
     95  public delegate void DataVisualSettingChangedHandler(DataRowSettings row);
    8796}
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/Options.cs

    r1962 r1972  
    2929        Color = row.RowSettings.Color;
    3030        Thickness = row.RowSettings.Thickness;
    31         Style = row.Style;
     31        Style = row.RowSettings.Style;
    3232        this.row = row;
    33         this.ShowMarkers = row.ShowMarkers;
     33        this.ShowMarkers = row.RowSettings.ShowMarkers;
    3434      }
    3535
     
    3838        row.RowSettings.Color = Color;
    3939        row.RowSettings.Thickness = Thickness;
    40         row.Style = Style;
    41         row.ShowMarkers = this.ShowMarkers;
     40        row.RowSettings.Style = Style;
     41        row.RowSettings.ShowMarkers = this.ShowMarkers;
    4242      }
    4343    }
     
    170170        LineThicknessCB.DataSource = GetThicknesses();
    171171        LinestyleCB.DataSource = GetStyles();
    172         LinestyleCB.SelectedItem = model.Rows[0].Style;
     172        LinestyleCB.SelectedItem = model.Rows[0].RowSettings.Style;
    173173        LineThicknessCB.SelectedItem = model.Rows[0].RowSettings.Thickness;
    174         MarkercheckBox.Checked = model.Rows[0].ShowMarkers;
     174        MarkercheckBox.Checked = model.Rows[0].RowSettings.ShowMarkers;
    175175
    176176        LineSelectCB.DataSource = model.Rows;
     
    216216          LinestyleCB.SelectedIndex = index;  */
    217217        LineThicknessCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Thickness;
    218         LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).Style;
     218        LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Style;
    219219        selectedLineColorSelection.Color = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Color;
    220         MarkercheckBox.Checked = ((IDataRow)LineSelectCB.SelectedValue).ShowMarkers;
     220        MarkercheckBox.Checked = ((IDataRow)LineSelectCB.SelectedValue).RowSettings.ShowMarkers;
    221221      }
    222222    }
     
    229229    private void LinestyleCB_SelectedIndexChanged(object sender, EventArgs e) {
    230230      if (LineSelectCB.SelectedValue != null) {
    231         ((IDataRow)LineSelectCB.SelectedValue).Style = (DrawingStyle)LinestyleCB.SelectedItem;
     231        ((IDataRow)LineSelectCB.SelectedValue).RowSettings.Style = (DrawingStyle)LinestyleCB.SelectedItem;
    232232      }
    233233    }
     
    241241    private void MarkercheckBox_CheckedChanged(object sender, EventArgs e) {
    242242      if (LineSelectCB.SelectedValue != null) {
    243         ((IDataRow)LineSelectCB.SelectedValue).ShowMarkers = MarkercheckBox.Checked;
     243        ((IDataRow)LineSelectCB.SelectedValue).RowSettings.ShowMarkers = MarkercheckBox.Checked;
    244244      }
    245245    }
Note: See TracChangeset for help on using the changeset viewer.