- Timestamp:
- 06/07/11 12:49:03 (14 years ago)
- Location:
- branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs
r5445 r6377 36 36 Columns, 37 37 Points, 38 Bars 38 Bars, 39 Histogram 40 } 41 #endregion 42 #region LineStyle 43 public enum DataRowLineStyle { 44 Dash, 45 DashDot, 46 DashDotDot, 47 Dot, 48 NotSet, 49 Solid 39 50 } 40 51 #endregion … … 60 71 } 61 72 } 73 private bool secondXAxis; 74 public bool SecondXAxis { 75 get { return secondXAxis; } 76 set { 77 if (secondXAxis != value) { 78 secondXAxis = value; 79 OnPropertyChanged("SecondXAxis"); 80 } 81 } 82 } 62 83 private Color color; 63 84 public Color Color { … … 70 91 } 71 92 } 93 private DataRowLineStyle lineStyle; 94 public DataRowLineStyle LineStyle { 95 get { return lineStyle; } 96 set { 97 if (lineStyle != value) { 98 lineStyle = value; 99 OnPropertyChanged("LineStyle"); 100 } 101 } 102 } 72 103 private bool startIndexZero; 73 104 public bool StartIndexZero { … … 77 108 startIndexZero = value; 78 109 OnPropertyChanged("StartIndexZero"); 110 } 111 } 112 } 113 private int lineWidth; 114 public int LineWidth { 115 get { return lineWidth; } 116 set { 117 if (lineWidth != value) { 118 lineWidth = value; 119 OnPropertyChanged("LineWidth"); 120 } 121 } 122 } 123 private int bins; 124 public int Bins { 125 get { return bins; } 126 set { 127 if (bins != value) { 128 bins = value; 129 OnPropertyChanged("Bins"); 130 } 131 } 132 } 133 private bool exactBins; 134 public bool ExactBins { 135 get { return exactBins; } 136 set { 137 if (exactBins != value) { 138 exactBins = value; 139 OnPropertyChanged("ExactBins"); 79 140 } 80 141 } … … 92 153 set { secondYAxis = value; } 93 154 } 155 [Storable(Name = "SecondXAxis")] 156 private bool StorableSecondXAxis { 157 get { return secondXAxis; } 158 set { secondXAxis = value; } 159 } 94 160 [Storable(Name = "Color")] 95 161 private Color StorableColor { … … 97 163 set { color = value; } 98 164 } 165 [Storable(Name = "LineStyle")] 166 private DataRowLineStyle StorableLineStyle { 167 get { return lineStyle; } 168 set { lineStyle = value; } 169 } 99 170 [Storable(Name = "StartIndexZero")] 100 171 private bool StorableStartIndexZero { 101 172 get { return startIndexZero; } 102 173 set { startIndexZero = value; } 174 } 175 [Storable(Name = "LineWidth")] 176 private int StorableLineWidth { 177 get { return lineWidth; } 178 set { lineWidth = value; } 179 } 180 [Storable(Name = "Bins")] 181 private int StorableBins { 182 get { return bins; } 183 set { bins = value; } 184 } 185 [Storable(Name = "ExactBins")] 186 private bool StorableExactBins { 187 get { return exactBins; } 188 set { exactBins = value; } 103 189 } 104 190 #endregion … … 110 196 this.chartType = original.chartType; 111 197 this.secondYAxis = original.secondYAxis; 198 this.secondXAxis = original.secondXAxis; 112 199 this.color = original.color; 200 this.lineStyle = original.lineStyle; 113 201 this.startIndexZero = original.startIndexZero; 202 this.lineWidth = original.lineWidth; 203 this.bins = original.bins; 204 this.exactBins = original.exactBins; 114 205 } 115 206 public DataRowVisualProperties() { 116 207 chartType = DataRowChartType.Line; 117 208 secondYAxis = false; 209 secondXAxis = false; 118 210 color = Color.Empty; 211 lineStyle = DataRowLineStyle.Solid; 119 212 startIndexZero = false; 213 lineWidth = 1; 214 bins = 10; 215 exactBins = false; 120 216 } 121 217 -
branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs
r5445 r6377 21 21 22 22 using System.ComponentModel; 23 using System.Drawing; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 30 31 [StorableClass] 31 32 public class DataTableVisualProperties : DeepCloneable, INotifyPropertyChanged { 33 private Font titleFont; 34 public Font TitleFont { 35 get { return titleFont; } 36 set { 37 if (titleFont == null || value == null 38 || titleFont.Name != value.Name || titleFont.Size != value.Size || titleFont.Style != value.Style) { 39 titleFont = value; 40 OnPropertyChanged("TitleFont"); 41 } 42 } 43 } 44 private Color titleColor; 45 public Color TitleColor { 46 get { return titleColor; } 47 set { 48 if (titleColor != value) { 49 titleColor = value; 50 OnPropertyChanged("TitleFontColor"); 51 } 52 } 53 } 54 private Font axisTitleFont; 55 public Font AxisTitleFont { 56 get { return axisTitleFont; } 57 set { 58 if (axisTitleFont == null || axisTitleFont == null 59 || axisTitleFont.Name != value.Name || axisTitleFont.Size != value.Size || axisTitleFont.Style != value.Style) { 60 axisTitleFont = value; 61 OnPropertyChanged("AxisTitleFont"); 62 } 63 } 64 } 65 private Color axisTitleColor; 66 public Color AxisTitleColor { 67 get { return axisTitleColor; } 68 set { 69 if (axisTitleColor != value) { 70 axisTitleColor = value; 71 OnPropertyChanged("AxisTitleColor"); 72 } 73 } 74 } 32 75 private string xAxisTitle; 33 76 public string XAxisTitle { … … 54 97 } 55 98 99 private string secondXAxisTitle; 100 public string SecondXAxisTitle { 101 get { return secondXAxisTitle; } 102 set { 103 if (value == null) value = string.Empty; 104 if (secondXAxisTitle != value) { 105 secondXAxisTitle = value; 106 OnPropertyChanged("SecondXAxisTitle"); 107 } 108 } 109 } 110 56 111 private string secondYAxisTitle; 57 112 public string SecondYAxisTitle { … … 66 121 } 67 122 123 private bool xAxisMinimumAuto; 124 public bool XAxisMinimumAuto { 125 get { return xAxisMinimumAuto; } 126 set { 127 if (xAxisMinimumAuto != value) { 128 xAxisMinimumAuto = value; 129 if (value) xAxisMinimumFixedValue = double.NaN; 130 OnPropertyChanged("XAxisMinimumAuto"); 131 } 132 } 133 } 134 135 private bool xAxisMaximumAuto; 136 public bool XAxisMaximumAuto { 137 get { return xAxisMaximumAuto; } 138 set { 139 if (xAxisMaximumAuto != value) { 140 xAxisMaximumAuto = value; 141 if (value) xAxisMaximumFixedValue = double.NaN; 142 OnPropertyChanged("XAxisMaximumAuto"); 143 } 144 } 145 } 146 147 private double xAxisMinimumFixedValue; 148 public double XAxisMinimumFixedValue { 149 get { return xAxisMinimumFixedValue; } 150 set { 151 if (xAxisMinimumFixedValue != value) { 152 xAxisMinimumFixedValue = value; 153 OnPropertyChanged("XAxisMinimumFixedValue"); 154 } 155 } 156 } 157 158 private double xAxisMaximumFixedValue; 159 public double XAxisMaximumFixedValue { 160 get { return xAxisMaximumFixedValue; } 161 set { 162 if (xAxisMaximumFixedValue != value) { 163 xAxisMaximumFixedValue = value; 164 OnPropertyChanged("XAxisMaximumFixedValue"); 165 } 166 } 167 } 168 169 private bool secondXAxisMinimumAuto; 170 public bool SecondXAxisMinimumAuto { 171 get { return secondXAxisMinimumAuto; } 172 set { 173 if (secondXAxisMinimumAuto != value) { 174 secondXAxisMinimumAuto = value; 175 if (value) secondXAxisMinimumFixedValue = double.NaN; 176 OnPropertyChanged("SecondXAxisMinimumAuto"); 177 } 178 } 179 } 180 181 private bool secondXAxisMaximumAuto; 182 public bool SecondXAxisMaximumAuto { 183 get { return secondXAxisMaximumAuto; } 184 set { 185 if (secondXAxisMaximumAuto != value) { 186 secondXAxisMaximumAuto = value; 187 if (value) secondXAxisMaximumFixedValue = double.NaN; 188 OnPropertyChanged("SecondXAxisMaximumAuto"); 189 } 190 } 191 } 192 193 private double secondXAxisMinimumFixedValue; 194 public double SecondXAxisMinimumFixedValue { 195 get { return secondXAxisMinimumFixedValue; } 196 set { 197 if (secondXAxisMinimumFixedValue != value) { 198 secondXAxisMinimumFixedValue = value; 199 OnPropertyChanged("SecondXAxisMinimumFixedValue"); 200 } 201 } 202 } 203 204 private double secondXAxisMaximumFixedValue; 205 public double SecondXAxisMaximumFixedValue { 206 get { return secondXAxisMaximumFixedValue; } 207 set { 208 if (secondXAxisMaximumFixedValue != value) { 209 secondXAxisMaximumFixedValue = value; 210 OnPropertyChanged("SecondXAxisMaximumFixedValue"); 211 } 212 } 213 } 214 215 private bool yAxisMinimumAuto; 216 public bool YAxisMinimumAuto { 217 get { return yAxisMinimumAuto; } 218 set { 219 if (yAxisMinimumAuto != value) { 220 yAxisMinimumAuto = value; 221 if (value) yAxisMinimumFixedValue = double.NaN; 222 OnPropertyChanged("YAxisMinimumAuto"); 223 } 224 } 225 } 226 227 private bool yAxisMaximumAuto; 228 public bool YAxisMaximumAuto { 229 get { return yAxisMaximumAuto; } 230 set { 231 if (yAxisMaximumAuto != value) { 232 yAxisMaximumAuto = value; 233 if (value) yAxisMaximumFixedValue = double.NaN; 234 OnPropertyChanged("YAxisMaximumAuto"); 235 } 236 } 237 } 238 239 private double yAxisMinimumFixedValue; 240 public double YAxisMinimumFixedValue { 241 get { return yAxisMinimumFixedValue; } 242 set { 243 if (yAxisMinimumFixedValue != value) { 244 yAxisMinimumFixedValue = value; 245 OnPropertyChanged("YAxisMinimumFixedValue"); 246 } 247 } 248 } 249 250 private double yAxisMaximumFixedValue; 251 public double YAxisMaximumFixedValue { 252 get { return yAxisMaximumFixedValue; } 253 set { 254 if (yAxisMaximumFixedValue != value) { 255 yAxisMaximumFixedValue = value; 256 OnPropertyChanged("YAxisMaximumFixedValue"); 257 } 258 } 259 } 260 261 private bool secondYAxisMinimumAuto; 262 public bool SecondYAxisMinimumAuto { 263 get { return secondYAxisMinimumAuto; } 264 set { 265 if (secondYAxisMinimumAuto != value) { 266 secondYAxisMinimumAuto = value; 267 if (value) secondYAxisMinimumFixedValue = double.NaN; 268 OnPropertyChanged("SecondYAxisMinimumAuto"); 269 } 270 } 271 } 272 273 private bool secondYAxisMaximumAuto; 274 public bool SecondYAxisMaximumAuto { 275 get { return secondYAxisMaximumAuto; } 276 set { 277 if (secondYAxisMaximumAuto != value) { 278 secondYAxisMaximumAuto = value; 279 if (value) secondYAxisMaximumFixedValue = double.NaN; 280 OnPropertyChanged("SecondYAxisMaximumAuto"); 281 } 282 } 283 } 284 285 private double secondYAxisMinimumFixedValue; 286 public double SecondYAxisMinimumFixedValue { 287 get { return secondYAxisMinimumFixedValue; } 288 set { 289 if (secondYAxisMinimumFixedValue != value) { 290 secondYAxisMinimumFixedValue = value; 291 OnPropertyChanged("SecondYAxisMinimumFixedValue"); 292 } 293 } 294 } 295 296 private double secondYAxisMaximumFixedValue; 297 public double SecondYAxisMaximumFixedValue { 298 get { return secondYAxisMaximumFixedValue; } 299 set { 300 if (secondYAxisMaximumFixedValue != value) { 301 secondYAxisMaximumFixedValue = value; 302 OnPropertyChanged("SecondYAxisMaximumFixedValue"); 303 } 304 } 305 } 306 68 307 #region Persistence Properties 308 [Storable(Name = "TitleFont")] 309 private Font StorableTitleFont { 310 get { return titleFont; } 311 set { titleFont = value; } 312 } 313 [Storable(Name = "TitleColor")] 314 private Color StorableTitleColor { 315 get { return titleColor; } 316 set { titleColor = value; } 317 } 318 [Storable(Name = "AxisTitleFont")] 319 private Font StorableAxisTitleFont { 320 get { return axisTitleFont; } 321 set { axisTitleFont = value; } 322 } 323 [Storable(Name = "AxisTitleColor")] 324 private Color StorableAxisTitleColor { 325 get { return axisTitleColor; } 326 set { axisTitleColor = value; } 327 } 69 328 [Storable(Name = "XAxisTitle")] 70 329 private string StorableXAxisTitle { … … 77 336 set { yAxisTitle = value; } 78 337 } 338 [Storable(Name = "SecondXAxisTitle")] 339 private string StorableSecondXAxisTitle { 340 get { return secondXAxisTitle; } 341 set { secondXAxisTitle = value; } 342 } 79 343 [Storable(Name = "SecondYAxisTitle")] 80 344 private string StorableSecondYAxisTitle { … … 82 346 set { secondYAxisTitle = value; } 83 347 } 348 [Storable(Name = "XAxisMinimumAuto")] 349 private bool StorableXAxisMinimumAuto { 350 get { return xAxisMinimumAuto; } 351 set { xAxisMinimumAuto = value; } 352 } 353 [Storable(Name = "XAxisMaximumAuto")] 354 private bool StorableXAxisMaximumAuto { 355 get { return xAxisMaximumAuto; } 356 set { xAxisMaximumAuto = value; } 357 } 358 [Storable(Name = "XAxisMinimumFixedValue")] 359 private double StorableXAxisMinimumFixedValue { 360 get { return xAxisMinimumFixedValue; } 361 set { xAxisMinimumFixedValue = value; } 362 } 363 [Storable(Name = "XAxisMaximumFixedValue")] 364 private double StorableXAxisMaximumFixedValue { 365 get { return xAxisMaximumFixedValue; } 366 set { xAxisMaximumFixedValue = value; } 367 } 368 [Storable(Name = "SecondXAxisMinimumAuto")] 369 private bool StorableSecondXAxisMinimumAuto { 370 get { return secondXAxisMinimumAuto; } 371 set { secondXAxisMinimumAuto = value; } 372 } 373 [Storable(Name = "SecondXAxisMaximumAuto")] 374 private bool StorableSecondXAxisMaximumAuto { 375 get { return secondXAxisMaximumAuto; } 376 set { secondXAxisMaximumAuto = value; } 377 } 378 [Storable(Name = "SecondXAxisMinimumFixedValue")] 379 private double StorableSecondXAxisMinimumFixedValue { 380 get { return secondXAxisMinimumFixedValue; } 381 set { secondXAxisMinimumFixedValue = value; } 382 } 383 [Storable(Name = "SecondXAxisMaximumFixedValue")] 384 private double StorableSecondXAxisMaximumFixedValue { 385 get { return secondXAxisMaximumFixedValue; } 386 set { secondXAxisMaximumFixedValue = value; } 387 } 388 [Storable(Name = "YAxisMinimumAuto")] 389 private bool StorableYAxisMinimumAuto { 390 get { return yAxisMinimumAuto; } 391 set { yAxisMinimumAuto = value; } 392 } 393 [Storable(Name = "YAxisMaximumAuto")] 394 private bool StorableYAxisMaximumAuto { 395 get { return yAxisMaximumAuto; } 396 set { yAxisMaximumAuto = value; } 397 } 398 [Storable(Name = "YAxisMinimumFixedValue")] 399 private double StorableYAxisMinimumFixedValue { 400 get { return yAxisMinimumFixedValue; } 401 set { yAxisMinimumFixedValue = value; } 402 } 403 [Storable(Name = "YAxisMaximumFixedValue")] 404 private double StorableYAxisMaximumFixedValue { 405 get { return yAxisMaximumFixedValue; } 406 set { yAxisMaximumFixedValue = value; } 407 } 408 [Storable(Name = "SecondYAxisMinimumAuto")] 409 private bool StorableSecondYAxisMinimumAuto { 410 get { return secondYAxisMinimumAuto; } 411 set { secondYAxisMinimumAuto = value; } 412 } 413 [Storable(Name = "SecondYAxisMaximumAuto")] 414 private bool StorableSecondYAxisMaximumAuto { 415 get { return secondYAxisMaximumAuto; } 416 set { secondYAxisMaximumAuto = value; } 417 } 418 [Storable(Name = "SecondYAxisMinimumFixedValue")] 419 private double StorableSecondYAxisMinimumFixedValue { 420 get { return secondYAxisMinimumFixedValue; } 421 set { secondYAxisMinimumFixedValue = value; } 422 } 423 [Storable(Name = "SecondYAxisMaximumFixedValue")] 424 private double StorableSecondYAxisMaximumFixedValue { 425 get { return secondYAxisMaximumFixedValue; } 426 set { secondYAxisMaximumFixedValue = value; } 427 } 84 428 #endregion 85 429 … … 88 432 protected DataTableVisualProperties(DataTableVisualProperties original, Cloner cloner) 89 433 : base(original, cloner) { 434 if (original.titleFont != null) 435 this.titleFont = (Font)original.titleFont.Clone(); 436 if (original.axisTitleFont != null) 437 this.axisTitleFont = (Font)original.axisTitleFont.Clone(); 90 438 this.xAxisTitle = original.xAxisTitle; 91 439 this.yAxisTitle = original.yAxisTitle; 440 this.secondXAxisTitle = original.secondXAxisTitle; 92 441 this.secondYAxisTitle = original.secondYAxisTitle; 442 this.xAxisMinimumAuto = original.xAxisMinimumAuto; 443 this.xAxisMinimumFixedValue = original.xAxisMinimumFixedValue; 444 this.xAxisMaximumAuto = original.xAxisMaximumAuto; 445 this.xAxisMaximumFixedValue = original.xAxisMaximumFixedValue; 446 this.secondXAxisMinimumAuto = original.secondXAxisMinimumAuto; 447 this.secondXAxisMinimumFixedValue = original.secondXAxisMinimumFixedValue; 448 this.secondXAxisMaximumAuto = original.secondXAxisMaximumAuto; 449 this.secondXAxisMaximumFixedValue = original.secondXAxisMaximumFixedValue; 450 this.yAxisMinimumAuto = original.yAxisMinimumAuto; 451 this.yAxisMinimumFixedValue = original.yAxisMinimumFixedValue; 452 this.yAxisMaximumAuto = original.yAxisMaximumAuto; 453 this.yAxisMaximumFixedValue = original.yAxisMaximumFixedValue; 454 this.secondYAxisMinimumAuto = original.secondYAxisMinimumAuto; 455 this.secondYAxisMinimumFixedValue = original.secondYAxisMinimumFixedValue; 456 this.secondYAxisMaximumAuto = original.secondYAxisMaximumAuto; 457 this.secondYAxisMaximumFixedValue = original.secondYAxisMaximumFixedValue; 93 458 } 94 459 public DataTableVisualProperties() { 460 titleColor = Color.Black; 461 axisTitleColor = Color.Black; 95 462 this.xAxisTitle = string.Empty; 96 463 this.yAxisTitle = string.Empty; 464 this.secondXAxisTitle = string.Empty; 97 465 this.secondYAxisTitle = string.Empty; 466 this.xAxisMinimumAuto = true; 467 this.xAxisMinimumFixedValue = double.NaN; 468 this.xAxisMaximumAuto = true; 469 this.xAxisMaximumFixedValue = double.NaN; 470 this.secondXAxisMinimumAuto = true; 471 this.secondXAxisMinimumFixedValue = double.NaN; 472 this.secondXAxisMaximumAuto = true; 473 this.secondXAxisMaximumFixedValue = double.NaN; 474 this.yAxisMinimumAuto = true; 475 this.yAxisMinimumFixedValue = double.NaN; 476 this.yAxisMaximumAuto = true; 477 this.yAxisMaximumFixedValue = double.NaN; 478 this.secondYAxisMinimumAuto = true; 479 this.secondYAxisMinimumFixedValue = double.NaN; 480 this.secondYAxisMaximumAuto = true; 481 this.secondYAxisMaximumFixedValue = double.NaN; 98 482 } 99 483
Note: See TracChangeset
for help on using the changeset viewer.