Class Connection

java.lang.Object
com.nomagic.magicdraw.ui.pathicon.Connection

@OpenApiAll public final class Connection extends Object
Constants defining the kind of connection using for painting the path icons
  • Field Details

  • Constructor Details

    • Connection

      public Connection()
  • Method Details

    • drawConnection

      public static Point drawConnection(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, @CheckForNull 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:
    • drawConnection

      public static Point drawConnection(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, @CheckForNull Rectangle shapeBounds)
      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
      shapeBounds - connected shape bounds
      Returns:
      Point where path line should begin
      See Also:
    • drawConnection

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