Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/18/09 18:17:04 (15 years ago)
Author:
mkommend
Message:

adapted CEDMA.BubbleChart to meet needs of new ModelAnalyzer (ticket #723)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Charting/3.3/VisualMatrixRow.cs

    r2289 r2295  
    77
    88namespace HeuristicLab.CEDMA.Charting {
    9   public class VisualMatrixRow {
    10     private MatrixRow row;
     9  public class VisualMatrixRow : ItemBase {
    1110    private static Random random = new Random();
     11    private Dictionary<string, object> dict;
    1212
    13     public VisualMatrixRow(MatrixRow row) {
    14       this.row = row;
     13    public VisualMatrixRow() {
     14      this.dict = new Dictionary<string, object>();
    1515      this.visible = true;
    1616      this.selected = false;
    1717      this.xJitter = random.NextDouble() * 2.0 - 1.0;
    1818      this.yJitter = random.NextDouble() * 2.0 - 1.0;
     19    }
     20
     21    public VisualMatrixRow(MatrixRow row)
     22      : this() {
     23      foreach (KeyValuePair<string, object> value in row.Values)
     24        dict[value.Key] = value.Value;
    1925    }
    2026
     
    4248
    4349    public object Get(string name) {
    44       return row.Get(name);
     50      if (!dict.ContainsKey(name))
     51        return null;
     52      return dict[name];
     53    }
     54
     55    public void Set(string name, object value) {
     56      this.dict[name] = value;
     57    }
     58
     59    public IEnumerable<KeyValuePair<string, object>> Values {
     60      get { return dict; }
    4561    }
    4662
     
    5167    public string GetToolTipText() {
    5268      StringBuilder b = new StringBuilder();
    53       foreach (KeyValuePair<string, object> v in row.Values) {
     69      foreach (KeyValuePair<string, object> v in dict) {
    5470        if (v.Value is string || v.Value is double || v.Value is int) {
    5571          string val = v.Value.ToString();
Note: See TracChangeset for help on using the changeset viewer.