Inheritance: TSF.UmlToolingFramework.UML.Diagrams.DiagramElement
Esempio n. 1
0
        public HashSet <UML.Diagrams.DiagramElement> createDiagramElements
            (List <UML.Classes.Kernel.Element> elements, Diagram diagram)
        {
            HashSet <UML.Diagrams.DiagramElement> returnedDiagramElements =
                new HashSet <UML.Diagrams.DiagramElement>();

            foreach (UML.Classes.Kernel.Element element in elements)
            {
                UML.Diagrams.DiagramElement diagramElement = null;
                if (element is ConnectorWrapper)
                {
                    diagramElement = new DiagramLinkWrapper
                                         (this.model as Model, element as ConnectorWrapper, diagram);
                    // don't return isHidden relations
                    if (((DiagramLinkWrapper)diagramElement).isHidden)
                    {
                        diagramElement = null;
                    }
                }
                else if (element is ElementWrapper)
                {
                    diagramElement = new DiagramObjectWrapper
                                         (this.model as Model, element as ElementWrapper, diagram);
                }
                if (diagramElement != null)
                {
                    returnedDiagramElements.Add(diagramElement);
                }
            }
            return(returnedDiagramElements);
        }
Esempio n. 2
0
        TSF_EA.LinkStyle getDefaultStyle(TSF_EA.DiagramLinkWrapper diagramLink)
        {
            switch (diagramLink.typeString)
            {
            case "ControlFlow":
            case "ObjectFlow":
            case "Dependency":
                return(TSF_EA.LinkStyle.lsOrthogonalRoundedTree);

            case "Realization":
            case "Generalizaion":
            case "Realisation":
                return(TSF_EA.LinkStyle.lsTreeVerticalTree);

            case "NoteLink":
            case "Abstraction":
            case "Usage":
            case "UseCase":
                return(TSF_EA.LinkStyle.lsDirectMode);

            default:
                return(TSF_EA.LinkStyle.lsOrthogonalSquareTree);
            }
        }