Class ConnectorView

  • All Implemented Interfaces:
    BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.LabelOwner, com.nomagic.magicdraw.uml.symbols.LineJumpDrawer, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener
    Direct Known Subclasses:
    ConnectorToSelfView

    @OpenApi
    public class ConnectorView
    extends com.nomagic.magicdraw.uml.symbols.paths.LinkWithEndsView
    • Constructor Detail

      • ConnectorView

        public ConnectorView()
    • Method Detail

      • createNameLabelWrapper

        protected com.nomagic.magicdraw.uml.symbols.shapes.NameLabelWrapper createNameLabelWrapper()
        Overrides:
        createNameLabelWrapper in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      • accept

        public void accept​(Visitor visitor)
                    throws java.lang.Exception
        Description copied from interface: MDElement
        Method accepts visitor, and calls method visit<class name>(this) of visitor . See Visitor pattern for more details.
        Specified by:
        accept in interface MDElement
        Overrides:
        accept in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithEndsView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • getElement

        public Connector getElement()
        Description copied from class: PresentationElement
        Returns model element of this presentation element. Some presentation elements (for example TextBoxes) do not have model elements.
        Specified by:
        getElement in interface com.nomagic.magicdraw.uml.symbols.LabelOwner
        Specified by:
        getElement in interface ModelElementProvider
        Overrides:
        getElement in class PresentationElement
        Returns:
        model element of this presentation element.
      • canAddInstance

        public boolean canAddInstance​(PresentationElement obj)
        Description copied from class: PresentationElement
        Object view has no children.
        Overrides:
        canAddInstance in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      • updateNameBox

        public void updateNameBox()
        Overrides:
        updateNameBox in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      • constructNameText

        private java.lang.String constructNameText()
      • appendInherited

        private void appendInherited​(java.lang.StringBuilder text)
      • appendType

        private void appendType​(java.lang.StringBuilder text)
      • isInheritedConnector

        private boolean isInheritedConnector()
      • getConnectorClassifier

        private Element getConnectorClassifier()
        Returns:
        classifier which plays Connector context role according current symbols structure
      • isShowType

        public boolean isShowType()
      • setShowType

        public void setShowType​(boolean showType)
      • sSetShowType

        public void sSetShowType​(boolean showType)
      • isShowInheritedSign

        public boolean isShowInheritedSign()
        Returns:
        true if inherited sign is shown
      • sSetShowInheritedSign

        public void sSetShowInheritedSign​(boolean showInheritedSign)
        Show inherited sign
        Parameters:
        showInheritedSign - show
      • setShowInheritedSign

        public void setShowInheritedSign​(boolean showInheritedSign)
        Show inherited sign
        Parameters:
        showInheritedSign - show
      • createSmartListenerConfig

        protected void createSmartListenerConfig​(java.util.List<SmartListenerConfig> configurations)
        Overrides:
        createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
      • createEndBoxes

        public void createEndBoxes()
      • isShowConnectorEndA

        public boolean isShowConnectorEndA()
      • isShowConnectorEndB

        public boolean isShowConnectorEndB()
      • setShowConnectorEndA

        public void setShowConnectorEndA​(boolean show)
      • setShowConnectorEndB

        public void setShowConnectorEndB​(boolean show)
      • sSetShowConnectorEndA

        public void sSetShowConnectorEndA​(boolean show)
      • sSetShowConnectorEndB

        public void sSetShowConnectorEndB​(boolean show)
      • internalSilentApply

        public void internalSilentApply()
        Description copied from class: PresentationElement
        Silently applies all properties after initialization
        Overrides:
        internalSilentApply in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      • internalApplyProperties

        public void internalApplyProperties​(PropertyManager man)
        Description copied from class: PathElement
        Applies properties
        Overrides:
        internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
        Parameters:
        man - new properties
      • canHavePaths

        public boolean canHavePaths()
        Returns:
        true if symbol can have connected paths. Return false here.
      • getFirstMemberEnd

        protected Element getFirstMemberEnd()
        Specified by:
        getFirstMemberEnd in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithEndsView
      • getSecondMemberEnd

        protected Element getSecondMemberEnd()
        Specified by:
        getSecondMemberEnd in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithEndsView
      • setClient

        public void setClient​(PresentationElement obj)
        Description copied from class: PathElement
        Sets client for this link. Changes parent object to the parent of client. Client's parent will always contain incoming links.
        Parameters:
        obj - shape to check
      • setSupplier

        public void setSupplier​(PresentationElement obj)
        Description copied from class: PathElement
        Sets supplier end for link. Removes this link from old shape. Inserts this link to new shape. Method also sets supplier point to the middle point of shape.
        Parameters:
        obj - new supplier.
      • updatePartWithPortForConnectorEnds

        public void updatePartWithPortForConnectorEnds()
        Updates partWithPort property for both connector ends.
      • setPartWithPortForConnectorEnd

        private void setPartWithPortForConnectorEnd​(PresentationElement view,
                                                    @CheckForNull
                                                    ConnectorEnd end)
        Set partWithPort property for Connector according given end
        Parameters:
        view - symbol at the end
        end - the given connector end
      • getPartWithPortForView

        @CheckForNull
        public static Property getPartWithPortForView​(PresentationElement view,
                                                      ConnectorView connectorView)
        Calculate partWithPort property value
        Parameters:
        view - symbol for which to calculate property value
        connectorView - connector view
        Returns:
        Property or null