Class LinkView

java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
com.nomagic.magicdraw.uml.symbols.paths.PathElement
com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
com.nomagic.magicdraw.uml.symbols.paths.LinkView
All Implemented Interfaces:
BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.LabelOwner, com.nomagic.magicdraw.uml.symbols.LineJumpDrawer, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class LinkView extends com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype

LinkView represents instance specification whose classifier is an association. It is shown using the same notation as for an association, but the solid path connects instance specifications rather than classifiers.

Link end names represent corresponding association end names. Navigation arrows are shown and they agree with the navigation of corresponding association ends.

  • Constructor Details

    • LinkView

      public LinkView()
    • LinkView

      public LinkView(@CheckForNull PresentationElement parent)
  • Method Details

    • createLabels

      protected void createLabels()
      Overrides:
      createLabels in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
    • createNameLabelWrapper

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

      public com.nomagic.magicdraw.uml.symbols.paths.LinkNameLabelWrapper getNameLabelWrapper()
      Overrides:
      getNameLabelWrapper in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
    • getSupplierConnectionType

      public int getSupplierConnectionType()
      Overrides:
      getSupplierConnectionType in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
    • canHavePaths

      public boolean canHavePaths()
      Overrides:
      canHavePaths in class PresentationElement
      Returns:
      true if symbol can have connected paths. Return false here.
    • accept

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

      public String constructNameTextToDisplay()
      Overrides:
      constructNameTextToDisplay in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      Returns:
      pure name text for displaying
    • getAssociation

      @CheckForNull public Association getAssociation()
      Gets association related to this link. If more classifiers are assigned to the instance specification associated with this link, null is returned.
      Returns:
      association if link represents single association, null otherwise.
    • getClassifiers

      public Collection getClassifiers()
    • createSmartListenerConfig

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

      public boolean representsAssociationClass()
      Returns true if this link has association class as its instance specification.
      Returns:
      true if this link specifies association class, false otherwise.
    • isShowRoleA

      public boolean isShowRoleA()
      Returns "Show Role A" symbol property value.
      Returns:
      "Show Role A" symbol property value.
    • sSetShowRoleA

      public void sSetShowRoleA(boolean show)
      Simple sets (silent, no updates) "Show Role A" symbol property value.
      Parameters:
      show - "Show Role A" symbol property value to set.
    • setShowRoleA

      public void setShowRoleA(boolean show)
      Sets "Show Role A" symbol property value.
      Parameters:
      show - "Show Role A" symbol property value to set.
    • isShowRoleB

      public boolean isShowRoleB()
      Returns "Show Role B" symbol property value.
      Returns:
      "Show Role B" symbol property value.
    • sSetShowRoleB

      public void sSetShowRoleB(boolean show)
      Simple sets (silent, no updates) "Show Role B" symbol property value.
      Parameters:
      show - "Show Role B" symbol property value to set.
    • setShowRoleB

      public void setShowRoleB(boolean show)
      Sets "Show Role B" symbol property value.
      Parameters:
      show - "Show Role B" symbol property value to set.
    • isShowNavigability

      public boolean isShowNavigability()
      Returns "Show Navigability" symbol property value.
      Returns:
      "Show Navigability" symbol property value.
    • sSetShowNavigability

      public void sSetShowNavigability(boolean show)
      Simple sets (silent, no updates) "Show Navigability" symbol property value.
      Parameters:
      show - "Show Navigability" symbol property value to set.
    • setShowNavigability

      public void setShowNavigability(boolean show)
      Sets "Show Navigability" symbol property value.
      Parameters:
      show - "Show Navigability" symbol property value to set.
    • internalApplyProperties

      public void internalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer)
      Description copied from class: PathElement
      Applies properties
      Overrides:
      internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
      Parameters:
      changer - new properties
    • 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
    • getFirstMemberEnd

      @CheckForNull public Property getFirstMemberEnd()
      Gets first member end of assigned association.
      Returns:
      first member end of assigned association or null if no association exists.
    • getSecondMemberEnd

      @CheckForNull public Property getSecondMemberEnd()
      Gets second member end of assigned association.
      Returns:
      second member end of assigned association or null if no association exists.
    • getRoleA

      @CheckForNull public TextBoxView getRoleA()
      Gets role A of assigned association.
      Returns:
      role A of assigned association.
    • getRoleALabelWrapper

      public com.nomagic.magicdraw.uml.symbols.shapes.LabelWrapper getRoleALabelWrapper()
    • getRoleBLabelWrapper

      public com.nomagic.magicdraw.uml.symbols.shapes.LabelWrapper getRoleBLabelWrapper()
    • getSlotsLabelWrapper

      public com.nomagic.magicdraw.uml.symbols.shapes.LabelWrapper getSlotsLabelWrapper()
      Gets Slots value compartment label wrapper
      Returns:
      Slots value label wrapper
    • getRoleB

      @CheckForNull public TextBoxView getRoleB()
      Gets role B of assigned association.
      Returns:
      role B of assigned association.
    • getSlotsTextBox

      @CheckForNull public TextBoxView getSlotsTextBox()
      Gets text box symbol of Slot value compartment
      Returns:
      text box symbol
    • getElement

      public InstanceSpecification 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.