~vcs-imports/monouml/trunk

« back to all changes in this revision

Viewing changes to src/Widgets/Tabs/UMLProperties/AggregationKindViewer.cs

  • Committer: rodolfocampero
  • Date: 2007-07-25 15:20:48 UTC
  • Revision ID: vcs-imports@canonical.com-20070725152048-03z7yvqy4o5o9ata
Refactored UMLPropertiesTab in order to simplify adding new widgets. Now adding new widgets is less error prone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
using System;
21
21
using UML = NUml.Uml2;
22
22
using MonoUML.I18n;
 
23
using MonoUML.Widgets.Tabs.Common;
23
24
 
24
25
namespace MonoUML.Widgets.Tabs.UMLProperties
25
26
{
26
 
        public class AggregationKindViewer : Gtk.HBox
 
27
        public class AggregationKindViewer : Gtk.HBox, IPropertyViewer
27
28
        {
28
29
                public AggregationKindViewer(IBroadcaster hub)
29
30
                {
85
86
                        _hub.BroadcastElementChange (_property, null);
86
87
                }
87
88
 
88
 
                public void ShowAggregationFor(UML.Property element)
 
89
                public void ShowPropertyFor(UML.Element element)
89
90
                {
90
 
                        _property = element;
 
91
                        _property = element as UML.Property;
 
92
                        this.Visible = _property != null;
 
93
                        if(_property == null) return;
91
94
                        this.Value = _property.Aggregation;
92
95
                }
93
96