Line | |
---|
1 | using HeuristicLab.Visualization.LabelProvider;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Visualization {
|
---|
4 | public delegate void XAxisDescriptorChangedHandler(XAxisDescriptor sender);
|
---|
5 |
|
---|
6 | public class XAxisDescriptor {
|
---|
7 | private string label = "";
|
---|
8 | private bool showLabel = true;
|
---|
9 | private bool showGrid = true;
|
---|
10 | private ILabelProvider labelProvider = new ContinuousLabelProvider("0.##");
|
---|
11 |
|
---|
12 | public event XAxisDescriptorChangedHandler XAxisDescriptorChanged;
|
---|
13 |
|
---|
14 | public bool ShowGrid {
|
---|
15 | get { return showGrid; }
|
---|
16 | set {
|
---|
17 | this.showGrid = value;
|
---|
18 | FireXAxisDescriptorChanged();
|
---|
19 | }
|
---|
20 | }
|
---|
21 |
|
---|
22 | public ILabelProvider LabelProvider {
|
---|
23 | get { return labelProvider; }
|
---|
24 | set {
|
---|
25 | this.labelProvider = value;
|
---|
26 | FireXAxisDescriptorChanged();
|
---|
27 | }
|
---|
28 | }
|
---|
29 |
|
---|
30 | public string Label {
|
---|
31 | get { return label; }
|
---|
32 | set {
|
---|
33 | label = value;
|
---|
34 | FireXAxisDescriptorChanged();
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | public bool ShowLabel {
|
---|
39 | get { return showLabel; }
|
---|
40 | set {
|
---|
41 | showLabel = value;
|
---|
42 | FireXAxisDescriptorChanged();
|
---|
43 | }
|
---|
44 | }
|
---|
45 |
|
---|
46 | private void FireXAxisDescriptorChanged() {
|
---|
47 | if (XAxisDescriptorChanged != null)
|
---|
48 | XAxisDescriptorChanged(this);
|
---|
49 | }
|
---|
50 | }
|
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.