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