Class ConnectorToSelfView

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

    @OpenApi
    public class ConnectorToSelfView
    extends ConnectorView
    • Constructor Detail

      • ConnectorToSelfView

        public ConnectorToSelfView()
      • ConnectorToSelfView

        public ConnectorToSelfView​(@CheckForNull
                                   PresentationElement parent)
    • Method Detail

      • setBounds

        public void setBounds​(java.awt.Rectangle bounds)
        Description copied from class: PathElement
        Moves link to new location.
        Parameters:
        bounds - new location of link.
      • 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.
        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 java.awt.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.
        Returns:
        middle point.
      • calculatePathBounds

        public java.awt.Rectangle calculatePathBounds​(java.awt.Point first,
                                                      java.awt.Point second,
                                                      java.util.List<java.awt.Point> breaks)
      • coversPoint

        public boolean coversPoint​(int x,
                                   int y)
        Description copied from class: PathElement
        Checks if object covers provided point
        Returns:
        true if object covers this point
      • getPresentationElementAt

        public PresentationElement getPresentationElementAt​(java.awt.Point point)
        Description copied from class: PresentationElement
        Gets object view at point.
        Overrides:
        getPresentationElementAt in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
        Parameters:
        point - object view at point location
        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.
      • setSupplierPoint

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

        public boolean calculateEnds()
      • isToSelf

        public boolean isToSelf()
        Returns:
        true if link is link to self
      • setClientPoint

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

        public boolean isAlwaysToSelf()
      • findParentForData

        public Element findParentForData​(PresentationElement newParent,
                                         com.nomagic.uml2.ElementAddContext addContext)
      • internalGetBoundsShape

        @CheckForNull
        public java.awt.Shape internalGetBoundsShape​(ConverterToShape converterToShape)