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
Files:
2 deleted
3 edited
1 copied
2 moved

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10638 r10658  
    7272  </ItemGroup>
    7373  <ItemGroup>
     74    <Compile Include="Implementations\PreprocessingChartContent.cs" />
    7475    <Compile Include="Implementations\PreprocessingData.cs" />
    7576    <Compile Include="Implementations\DataGridLogic.cs" />
     
    8384    <Compile Include="Implementations\FilterLogic.cs" />
    8485    <Compile Include="Implementations\HistogramContent.cs" />
    85     <Compile Include="Implementations\HistogramLogic.cs" />
    8686    <Compile Include="Implementations\LineChartContent.cs" />
    87     <Compile Include="Implementations\LineChartLogic.cs" />
     87    <Compile Include="Implementations\ChartLogic.cs" />
    8888    <Compile Include="Implementations\StatisticsContent.cs" />
    8989    <Compile Include="Implementations\TransformationContent.cs" />
    9090    <Compile Include="Implementations\TransformationLogic.cs" />
    9191    <Compile Include="Interfaces\IFilterLogic.cs" />
    92     <Compile Include="Interfaces\IHistogramLogic.cs" />
    93     <Compile Include="Interfaces\ILineChartLogic.cs" />
     92    <Compile Include="Interfaces\IChartLogic.cs" />
    9493    <Compile Include="Interfaces\IManipulationLogic.cs" />
    9594    <Compile Include="Interfaces\ITransformationLogic.cs" />
  • 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  }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs

    r10628 r10658  
    2626
    2727namespace HeuristicLab.DataPreprocessing {
    28   public interface ILineChartLogic {
     28  public interface IChartLogic {
    2929
    30     DataTable CreateDataTable(string title);
     30    DataTable CreateDataTable(string title, DataRowVisualProperties.DataRowChartType chartType);
    3131
    3232    event DataPreprocessingChangedEventHandler Changed;
     
    3434    ICheckedItemList<StringValue> CreateVariableItemList();
    3535
    36     DataRow CreateDataRow(string variableName);
     36    DataRow CreateDataRow(string variableName,DataRowVisualProperties.DataRowChartType chartType);
    3737
    3838    string GetVariableNameByIndex(int index);
Note: See TracChangeset for help on using the changeset viewer.