public MultiplicityElementViewer(IBroadcaster hub)
 {
     _orderedViewer = new SingleBooleanViewer(hub, "Ordered:", "IsOrdered");
     _uniqueViewer = new SingleBooleanViewer(hub, "Unique:", "IsUnique");
     _lower = new Gtk.Entry();
     _lower.WidthChars = 4;
     _lower.Changed += new EventHandler(OnEntryChanged);
     _lower.Activated += new EventHandler(OnActivated);
     _lower.FocusOutEvent += new Gtk.FocusOutEventHandler(OnFocusOutEvent);
     _upper = new Gtk.Entry();
     _upper.WidthChars = 4;
     _upper.Changed += new EventHandler(OnEntryChanged);
     _upper.Activated += new EventHandler(OnActivated);
     _upper.FocusOutEvent += new Gtk.FocusOutEventHandler(OnFocusOutEvent);
     base.PackStart(_orderedViewer, false, false, 0);
     base.PackStart(_uniqueViewer, false, false, 2);
     base.PackStart(new Gtk.Label("Lower:"), false, false, 2);
     base.PackStart(_lower, false, false, 2);
     base.PackStart(new Gtk.Label("Upper:"), false, false, 2);
     base.PackStart(_upper, false, false, 2);
 }
Esempio n. 2
0
 public UMLPropertiesTab()
     : base(false, 2)
 {
     // Model Element type
     _metvType = new ModelElementTypeViewer(this);
     base.PackStart(_metvType, false, false, 2);
     // "NamedElement.Name" property
     _ssvName = new SingleStringViewer(this, GettextCatalog.GetString ("Name:"), "Name");
     base.PackStart(_ssvName, false, false, 2);
     // "TypedElement.Type" property
     _sovTEType = new TypedElementTypeViewer(this);
     base.PackStart(_sovTEType, false, false, 2);
     // "InterfaceRealization.Contract" property
     _sovImplContract = new InterfaceRealizationContractViewer(this);
     base.PackStart(_sovImplContract, false, false, 2);
     // "Generalization.General" property
     _sovGeneral = new GeneralizationGeneralViewer(this);
     base.PackStart(_sovGeneral, false, false, 2);
     // "NamedElement.Visibility" property
     _nevNEVisibility = new NamedElementVisibilityViewer(this);
     base.PackStart(_nevNEVisibility, false, false, 2);
     // "Parameter.Direction" property
     _pdKindViewer = new ParameterDirectionKindViewer(this);
     base.PackStart(_pdKindViewer, false, false, 2);
     // "Property.Aggregation" property
     _aKindViewer = new AggregationKindViewer(this);
     base.PackStart(_aKindViewer, false, false, 2);
     // **** boolean properties: Classifier.IsAbstract, IsLeaf, IsStatic,
     // IsReadOnly
     HBox boolProps = new HBox();
     _sbvClassifierIsAbstract = new SingleBooleanViewer(this, GettextCatalog.GetString ("Abstract:"), "IsAbstract");
     boolProps.PackStart(_sbvClassifierIsAbstract, false, false, 2);
     _sbvIsDerived = new SingleBooleanViewer(this, GettextCatalog.GetString ("Derived:"), "IsDerived");
     boolProps.PackStart(_sbvIsDerived, false, false, 2);
     _sbvIsLeaf = new SingleBooleanViewer(this, GettextCatalog.GetString ("Leaf:"), "IsLeaf");
     boolProps.PackStart(_sbvIsLeaf, false, false, 2);
     _sbvIsQuery = new SingleBooleanViewer(this, GettextCatalog.GetString ("Query:"), "IsQuery");
     boolProps.PackStart(_sbvIsQuery, false, false, 2);
     _sbvIsReadOnly = new SingleBooleanViewer(this, GettextCatalog.GetString ("Read only:"), "IsReadOnly");
     boolProps.PackStart(_sbvIsReadOnly, false, false, 2);
     _sbvIsStatic = new SingleBooleanViewer(this, GettextCatalog.GetString ("Static:"), "IsStatic");
     boolProps.PackStart(_sbvIsStatic, false, false, 2);
     base.PackStart(boolProps, false, false, 0);
     // MultiplicityElement properties
     _multiplicityElement = new MultiplicityElementViewer(this);
     base.PackStart(_multiplicityElement, false, false, 0);
     // "Body" property
     _ssvBody = new SingleStringViewer(this, "Body:", "Body");
     base.PackStart(_ssvBody, false, false, 2);
     // "Addition" property
     _sobAddition = new AdditionViewer(this);
     base.PackStart(_sobAddition, false, false, 2);
     // "ExtendedCase" property
     _sobExtendedCase = new ExtendedCaseViewer(this);
     base.PackStart(_sobExtendedCase, false, false, 2);
     // "Extend.Condition" property
     _sobExtendCondition = new ExtendConditionViewer(this);
     base.PackStart(_sobExtendCondition, false, false, 2);
     // "ExtensionLocation" property
     _movExtensionLocation = new ExtensionLocationViewer(this);
     base.PackStart(_movExtensionLocation, false, false, 2);
     // "ExtensionPoint" property
     _movExtensionPoint = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Extension points:"), "ExtensionPoint", "UseCase", "ExtensionPoint");
     base.PackStart(_movExtensionPoint, false, false, 2);
     // "Extend" and "Include" properties
     HBox extInc = new HBox();
     _movExtend = new ExtendViewer(this);
     extInc.PackStart(_movExtend, true, true, 2);
     _movInclude = new IncludeViewer(this);
     extInc.PackStart(_movInclude, true, true, 2);
     base.PackStart(extInc, false, false, 0);
     // "AnnotatedElement" property
     _movAnnotatedElement = new AnnotatedElementViewer(this);
     base.PackStart(_movAnnotatedElement, false, false, 2);
     // "Literal" property
     _movLiterals = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Owned literals:"), "OwnedLiteral", "Enumeration", "EnumerationLiteral");
     base.PackStart(_movLiterals, false, false, 2);
     // "OwnedParameter" property
     _movOwnedParameter = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Owned parameters:"), "OwnedParameter", "Operation", "Parameter");
     base.PackStart(_movOwnedParameter, false, false, 2);
     // "NestedPackage" and "OwnedType" properties
     HBox nesown = new HBox();
     _movNestedPackage = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Nested packages:"), "NestedPackage", "NestingPackage", "Package");
     nesown.PackStart(_movNestedPackage, true, true, 2);
     _movOwnedType = new OwnedTypeViewer(this);
     nesown.PackStart(_movOwnedType, true, true, 2);
     base.PackStart(nesown, false, false, 0);
     // "OwnedAttribute" and "OwnedOperation" properties
     HBox attope = new HBox();
     _movOwnedAttribute = new OwnedAttributesViewer(this);
     attope.PackStart(_movOwnedAttribute, true, true, 2);
     _movOwnedEnd = new OwnedAttributesViewer(this, GettextCatalog.GetString ("Owned ends:"));
     attope.PackStart(_movOwnedEnd, true, true, 2);
     _movMemberEnd = new MixedElementsViewer(
         this, GettextCatalog.GetString ("Member ends:"), "MemberEnd", "Association", "Property");
     attope.PackStart(_movMemberEnd, true, true, 2);
     _movOwnedOperation = new OwnedOperationsViewer(this);
     attope.PackStart(_movOwnedOperation, true, true, 2);
     base.PackStart(attope, false, false, 0);
     // "Classifier.Generalization" and "BehavioredClassifier.InterfaceRealization" properties
     HBox genint = new HBox();
     _movGeneralizations = new GeneralizationsViewer(this);
     genint.PackStart(_movGeneralizations, true, true, 2);
     _movInterfaceRealizations = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Interface Realizations:"), "InterfaceRealization", "ImplementingClassifier", "InterfaceRealization");
     genint.PackStart(_movInterfaceRealizations, true, true, 2);
     base.PackStart(genint, false, false, 0);
     // "PackageImport" and "ElementImport" properties
     HBox peImports = new HBox();
     _movPackageImports = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Package imports:"), "PackageImport", "ImportingNamespace", "PackageImport");
     peImports.PackStart(_movPackageImports, true, true, 2);
     _movElementImports = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Element imports:"), "ElementImport", "ImportingNamespace", "ElementImport");
     peImports.PackStart(_movElementImports, true, true, 2);
     base.PackStart(peImports, false, false, 0);
     // "OwnedUseCase" property
     _movOwnedUseCase = new OwnedElementsViewer(
         this, GettextCatalog.GetString ("Owned use cases:"), "OwnedUseCase", null, "UseCase");
     base.PackStart(_movOwnedUseCase, false, false, 2);
     // Element properties
     _movComments = new CommentsViewer(this);
     base.PackStart(_movComments, false, false, 2);
     // FIXME: Check why this doesn't work (all the widgets are shown)
     HideAllProperties();
 }