Class Connection


  • @OpenApiAll
    public final class Connection
    extends java.lang.Object
    Constants defining the kind of connection using for painting the path icons
    • Constructor Summary

      Constructors 
      Constructor Description
      Connection()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Point drawConnection​(java.awt.Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, java.awt.Rectangle shapeBounds)
      method for Path end shape drawing draw lots of shapes
      static java.awt.Point drawConnection​(java.awt.Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, java.awt.Shape boundingShape, boolean useCorrecting)
      Method for Path end shape drawing.
      static java.awt.Point drawConnection​(java.awt.Graphics2D g, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, java.awt.Rectangle shapeBounds, java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)  
      static java.awt.Point drawConnection​(java.awt.Graphics2D g, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, java.awt.Shape boundingShape, boolean fixOverlapping, java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)
      Paints connection end.
      static java.awt.Point drawConnection​(java.awt.Graphics2D g, ResizableIcon icon, int x, int y, int x2, int y2, int size, java.awt.Rectangle shapeBounds, java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Connection

        public Connection()
    • Method Detail

      • drawConnection

        public static java.awt.Point drawConnection​(java.awt.Graphics2D g,
                                                    int type,
                                                    int x,
                                                    int y,
                                                    int x2,
                                                    int y2,
                                                    int preferredSize,
                                                    @CheckForNull
                                                    java.awt.Shape boundingShape,
                                                    boolean useCorrecting)
        Method for Path end shape drawing.
        Parameters:
        g - graphics context.
        type - path end draw style.
        x - from point.
        y - from point.
        x2 - to point.
        y2 - to point.
        preferredSize - preferred size of path end shape.
        boundingShape - client bounding shape.
        useCorrecting - use correcting in case the link end symbol covers specified bounds.
        Returns:
        Point where path line should begin.
        See Also:
        Connection
      • drawConnection

        public static java.awt.Point drawConnection​(java.awt.Graphics2D g,
                                                    int type,
                                                    int x,
                                                    int y,
                                                    int x2,
                                                    int y2,
                                                    int preferredSize,
                                                    @CheckForNull
                                                    java.awt.Rectangle shapeBounds)
        method for Path end shape drawing draw lots of shapes
        Parameters:
        g - graphics context
        type - path end draw style
        x - from point
        y - from point
        x2 - to point
        y2 - to point
        preferredSize - preferred size of path end shape
        shapeBounds - client shape bounds
        Returns:
        Point where path line should begin
        See Also:
        Connection
      • drawConnection

        public static java.awt.Point drawConnection​(java.awt.Graphics2D g,
                                                    com.nomagic.magicdraw.ui.pathicon.PathIcon icon,
                                                    boolean left,
                                                    int x,
                                                    int y,
                                                    int x2,
                                                    int y2,
                                                    int size,
                                                    @CheckForNull
                                                    java.awt.Shape boundingShape,
                                                    boolean fixOverlapping,
                                                    java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)
        Paints connection end.
        Parameters:
        g - graphics context.
        icon - icon of the end.
        left - left connection.
        x - x coordinate of the intersection with the shape point.
        y - y coordinate of the intersection with the shape point.
        x2 - x coordinate of the next link segment point.
        y2 - y coordinate of the next link segment point.
        size - size of the icon.
        boundingShape - bounding shape.
        fixOverlapping - if true then correcting of the link end shape covering client or supplier shape should be used.
        Returns:
        connection point from which link must be painted.
      • drawConnection

        public static java.awt.Point drawConnection​(java.awt.Graphics2D g,
                                                    com.nomagic.magicdraw.ui.pathicon.PathIcon icon,
                                                    boolean left,
                                                    int x,
                                                    int y,
                                                    int x2,
                                                    int y2,
                                                    int size,
                                                    @CheckForNull
                                                    java.awt.Rectangle shapeBounds,
                                                    java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)
      • drawConnection

        public static java.awt.Point drawConnection​(java.awt.Graphics2D g,
                                                    ResizableIcon icon,
                                                    int x,
                                                    int y,
                                                    int x2,
                                                    int y2,
                                                    int size,
                                                    @CheckForNull
                                                    java.awt.Rectangle shapeBounds,
                                                    java.util.function.Function<ResizableIcon,​ResizableIcon> iconTransformer)