-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added axis labels for data tables (#925)
git-svn-id: https://src.heuristiclab.com/svn/core/trunk@4870 2abd9481-f8db-48e9-bd25-06bc13291c1b
- Loading branch information
Showing
7 changed files
with
192 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
sources/HeuristicLab.Analysis/3.3/DataTableVisualProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#region License Information | ||
/* HeuristicLab | ||
* Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) | ||
* | ||
* This file is part of HeuristicLab. | ||
* | ||
* HeuristicLab is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* HeuristicLab is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#endregion | ||
|
||
using System.ComponentModel; | ||
using HeuristicLab.Common; | ||
using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; | ||
|
||
namespace HeuristicLab.Analysis { | ||
/// <summary> | ||
/// Visual properties of a DataTable. | ||
/// </summary> | ||
[StorableClass] | ||
public class DataTableVisualProperties : DeepCloneable, INotifyPropertyChanged { | ||
private string xAxisTitle; | ||
public string XAxisTitle { | ||
get { return xAxisTitle; } | ||
set { | ||
if (value == null) value = string.Empty; | ||
if (xAxisTitle != value) { | ||
xAxisTitle = value; | ||
OnPropertyChanged("XAxisTitle"); | ||
} | ||
} | ||
} | ||
|
||
private string yAxisTitle; | ||
public string YAxisTitle { | ||
get { return yAxisTitle; } | ||
set { | ||
if (value == null) value = string.Empty; | ||
if (yAxisTitle != value) { | ||
yAxisTitle = value; | ||
OnPropertyChanged("YAxisTitle"); | ||
} | ||
} | ||
} | ||
|
||
private string secondYAxisTitle; | ||
public string SecondYAxisTitle { | ||
get { return secondYAxisTitle; } | ||
set { | ||
if (value == null) value = string.Empty; | ||
if (secondYAxisTitle != value) { | ||
secondYAxisTitle = value; | ||
OnPropertyChanged("SecondYAxisTitle"); | ||
} | ||
} | ||
} | ||
|
||
#region Persistence Properties | ||
[Storable(Name = "XAxisTitle")] | ||
private string StorableXAxisTitle { | ||
get { return xAxisTitle; } | ||
set { xAxisTitle = value; } | ||
} | ||
[Storable(Name = "YAxisTitle")] | ||
private string StorableYAxisTitle { | ||
get { return yAxisTitle; } | ||
set { yAxisTitle = value; } | ||
} | ||
[Storable(Name = "SecondYAxisTitle")] | ||
private string StorableSecondYAxisTitle { | ||
get { return secondYAxisTitle; } | ||
set { secondYAxisTitle = value; } | ||
} | ||
#endregion | ||
|
||
[StorableConstructor] | ||
protected DataTableVisualProperties(bool deserializing) : base() { } | ||
protected DataTableVisualProperties(DataTableVisualProperties original, Cloner cloner) | ||
: base(original, cloner) { | ||
this.xAxisTitle = original.xAxisTitle; | ||
this.yAxisTitle = original.yAxisTitle; | ||
this.secondYAxisTitle = original.secondYAxisTitle; | ||
} | ||
public DataTableVisualProperties() { | ||
this.xAxisTitle = string.Empty; | ||
this.yAxisTitle = string.Empty; | ||
this.secondYAxisTitle = string.Empty; | ||
} | ||
|
||
public override IDeepCloneable Clone(Cloner cloner) { | ||
return new DataTableVisualProperties(this, cloner); | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
protected virtual void OnPropertyChanged(string propertyName) { | ||
PropertyChangedEventHandler handler = PropertyChanged; | ||
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters