Class PathConnector

java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
All Implemented Interfaces:
BaseElement, MDElement, ModelElementProvider, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener
Direct Known Subclasses:
PathElement, ShapeElement

@OpenApi public abstract class PathConnector extends PresentationElement
This class is base class for presentation elements connectible by some path element. This means that instance of this class can have incoming or outgoing path elements.
  • Field Details

    • showsProxy

      @CheckForNull protected Boolean showsProxy
  • Constructor Details

    • PathConnector

      public PathConnector()
    • PathConnector

      public PathConnector(@CheckForNull PresentationElement v)
  • Method Details

    • clone

      public PathConnector clone()
      Specified by:
      clone in interface BaseElement
      Overrides:
      clone in class PresentationElement
    • getConnectedPathElements

      @OpenApi public final List<PathElement> getConnectedPathElements()
      Returns connected path elements. If element has no path elements returns empty list.
      Returns:
      connected path elements. Collection is unmodifiable.
    • getConnectedPathElements

      @OpenApi public List<PathElement> getConnectedPathElements(boolean incoming)
      Returns connected path elements by direction.
      Parameters:
      incoming - true if incoming paths should be selected, false if outgoing.
      Returns:
      connected path elements.
    • getConnectedPathElements

      @OpenApi public List<PathElement> getConnectedPathElements(boolean incoming, boolean excludeToSelf)
      Returns connected path elements by direction with an option to exclude paths to self
      Parameters:
      incoming - true if incoming paths should be selected, false if outgoing.
      excludeToSelf - true if paths with a source equal to target should not be added to the list, false to include them
      Returns:
      connected path elements.
    • getConnectedPathElementCount

      @OpenApi public final int getConnectedPathElementCount()
      Returns number of connected path elements.
      Returns:
      number of connected path elements.
    • sSetConnectedPathElements

      public void sSetConnectedPathElements(List<PathElement> paths)
      Sets new path elements.
      Parameters:
      paths - list of path elements.
    • addConnectedPathElement

      public boolean addConnectedPathElement(PathElement element)
      Adds a new path element, and recalculates its position.
      Parameters:
      element - element to be added.
      Returns:
      true if an element was added
    • sAddConnectedPathElement

      public boolean sAddConnectedPathElement(PathElement element)
      Adds a new path element.
      Parameters:
      element - element to be added.
      Returns:
      true if an element was added
    • sRemoveConnectedPathElement

      public boolean sRemoveConnectedPathElement(PathElement element)
      Removes path element.
      Parameters:
      element - element to remove.
      Returns:
      true if an element was removed
    • removeConnectedPathElement

      public boolean removeConnectedPathElement(PathElement link)
      Removes path element.
      Parameters:
      link - element to remove.
      Returns:
      true if an element was removed
    • movePathElements

      public void movePathElements()
      Overrides:
      movePathElements in class PresentationElement
    • movePathElement

      protected abstract void movePathElement(PathElement element, @CheckForNull PathConnector requestor)
      Calculates position of a path element.
      Parameters:
      element - element which position will be calculated.
      requestor - the requestor of this path moving. Implementations may check to avoid endless loops.
    • movePathElement

      public final void movePathElement(PathElement path, boolean notify)
      Calculates position of a path element.
      Parameters:
      path - path element to calculate.
      notify - true if both ends of path element should be calculated.
    • dispose

      public void dispose()
      Description copied from class: PresentationElement
      disposes ends of links when link is deleted
      Specified by:
      dispose in interface BaseElement
      Overrides:
      dispose in class PresentationElement
    • disposeConnectedPaths

      protected void disposeConnectedPaths()
    • accept

      @OpenApi 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.MDElementImpl
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • sSetVisibility

      public void sSetVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility)
      Description copied from class: PresentationElement
      Sets element visibility flag.
      Overrides:
      sSetVisibility in class PresentationElement
      Parameters:
      visibility - flag value
    • supportsVisibleConnectedPathElementsIfSelfInvisible

      protected boolean supportsVisibleConnectedPathElementsIfSelfInvisible()
    • setVisibility

      public void setVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility)
      Description copied from class: PresentationElement
      Sets element visibility flag.
      Overrides:
      setVisibility in class PresentationElement
      Parameters:
      visibility - flag value
    • setParent

      public void setParent(PresentationElement parent)
      Description copied from class: PresentationElement
      Overrides:
      setParent in class PresentationElement
      Parameters:
      parent - parent view
    • getPreferredArrowLength

      public int getPreferredArrowLength()
    • selectPathsForMoving

      protected List<PathElement> selectPathsForMoving(List<PresentationElement> subPresentationElements)
      Description copied from class: PresentationElement
      Select paths to move with current symbol from deep structure. Some paths can be connected to current symbol, but owned in some deep child of this symbol.
      Overrides:
      selectPathsForMoving in class PresentationElement
      Parameters:
      subPresentationElements - sub children of this symbol
      Returns:
      paths to move together with current symbol
    • getConnectedPathElement

      @CheckForNull public PathElement getConnectedPathElement(com.dassault_systemes.modeler.foundation.model.ModelElement element)
      Return a connected path with a given model element
      Parameters:
      element - element
      Returns:
      connected path element of given element
    • checkShowsProxy

      protected boolean checkShowsProxy()
      Overrides:
      checkShowsProxy in class PresentationElement
    • isShowsProxy

      public final boolean isShowsProxy()
      Overrides:
      isShowsProxy in class PresentationElement
    • clearShowsProxy

      public void clearShowsProxy()
      Overrides:
      clearShowsProxy in class PresentationElement
    • findSymbolForEnd

      @CheckForNull public PresentationElement findSymbolForEnd(Element element, Class<? extends PresentationElement> preferredEndType, boolean asClient)
      Find symbol for the Path end (client or supplier)
      Parameters:
      element - path end element
      preferredEndType - preferred end type
      asClient - search for a client element if true
      Returns:
      found symbol or null
    • findSymbolForEnd

      @CheckForNull protected PresentationElement findSymbolForEnd(Stream<PresentationElement> elements, boolean asClient)
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class PresentationElement