- Timestamp:
- 03/26/14 10:52:55 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
- Files:
-
- 1 deleted
- 2 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
r10633 r10658 27 27 28 28 namespace HeuristicLab.DataPreprocessing { 29 public class LineChartLogic : ILineChartLogic { 29 30 public class ChartLogic : IChartLogic { 30 31 31 32 private ITransactionalPreprocessingData preprocessingData; 32 33 33 public LineChartLogic(ITransactionalPreprocessingData preprocessingData) {34 public ChartLogic(ITransactionalPreprocessingData preprocessingData) { 34 35 this.preprocessingData = preprocessingData; 35 36 } 36 37 37 public DataTable CreateDataTable(String title ) {38 public DataTable CreateDataTable(String title, DataRowVisualProperties.DataRowChartType chartType) { 38 39 DataTable dataTable = new DataTable(title); 39 40 IEnumerable<string> variableNames = GetVariableNames(); 40 41 41 42 foreach (string variableName in variableNames) { 42 DataRow row = CreateDataRow(variableName );43 DataRow row = CreateDataRow(variableName,chartType); 43 44 dataTable.Rows.Add(row); 44 45 } … … 46 47 } 47 48 48 public DataRow CreateDataRow(string variableName ) {49 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { 49 50 IList<double> values = preprocessingData.GetValues<double>(variableName); 50 51 DataRow row = new DataRow(variableName, "", values); 52 row.VisualProperties.ChartType = chartType; 51 53 return row; 52 54 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs
r10614 r10658 26 26 namespace HeuristicLab.DataPreprocessing { 27 27 [Item("Histogram", "Represents the histogram grid.")] 28 public class HistogramContent : Item, IViewShortcut {28 public class HistogramContent : PreprocessingChartContent { 29 29 30 private readonly IHistogramLogic histogramLogic; 31 public HistogramContent(IHistogramLogic theHistogramLogic) { 32 histogramLogic = theHistogramLogic; 30 public HistogramContent(IChartLogic chartlogic) :base(chartlogic) { 33 31 } 34 32 … … 36 34 : base(content, cloner) { 37 35 38 }39 40 public IHistogramLogic HistogramLogic {41 get {42 return histogramLogic;43 }44 36 } 45 37 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartContent.cs
r10614 r10658 26 26 namespace HeuristicLab.DataPreprocessing { 27 27 [Item("LineChart", "Represents the line chart grid.")] 28 public class LineChartContent : Item, IViewShortcut {28 public class LineChartContent : PreprocessingChartContent { 29 29 30 private readonly ILineChartLogic lineChartLogic; 31 public LineChartContent(ILineChartLogic theLineChartLogic) { 32 lineChartLogic = theLineChartLogic; 30 public LineChartContent(IChartLogic chartlogic) :base(chartlogic) { 33 31 } 34 32 … … 36 34 : base(content, cloner) { 37 35 38 }39 40 public ILineChartLogic LineChartLogic {41 get {42 return lineChartLogic;43 }44 36 } 45 37 … … 52 44 } 53 45 54 public event DataPreprocessingChangedEventHandler Changed {55 add { lineChartLogic.Changed += value; }56 remove { lineChartLogic.Changed -= value; }57 }58 46 } 59 47 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingChartContent.cs
r10633 r10658 25 25 26 26 namespace HeuristicLab.DataPreprocessing { 27 [Item(" LineChart", "Represents the line chart grid.")]28 public class LineChartContent : Item, IViewShortcut {27 [Item("PreprocessingChart", "Represents a preprocessing chart.")] 28 public class PreprocessingChartContent : Item, IViewShortcut { 29 29 30 private readonly I LineChartLogic lineChartLogic;31 public LineChartContent(ILineChartLogic theLineChartLogic) {32 lineChartLogic = theLineChartLogic;30 private readonly IChartLogic chartLogic; 31 public PreprocessingChartContent(IChartLogic chartLogic) { 32 this.chartLogic = chartLogic; 33 33 } 34 34 35 public LineChartContent(LineChartContent content, Cloner cloner)35 public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) 36 36 : base(content, cloner) { 37 38 37 } 39 38 40 public I LineChartLogic LineChartLogic {39 public IChartLogic ChartLogic { 41 40 get { 42 return lineChartLogic;41 return chartLogic; 43 42 } 44 43 } … … 49 48 50 49 public override IDeepCloneable Clone(Cloner cloner) { 51 return new LineChartContent(this, cloner);50 return new PreprocessingChartContent(this, cloner); 52 51 } 53 52 54 53 public event DataPreprocessingChangedEventHandler Changed { 55 add { lineChartLogic.Changed += value; }56 remove { lineChartLogic.Changed -= value; }54 add { chartLogic.Changed += value; } 55 remove { chartLogic.Changed -= value; } 57 56 } 58 57 }
Note: See TracChangeset
for help on using the changeset viewer.