Last change
on this file since 1904 was
1885,
checked in by mstoeger, 15 years ago
|
xaxis grid color can be set in the options dialog #555
|
File size:
1.5 KB
|
Line | |
---|
1 | using System.Drawing;
|
---|
2 | using HeuristicLab.Visualization.LabelProvider;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.Visualization {
|
---|
5 | public delegate void XAxisDescriptorChangedHandler(XAxisDescriptor sender);
|
---|
6 |
|
---|
7 | public class XAxisDescriptor {
|
---|
8 | private string label = "";
|
---|
9 | private bool showLabel = true;
|
---|
10 | private bool showGrid = true;
|
---|
11 | private Color gridColor = Color.LightBlue;
|
---|
12 | private ILabelProvider labelProvider = new ContinuousLabelProvider("0.##");
|
---|
13 |
|
---|
14 | public event XAxisDescriptorChangedHandler XAxisDescriptorChanged;
|
---|
15 |
|
---|
16 | public bool ShowGrid {
|
---|
17 | get { return showGrid; }
|
---|
18 | set {
|
---|
19 | this.showGrid = value;
|
---|
20 | FireXAxisDescriptorChanged();
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public ILabelProvider LabelProvider {
|
---|
25 | get { return labelProvider; }
|
---|
26 | set {
|
---|
27 | this.labelProvider = value;
|
---|
28 | FireXAxisDescriptorChanged();
|
---|
29 | }
|
---|
30 | }
|
---|
31 |
|
---|
32 | public string Label {
|
---|
33 | get { return label; }
|
---|
34 | set {
|
---|
35 | label = value;
|
---|
36 | FireXAxisDescriptorChanged();
|
---|
37 | }
|
---|
38 | }
|
---|
39 |
|
---|
40 | public bool ShowLabel {
|
---|
41 | get { return showLabel; }
|
---|
42 | set {
|
---|
43 | showLabel = value;
|
---|
44 | FireXAxisDescriptorChanged();
|
---|
45 | }
|
---|
46 | }
|
---|
47 |
|
---|
48 | public Color GridColor {
|
---|
49 | get { return this.gridColor; }
|
---|
50 | set {
|
---|
51 | this.gridColor = value;
|
---|
52 | FireXAxisDescriptorChanged();
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 | private void FireXAxisDescriptorChanged() {
|
---|
57 | if (XAxisDescriptorChanged != null)
|
---|
58 | XAxisDescriptorChanged(this);
|
---|
59 | }
|
---|
60 | }
|
---|
61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.