Class LinkAttributeView

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

@OpenApi public class LinkAttributeView extends PathElement
  • Constructor Details

    • LinkAttributeView

      public LinkAttributeView(@CheckForNull PresentationElement parent)
    • LinkAttributeView

      public LinkAttributeView()
  • Method Details

    • internalGetPresentationElementStroke

      public 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.
      Overrides:
      internalGetPresentationElementStroke in class PathElement
      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 String getName()
      Description copied from interface: MDElement
      Returns the name of the element. This element will return null always, because it cannot have a name. However, the derived element may override this method and return a 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 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 PathElement
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • canChangeSupplier

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

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

      public void moveLinkToClientParent(boolean simpleAdd)
      Overrides:
      moveLinkToClientParent in class PathElement
    • canHavePaths

      public boolean canHavePaths()
      Overrides:
      canHavePaths in class PresentationElement
      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.

      Overrides:
      preDisposeOnUpdate in class PathElement
      Returns:
      true if symbol must be disposed
    • paintChildren

      public void paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Specified by:
      paintChildren in class PresentationElement