Class CurvedLinkRenderer<T extends ActivityLink<?>>


public class CurvedLinkRenderer<T extends ActivityLink<?>>
extends LinkRenderer<T>
A link renderer used to draw curved link lines between activities of type ActivityLink. It is only used by the LinksCanvas.
  • Constructor Details

    • CurvedLinkRenderer

      public CurvedLinkRenderer​(GraphicsBase<?> graphics, String name)
      Constructs a new link renderer.
  • Method Details

    • drawStartToStart

      protected void drawStartToStart​(GraphicsContext gc, Rectangle2D sourceRect, Rectangle2D targetRect)
      Draws a link in the given graphics context from the start of the source rectangle to the start of the target rectangle.
      Specified by:
      drawStartToStart in class LinkRenderer<T extends ActivityLink<?>>
      Parameters:
      sourceRect - the source rectangle
      targetRect - the target rectangle
    • drawEndToEnd

      protected void drawEndToEnd​(GraphicsContext gc, Rectangle2D sourceRect, Rectangle2D targetRect)
      Draws a link in the given graphics context from the end of the source rectangle to the end of the target rectangle.
      Specified by:
      drawEndToEnd in class LinkRenderer<T extends ActivityLink<?>>
      Parameters:
      sourceRect - the source rectangle
      targetRect - the target rectangle
    • drawStartToEnd

      protected void drawStartToEnd​(GraphicsContext gc, Rectangle2D sourceRect, Rectangle2D targetRect)
      Draws a path in the given graphics context from the start of the source rectangle to the end of the target rectangle.
      Specified by:
      drawStartToEnd in class LinkRenderer<T extends ActivityLink<?>>
      Parameters:
      sourceRect - the source rectangle
      targetRect - the target rectangle
    • drawEndToStart

      protected void drawEndToStart​(GraphicsContext gc, Rectangle2D sourceRect, Rectangle2D targetRect)
      Draws a path in the given graphics context from the end of the source rectangle to the start of the target rectangle.
      Specified by:
      drawEndToStart in class LinkRenderer<T extends ActivityLink<?>>
      Parameters:
      sourceRect - the source rectangle
      targetRect - the target rectangle
    • setCurve

      public final void setCurve​(double curve)
      Sets the radius for the curve. The radius can not be larger than the offset (see LinkRenderer.setOffset(double)). Setting this value to 0 results in corners instead of curves (but then you might consider using the StraightLinkRenderer as it is more efficient).
      Parameters:
      curve - the radius of the curve
    • getCurve

      public final double getCurve()
      Returns the radius of the curve.
      Returns:
      the curve radius