- Timestamp:
- 11/29/08 13:43:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/LegendShape.cs
r866 r873 1 using System.Collections.Generic; 1 2 using System.Drawing; 2 3 3 4 namespace HeuristicLab.Visualization { 5 public class LegendItem { 6 public LegendItem(string label, Color color) { 7 Label = label; 8 Color = color; 9 } 10 11 public string Label { get; set; } 12 public Color Color { get; set; } 13 } 14 15 4 16 public class LegendShape : IShape { 5 17 private readonly Color color; 18 19 private readonly IList<LegendItem> legendItems = new List<LegendItem>(); 6 20 private readonly RectangleD rect; 7 21 8 22 public LegendShape(double x1, double y1, double x2, double y2, double z, Color color) { 9 23 rect = new RectangleD(x1, y1, x2, y2); 10 this.Z = z;24 Z = z; 11 25 this.color = color; 12 26 } … … 31 45 32 46 #endregion 47 48 public void AddLegendItem(LegendItem item) { 49 legendItems.Add(item); 50 } 51 52 public void RemoveLegendItem(LegendItem item) { 53 legendItems.Remove(item); 54 } 55 56 public void ClearLegendItems() { 57 legendItems.Clear(); 58 } 33 59 } 34 60 }
Note: See TracChangeset
for help on using the changeset viewer.