Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/17 09:35:42 (7 years ago)
Author:
abeham
Message:

#2744:

  • GanttData: Derived from NamedItem instead of Item and implement appropriate constructors
  • GanttRow: Implemented appropriate constructors and choosing a default name
  • GanttDataView: Added additional event handler for tracking category colors dictionary
  • GanttDataView: Set title property of GanttChart
  • GanttChart: Added a title (which is hidden by default)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/GanttData.cs

    r14734 r14737  
    3434  [Item("Gantt Data", "Data of a Gantt visualization")]
    3535  [StorableClass]
    36   public class GanttData : Item {
     36  public class GanttData : NamedItem {
    3737
    3838    [Storable]
     
    5151      categoryColors = new ObservableDictionary<string, Color>(original.categoryColors);
    5252    }
    53     public GanttData() {
     53    public GanttData() : this("Gantt Data", "Data of a Gantt visualization") { }
     54    public GanttData(string name) : this(name, string.Empty) { }
     55    public GanttData(string name, string description) : base(name, description) {
    5456      rows = new NamedItemCollection<GanttRow>();
    5557      categoryColors = new ObservableDictionary<string, Color>();
    5658    }
    57     public GanttData(IEnumerable<GanttRow> rows) {
     59    public GanttData(IEnumerable<GanttRow> rows) : this("Gantt Data", rows) { }
     60    public GanttData(string name, IEnumerable<GanttRow> rows) : this(name, string.Empty, rows) { }
     61    public GanttData(string name, string description, IEnumerable<GanttRow> rows) : base(name, description) {
    5862      this.rows = new NamedItemCollection<GanttRow>(rows);
    5963      categoryColors = new ObservableDictionary<string, Color>();
     
    7882      items = cloner.Clone(original.items);
    7983    }
    80     public GanttRow() {
     84    public GanttRow() : this("Gantt Row", "Row of a Gantt chart") { }
     85    public GanttRow(string name) : this(name, string.Empty) { }
     86    public GanttRow(string name, string description) : base(name, description) {
    8187      items = new ItemList<GanttItem>();
    8288    }
    83     public GanttRow(IEnumerable<GanttItem> items) {
     89    public GanttRow(IEnumerable<GanttItem> items) : this("Gantt Row", items) { }
     90    public GanttRow(string name, IEnumerable<GanttItem> items) : this(name, string.Empty, items) { }
     91    public GanttRow(string name, string description, IEnumerable<GanttItem> items) : base(name, description) {
    8492      this.items = new ItemList<GanttItem>(items);
    8593    }
Note: See TracChangeset for help on using the changeset viewer.