- Timestamp:
- 03/16/09 19:42:17 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/MinAggregator.cs
r1343 r1350 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Drawing;4 using HeuristicLab.Visualization.LabelProvider;5 3 6 4 namespace HeuristicLab.Visualization { 7 public class MinAggregator : IAggregator{5 public class MinAggregator : DataRowBase { 8 6 #region IAggregator Members 9 7 … … 50 48 } else { 51 49 curMinValue = double.MaxValue; 52 foreach ( varrows in dataRowWatches) {50 foreach (IDataRow rows in dataRowWatches) { 53 51 for (int i = 0; i < rows.Count; i++) { 54 52 if (rows[i] < curMinValue) { … … 65 63 #region IDataRow Members 66 64 67 private string label = ""; 68 private Color color = Color.Black; 69 private int thickness = 2; 70 private DrawingStyle style = DrawingStyle.Solid; 71 private DataRowType lineType = DataRowType.Normal; 72 73 74 public string Label { 75 get { return label; } 76 set { 77 label = value; 78 OnDataRowChanged(this); 79 } 80 } 81 82 public Color Color { 83 get { return color; } 84 set { 85 color = value; 86 OnDataRowChanged(this); 87 } 88 } 89 90 public int Thickness { 91 get { return thickness; } 92 set { 93 thickness = value; 94 OnDataRowChanged(this); 95 } 96 } 97 98 public DrawingStyle Style { 99 get { return style; } 100 set { 101 style = value; 102 OnDataRowChanged(this); 103 } 104 } 105 106 public DataRowType LineType { 107 get { return lineType; } 108 set { 109 lineType = value; 110 OnDataRowChanged(this); 111 } 112 } 113 114 115 private bool showYAxis = false; 116 117 public bool ShowYAxis { 118 get { return showYAxis; } 119 set { 120 showYAxis = value; 121 OnDataRowChanged(this); 122 } 123 } 124 125 private ILabelProvider labelProvider = new ContinuousLabelProvider("0.##"); 126 public ILabelProvider YAxisLabelProvider { 127 get { return labelProvider; } 128 set { 129 this.labelProvider = value; 130 OnDataRowChanged(this); 131 } 132 } 133 134 public void AddValue(double value) { 65 public override void AddValue(double value) { 135 66 OnValueChanged(2, 0, Action.Added); 136 67 } 137 68 138 public void AddValue(double value, int index) {69 public override void AddValue(double value, int index) { 139 70 throw new NotSupportedException(); 140 71 } 141 72 142 public void AddValues(double[] values) {73 public override void AddValues(double[] values) { 143 74 throw new NotSupportedException(); 144 75 } 145 76 146 public void AddValues(double[] values, int index) {77 public override void AddValues(double[] values, int index) { 147 78 throw new NotSupportedException(); 148 79 } 149 80 150 public void ModifyValue(double value, int index) {81 public override void ModifyValue(double value, int index) { 151 82 throw new NotSupportedException(); 152 83 } 153 84 154 public void ModifyValues(double[] values, int index) {85 public override void ModifyValues(double[] values, int index) { 155 86 throw new NotSupportedException(); 156 87 } 157 88 158 public void RemoveValue(int index) {89 public override void RemoveValue(int index) { 159 90 throw new NotSupportedException(); 160 91 } 161 92 162 public void RemoveValues(int index, int count) {93 public override void RemoveValues(int index, int count) { 163 94 throw new NotSupportedException(); 164 95 } 165 96 166 public int Count {97 public override int Count { 167 98 get { return 1; } 168 99 } 169 100 170 public double this[int index] {101 public override double this[int index] { 171 102 get { 172 103 return curMinValue; … … 177 108 } 178 109 179 public double MinValue {180 get { throw new System.NotImplementedException(); }110 public override double MinValue { 111 get { return curMinValue; } 181 112 } 182 113 183 public double MaxValue { 184 get { throw new System.NotImplementedException(); } 185 } 186 187 public event ValuesChangedHandler ValuesChanged; 188 189 protected void OnValuesChanged(double[] values, int index, Action action) { 190 if (ValuesChanged != null) { 191 ValuesChanged(this, values, index, action); 192 } 193 } 194 195 public event ValueChangedHandler ValueChanged; 196 197 protected void OnValueChanged(double value, int index, Action action) { 198 if (ValueChanged != null) { 199 ValueChanged(this, value, index, action); 200 } 201 } 202 203 public event DataRowChangedHandler DataRowChanged; 204 205 protected void OnDataRowChanged(IDataRow row) { 206 if (DataRowChanged != null) { 207 DataRowChanged(this); 208 } 114 public override double MaxValue { 115 get { return curMinValue; } 209 116 } 210 117
Note: See TracChangeset
for help on using the changeset viewer.