Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/11 17:33:13 (13 years ago)
Author:
abeham
Message:

#1465

  • Fixed some bugs
  • Fixed out-of-sync issue in DataRowVisualPropertiesControl
  • Added border in histogram (white for very dark colors)
  • Added serializer for System.Drawing.Font
  • Added option to choose the font of the title as well as the axis of the chart
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs

    r6014 r6020  
    2121
    2222using System.ComponentModel;
     23using System.Drawing;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3031  [StorableClass]
    3132  public class DataTableVisualProperties : DeepCloneable, INotifyPropertyChanged {
     33    private Font titleFont;
     34    public Font TitleFont {
     35      get { return titleFont; }
     36      set {
     37        if (titleFont == null || value == null
     38          || titleFont.Name != value.Name || titleFont.Size != value.Size || titleFont.Style != value.Style) {
     39          titleFont = value;
     40          OnPropertyChanged("TitleFont");
     41        }
     42      }
     43    }
     44    private Color titleColor;
     45    public Color TitleColor {
     46      get { return titleColor; }
     47      set {
     48        if (titleColor != value) {
     49          titleColor = value;
     50          OnPropertyChanged("TitleFontColor");
     51        }
     52      }
     53    }
     54    private Font axisTitleFont;
     55    public Font AxisTitleFont {
     56      get { return axisTitleFont; }
     57      set {
     58        if (axisTitleFont == null || axisTitleFont == null
     59          || axisTitleFont.Name != value.Name || axisTitleFont.Size != value.Size || axisTitleFont.Style != value.Style) {
     60          axisTitleFont = value;
     61          OnPropertyChanged("AxisTitleFont");
     62        }
     63      }
     64    }
     65    private Color axisTitleColor;
     66    public Color AxisTitleColor {
     67      get { return axisTitleColor; }
     68      set {
     69        if (axisTitleColor != value) {
     70          axisTitleColor = value;
     71          OnPropertyChanged("AxisTitleColor");
     72        }
     73      }
     74    }
    3275    private string xAxisTitle;
    3376    public string XAxisTitle {
     
    263306
    264307    #region Persistence Properties
     308    [Storable(Name = "TitleFont")]
     309    private Font StorableTitleFont {
     310      get { return titleFont; }
     311      set { titleFont = value; }
     312    }
     313    [Storable(Name = "TitleColor")]
     314    private Color StorableTitleColor {
     315      get { return titleColor; }
     316      set { titleColor = value; }
     317    }
     318    [Storable(Name = "AxisTitleFont")]
     319    private Font StorableAxisTitleFont {
     320      get { return axisTitleFont; }
     321      set { axisTitleFont = value; }
     322    }
     323    [Storable(Name = "AxisTitleColor")]
     324    private Color StorableAxisTitleColor {
     325      get { return axisTitleColor; }
     326      set { axisTitleColor = value; }
     327    }
    265328    [Storable(Name = "XAxisTitle")]
    266329    private string StorableXAxisTitle {
     
    369432    protected DataTableVisualProperties(DataTableVisualProperties original, Cloner cloner)
    370433      : base(original, cloner) {
     434      if (original.titleFont != null)
     435        this.titleFont = (Font)original.titleFont.Clone();
     436      if (original.axisTitleFont != null)
     437        this.axisTitleFont = (Font)original.axisTitleFont.Clone();
    371438      this.xAxisTitle = original.xAxisTitle;
    372439      this.yAxisTitle = original.yAxisTitle;
     
    391458    }
    392459    public DataTableVisualProperties() {
     460      titleColor = Color.Black;
     461      axisTitleColor = Color.Black;
    393462      this.xAxisTitle = string.Empty;
    394463      this.yAxisTitle = string.Empty;
Note: See TracChangeset for help on using the changeset viewer.