Class LinkAttributeView

  • All Implemented Interfaces:
    BaseElement, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.LineJumpDrawer, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener

    @OpenApi
    public class LinkAttributeView
    extends PathElement
    • Constructor Detail

      • LinkAttributeView

        public LinkAttributeView()
    • Method Detail

      • internalGetPresentationElementStroke

        public java.awt.BasicStroke internalGetPresentationElementStroke​(boolean line,
                                                                         int width)
        Description copied from class: PathElement
        This method must be overridden, if you need to use DASHED_STROKE or another one.
        Parameters:
        line - true if for line, false if for adornments also
        width - width
        Returns:
        the stroke for line drawing ( by default SOLID_STROKE).
      • getName

        public java.lang.String getName()
        Description copied from interface: MDElement
        Returns the name of the element. This element will return null always, because it can not have name. However the derived element may override this method and return specific name.
        Specified by:
        getName in interface MDElement
        Specified by:
        getName in interface NameOwner
        Overrides:
        getName in class com.nomagic.magicdraw.uml.MDElementImpl
        Returns:
        name of the element.
      • 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 PathElement
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • canChangeSupplier

        public boolean canChangeSupplier()
        Returns:
        true, if view can change supplier.
      • canChangeClient

        public boolean canChangeClient()
        Returns:
        true, if view can change client
      • moveLinkToClientParent

        public void moveLinkToClientParent​(boolean simpleAdd)
      • canHavePaths

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

        protected boolean preDisposeOnUpdate()
        Description copied from class: PresentationElement
        Validate symbol against model and try to fix it before actual symbol update. If symbol is not valid and can not be fixed, request symbol dispose by returning true. Check if symbol should be disposed, because model does not correspond to symbol. This may happen for example if path supplier or client in model is changed, but path still is connected to symbols of old ends.

        Method also can fix symbol if possible - for example reconnect path to other symbols in diagram and etc.

        Returns:
        true if symbol must be disposed
      • paintChildren

        public void paintChildren​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)