Class ConnectorToSelfView

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.LinkWithEndsView
com.nomagic.magicdraw.uml.symbols.paths.ConnectorView
com.nomagic.magicdraw.uml.symbols.paths.ConnectorToSelfView
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.paths.PathWithEnds<com.nomagic.magicdraw.uml.symbols.shapes.LinkEndView>, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class ConnectorToSelfView extends ConnectorView
  • Constructor Details

    • ConnectorToSelfView

      public ConnectorToSelfView()
    • ConnectorToSelfView

      public ConnectorToSelfView(@CheckForNull PresentationElement parent)
  • Method Details

    • setBounds

      public void setBounds(Rectangle bounds)
      Description copied from class: PathElement
      Moves link to new location.
      Overrides:
      setBounds in class PathElement
      Parameters:
      bounds - new location of a path
    • intersectsInternal

      public boolean intersectsInternal(int x, int y, int width, int height)
      Description copied from class: PathElement
      Check intersection with given rectangle. Intersection is counted by getting index of segment in path.
      Overrides:
      intersectsInternal in class PathElement
      Parameters:
      x - top left x point.
      y - top left y point.
      width - width of rectangle.
      height - height of rectangle.
      Returns:
      true if rectangle intersect with any line of path.
    • getMiddlePoint

      public Point getMiddlePoint()
      Description copied from class: PathElement
      Calculates and returns middle point of link. For this link it is average between supplier's and client's points.
      Overrides:
      getMiddlePoint in class PathElement
      Returns:
      middle point.
    • calculatePathBounds

      public Rectangle calculatePathBounds(Point first, Point second, List<Point> breaks)
      Overrides:
      calculatePathBounds in class PathElement
    • getMinimumDimension

      public final UnmodifiableDimension getMinimumDimension()
      Description copied from class: PresentationElement
      get minimum possible size for object
      Overrides:
      getMinimumDimension in class PresentationElement
      Returns:
      minimum dimension
    • coversPoint

      public boolean coversPoint(int x, int y, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind)
      Description copied from class: PathElement
      Checks if object covers provided point
      Overrides:
      coversPoint in class PathElement
      Returns:
      true if object covers this point
    • getPresentationElementAt

      public PresentationElement getPresentationElementAt(Point point, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind)
      Description copied from class: PresentationElement
      Gets object view at point.
      Overrides:
      getPresentationElementAt in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      kind - intersection kind to check for
      Returns:
      object view at this point
    • initialize

      public void initialize()
      Description copied from class: PresentationElement
      Initialize symbol and its children state. Symbol must be initialized before doing any resize, painting and etc. These operations can lead to unpredictable results otherwise.
      Overrides:
      initialize in class PresentationElement
    • setSupplierPoint

      public void setSupplierPoint(Point pt)
      Description copied from class: PathElement
      Sets first point. Sets new location for text boxes if a point is changed, text boxes must be moved too.
      Overrides:
      setSupplierPoint in class PathElement
      Parameters:
      pt - new 1st point
    • calculateEnds

      public boolean calculateEnds()
    • isToSelf

      public boolean isToSelf()
      Overrides:
      isToSelf in class PathElement
      Returns:
      true if this path is to self (client and supplier are the same).
    • setClientPoint

      public void setClientPoint(Point pt)
      Description copied from class: PathElement
      Sets client point.
      Overrides:
      setClientPoint in class PathElement
      Parameters:
      pt - new client point.
    • 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 ConnectorView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • isAlwaysToSelf

      public boolean isAlwaysToSelf()
      Overrides:
      isAlwaysToSelf in class PathElement
    • findOwnerForElement

      @CheckForNull public com.dassault_systemes.modeler.foundation.model.ModelElement findOwnerForElement(PresentationElement newParent, PresentationElement client, PresentationElement supplier, com.dassault_systemes.modeler.foundation.model.ModelElementOwnershipContext ownershipContext)
      Overrides:
      findOwnerForElement in class PathElement
    • internalGetBoundsShape

      @CheckForNull public Shape internalGetBoundsShape(ConverterToShape converterToShape)
      Overrides:
      internalGetBoundsShape in class PathElement