Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/26/14 10:52:55 (11 years ago)
Author:
aesterer
Message:

Created base view PreprocessingChartView for LineChartView and HistogramView. Replaced HistogramLogic and LineChartlogic with ChartLogic. Added base content ChartContent for LineChartContent and HistogramContent.

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  
    2727
    2828namespace HeuristicLab.DataPreprocessing {
    29   public class LineChartLogic : ILineChartLogic {
     29
     30  public class ChartLogic : IChartLogic {
    3031 
    3132    private ITransactionalPreprocessingData preprocessingData;
    3233
    33     public LineChartLogic(ITransactionalPreprocessingData preprocessingData) {
     34    public ChartLogic(ITransactionalPreprocessingData preprocessingData) {
    3435      this.preprocessingData = preprocessingData;
    3536    }
    3637
    37     public DataTable CreateDataTable(String title) {
     38    public DataTable CreateDataTable(String title, DataRowVisualProperties.DataRowChartType chartType) {
    3839      DataTable dataTable = new DataTable(title);
    3940      IEnumerable<string> variableNames = GetVariableNames();
    4041
    4142      foreach (string variableName in variableNames) {
    42         DataRow row = CreateDataRow(variableName);
     43        DataRow row = CreateDataRow(variableName,chartType);
    4344        dataTable.Rows.Add(row);
    4445      }
     
    4647    }
    4748
    48     public DataRow CreateDataRow(string variableName) {
     49    public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
    4950      IList<double> values = preprocessingData.GetValues<double>(variableName);
    5051      DataRow row = new DataRow(variableName, "", values);
     52      row.VisualProperties.ChartType = chartType;
    5153      return row;
    5254    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs

    r10614 r10658  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("Histogram", "Represents the histogram grid.")]
    28   public class HistogramContent : Item, IViewShortcut {
     28  public class HistogramContent : PreprocessingChartContent {
    2929
    30     private readonly IHistogramLogic histogramLogic;
    31     public HistogramContent(IHistogramLogic theHistogramLogic) {
    32       histogramLogic = theHistogramLogic;
     30    public HistogramContent(IChartLogic chartlogic) :base(chartlogic) {
    3331    }
    3432
     
    3634      : base(content, cloner) {
    3735
    38     }
    39 
    40     public IHistogramLogic HistogramLogic {
    41       get {
    42         return histogramLogic;
    43       }
    4436    }
    4537
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartContent.cs

    r10614 r10658  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("LineChart", "Represents the line chart grid.")]
    28   public class LineChartContent : Item, IViewShortcut {
     28  public class LineChartContent : PreprocessingChartContent {
    2929
    30     private readonly ILineChartLogic lineChartLogic;
    31     public LineChartContent(ILineChartLogic theLineChartLogic) {
    32       lineChartLogic = theLineChartLogic;
     30    public LineChartContent(IChartLogic chartlogic) :base(chartlogic) {
    3331    }
    3432
     
    3634      : base(content, cloner) {
    3735
    38     }
    39 
    40     public ILineChartLogic LineChartLogic {
    41       get {
    42         return lineChartLogic;
    43       }
    4436    }
    4537
     
    5244    }
    5345
    54     public event DataPreprocessingChangedEventHandler Changed {
    55       add { lineChartLogic.Changed += value; }
    56       remove { lineChartLogic.Changed -= value; }
    57     }
    5846  }
    5947}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingChartContent.cs

    r10633 r10658  
    2525
    2626namespace 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 {
    2929
    30     private readonly ILineChartLogic lineChartLogic;
    31     public LineChartContent(ILineChartLogic theLineChartLogic) {
    32       lineChartLogic = theLineChartLogic;
     30    private readonly IChartLogic chartLogic;
     31    public PreprocessingChartContent(IChartLogic chartLogic) {
     32      this.chartLogic = chartLogic;
    3333    }
    3434
    35     public LineChartContent(LineChartContent content, Cloner cloner)
     35    public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner)
    3636      : base(content, cloner) {
    37 
    3837    }
    3938
    40     public ILineChartLogic LineChartLogic {
     39    public IChartLogic ChartLogic {
    4140      get {
    42         return lineChartLogic;
     41        return chartLogic;
    4342      }
    4443    }
     
    4948
    5049    public override IDeepCloneable Clone(Cloner cloner) {
    51       return new LineChartContent(this, cloner);
     50      return new PreprocessingChartContent(this, cloner);
    5251    }
    5352
    5453    public event DataPreprocessingChangedEventHandler Changed {
    55       add { lineChartLogic.Changed += value; }
    56       remove { lineChartLogic.Changed -= value; }
     54      add { chartLogic.Changed += value; }
     55      remove { chartLogic.Changed -= value; }
    5756    }
    5857  }
Note: See TracChangeset for help on using the changeset viewer.