Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Visualization/Options/ViewSettings.cs @ 1342

Last change on this file since 1342 was 1342, checked in by shofstad, 15 years ago

Legend implementation updated with position setting (#407)

File size: 1.7 KB
RevLine 
[1341]1using System.Drawing;
[1342]2using HeuristicLab.Visualization.Legend;
[1341]3
4namespace HeuristicLab.Visualization.Options {
5  public class ViewSettings {
6    public event UpdateViewSettingsHandler OnUpdateSettings;
7
8    private Font titleFont;
9    private Color titleColor;
10    private Font legendFont;
11    private Color legendColor;
12    private Font xAxisFont;
13    private Color xAxisColor;
[1342]14    private LegendPosition legendPosition;
[1341]15
16    public ViewSettings() {
17      titleFont = new Font("Arial", 8);
18      titleColor = Color.Blue;
19
20      legendFont = new Font("Arial", 8);
21      legendColor = Color.Blue;
22
23      xAxisFont = new Font("Arial", 8);
24      xAxisColor = Color.Blue;
[1342]25
26      legendPosition = LegendPosition.Left;
[1341]27    }
28
29    public void UpdateView() {
30      if (OnUpdateSettings != null) {
31        OnUpdateSettings();
32      }
33    }
34
35    public Font TitleFont {
36      get { return titleFont; }
37      set { titleFont = value; }
38    }
39
40    public Color TitleColor {
41      get { return titleColor; }
42      set { titleColor = value; }
43    }
44
45    public Font LegendFont {
46      get { return legendFont; }
47      set { legendFont = value; }
48    }
49
50    public Color LegendColor {
51      get { return legendColor; }
52      set { legendColor = value; }
53    }
54
55    public Font XAxisFont {
56      get { return xAxisFont; }
57      set { xAxisFont = value; }
58    }
59
60    public Color XAxisColor {
61      get { return xAxisColor; }
62      set { xAxisColor = value; }
63    }
[1342]64
65    public LegendPosition LegendPosition {
66      get { return legendPosition; }
67      set { legendPosition = value; }
68    }
[1341]69  }
70
71  public delegate void UpdateViewSettingsHandler();
72}
Note: See TracBrowser for help on using the repository browser.