Example #1
0
 public void ShowExtendFor(UML.UseCase element)
 {
     _useCase = element;
     UML.Extend extend;
     string[] extendList = new string[element.Extend.Count];
     for(int i = 0; i < element.Extend.Count; i ++)
     {
         extend = (UML.Extend)element.Extend[i];
         if(extend.ExtendedCase == null)
         {
             extendList[i] = GettextCatalog.GetString ("Extend #") + i;
         }
         else
         {
             extendList[i] = extend.ExtendedCase.QualifiedName;
         }
     }
     base.ShowList(extendList);
 }
Example #2
0
 public void ShowIncludeFor(UML.UseCase element)
 {
     _useCase = element;
     UML.Include include;
     string[] includeList = new string[element.Include.Count];
     for(int i = 0; i < element.Include.Count; i ++)
     {
         include = (UML.Include)element.Include[i];
         if(include.Addition == null)
         {
             includeList[i] = GettextCatalog.GetString ("Include #") + i;
         }
         else
         {
             includeList[i] = include.Addition.QualifiedName;
         }
     }
     base.ShowList(includeList);
 }
Example #3
0
 public UMLUseCase(UMLDiagram ownerDiagram, DI.GraphNode graphNode)
     : base(ownerDiagram, graphNode)
 {
     _circle = new CanvasEllipse (ChildrensRoot);
     _circle.X1 = _circle.Y1 = 0;
     _circle.X2 = Width;
     _circle.Y2 = Height;
     _circle.FillColor = DEFAULT_FILL_COLOR;
     _circle.OutlineColor = DEFAULT_OUTLINE_COLOR;
     //
     Width = GraphNode.Size.Width;
     Height = GraphNode.Size.Height;
     //
     Uml2SemanticModelBridge bridge = (Uml2SemanticModelBridge) GraphNode.SemanticModel;
     _modelElement = (UML.UseCase) bridge.Element;
     DI.GraphElement nestedDiagElem;
     DI.SimpleSemanticModelElement nestedBridge;
     //
     foreach (DI.DiagramElement elem in GraphNode.Contained)
     {
         nestedDiagElem = elem as DI.GraphElement;
         if (nestedDiagElem != null)
         {
             nestedBridge = nestedDiagElem.SemanticModel as DI.SimpleSemanticModelElement;
             System.Console.WriteLine ("UMLUseCase nestedBridge.TypeInfo "+nestedBridge.TypeInfo);
             if (nestedBridge.TypeInfo == "NameCompartment")
             {
                 // widget for the property Name
                 string fontModifier = (_modelElement.IsAbstract ? "italic" : "");
                 _name = new UMLEntry (this, (DI.GraphNode)nestedDiagElem, ChildrensRoot, false, _modelElement.Name, fontModifier);
                 _name.Show();
                 break;
             }
         }
     }
     _circle.X1 = _circle.Y1 = 0;
     _circle.X2 = Width;
     _circle.Y2 = Height;
     Redraw ();
 }