Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/14 12:05:50 (10 years ago)
Author:
pfleck
Message:
  • replaced main menu list with ItemCollectionList
  • added ViewShortcut interface for menu items
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
Files:
2 added
9 edited

Legend:

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

    r10586 r10614  
    7878    <Compile Include="Implementations\ManipulationLogic.cs" />
    7979    <Compile Include="Interfaces\IPreprocessingData.cs" />
     80    <Compile Include="Implementations\ViewShortcutCollection.cs" />
    8081    <Compile Include="Interfaces\IDataGridLogic.cs" />
    8182    <Compile Include="Implementations\FilterContent.cs" />
     
    9394    <Compile Include="Interfaces\IManipulationLogic.cs" />
    9495    <Compile Include="Interfaces\ITransformationLogic.cs" />
     96    <Compile Include="Interfaces\IViewShortcut.cs" />
    9597    <Compile Include="ProblemDataCreator.cs" />
    9698    <None Include="Plugin.cs.frame" />
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs

    r10571 r10614  
    2929
    3030  [Item("DataGrid", "Represents a data grid.")]
    31   public class DataGridContent : Item, IDataGridContent {
     31  public class DataGridContent : Item, IViewShortcut, IDataGridContent {
    3232
    3333    private readonly IDataGridLogic dataGridLogic;
    3434    private readonly IManipulationLogic preprocessingDataManipulation;
     35
    3536    public DataGridContent(IDataGridLogic theDataGridLogic, IManipulationLogic thePreprocessingDataManipulation) {
    3637      dataGridLogic = theDataGridLogic;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterContent.cs

    r10539 r10614  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("Filter", "Represents the filter grid.")]
    28   public class FilterContent : Item {
     28  public class FilterContent : Item, IViewShortcut {
    2929
    3030    public static new Image StaticItemImage {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs

    r10558 r10614  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("Histogram", "Represents the histogram grid.")]
    28   public class HistogramContent : Item {
     28  public class HistogramContent : Item, IViewShortcut {
    2929
    3030    private readonly IHistogramLogic histogramLogic;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartContent.cs

    r10573 r10614  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("LineChart", "Represents the line chart grid.")]
    28   public class LineChartContent : Item {
     28  public class LineChartContent : Item, IViewShortcut {
    2929
    3030    private readonly ILineChartLogic lineChartLogic;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs

    r10586 r10614  
    3131    : Item, IPreprocessingContext {
    3232
     33    public ITransactionalPreprocessingData Data { get; private set; }
     34
     35    public ViewShortcutCollection ViewShortcuts { get; private set; }
     36
     37    public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; }
     38
     39    public IAlgorithm Algorithm { get; private set; }
     40
     41    public IDataAnalysisProblem Problem { get; private set; }
     42
    3343    public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) {
    3444      Data = new TransactionalPreprocessingData(dataAnalysisProblemData);
     
    3646      Algorithm = algorithm;
    3747      Problem = problem;
     48
     49      var searchLogic = new SearchLogic(Data);
     50      var dataGridLogic = new DataGridLogic(Data);
     51      var statisticsLogic = new StatisticsLogic(Data, searchLogic);
     52      var manipulationLogic = new ManipulationLogic(Data, searchLogic, statisticsLogic);
     53      var transformationLogic = new TransformationLogic(Data, searchLogic, statisticsLogic);
     54      var lineChartLogic = new LineChartLogic(Data);
     55      var histogramLogic = new HistogramLogic(Data);
     56      var filterLogic = new FilterLogic();
     57
     58      ViewShortcuts = new ViewShortcutCollection {
     59        new DataGridContent(dataGridLogic, manipulationLogic),
     60        new StatisticsContent(statisticsLogic),
     61        new FilterContent(filterLogic),
     62        new TransformationContent(transformationLogic),
     63        new LineChartContent(lineChartLogic),
     64        new HistogramContent(histogramLogic)
     65      };
    3866    }
    3967
     
    4573      Problem = original.Problem;
    4674    }
    47 
    48     public ITransactionalPreprocessingData Data { get; private set; }
    49 
    50     public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; }
    51 
    52     public IAlgorithm Algorithm { get; private set; }
    53 
    54     public IDataAnalysisProblem Problem { get; private set; }
    5575
    5676    public override IDeepCloneable Clone(Cloner cloner) {
     
    6585      }
    6686    }
    67 
    6887    public IProblem ExportProblem() {
    6988      return Export(Problem, SetupProblem);
     89    }
     90    public IAlgorithm ExportAlgorithm() {
     91      return Export(Algorithm, SetupAlgorithm);
    7092    }
    7193
     
    7395      return (IDataAnalysisProblem)problem;
    7496    }
    75 
    76     public IAlgorithm ExportAlgorithm() {
    77       return Export(Algorithm, SetupAlgorithm);
    78     }
    79 
    8097    private IDataAnalysisProblem SetupAlgorithm(IAlgorithm algorithm) {
    8198      algorithm.Name = algorithm.Name + "(Preprocessed)";
    8299      algorithm.Runs.Clear();
    83 
    84100      return (IDataAnalysisProblem)algorithm.Problem;
    85101    }
    86 
    87102    private T Export<T>(T original, Func<T, IDataAnalysisProblem> setup)
    88103        where T : IItem {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticsContent.cs

    r10551 r10614  
    2525namespace HeuristicLab.DataPreprocessing {
    2626  [Item("Statistics", "Represents the statistics grid.")]
    27   public class StatisticsContent : Item {
     27  public class StatisticsContent : Item, IViewShortcut {
    2828
    2929    private readonly IStatisticsLogic statisticsLogic;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/TransformationContent.cs

    r10539 r10614  
    2626namespace HeuristicLab.DataPreprocessing {
    2727  [Item("Transformation", "Represents the transformation grid.")]
    28   public class TransformationContent : Item {
     28  public class TransformationContent : Item, IViewShortcut {
    2929
    3030    private readonly ITransformationLogic transformationLogic;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs

    r10586 r10614  
    3131    ITransactionalPreprocessingData Data { get; }
    3232
     33    ViewShortcutCollection ViewShortcuts { get; }
     34
    3335    [Obsolete]
    3436    IDataAnalysisProblemData DataAnalysisProblemData { get; }
Note: See TracChangeset for help on using the changeset viewer.