Class LinkRenderer<T extends ActivityLink<?>>

    • Constructor Detail

      • LinkRenderer

        protected LinkRenderer​(GraphicsBase<?> graphics,
                               String name)
        Constructs a new link renderer.
        Since:
        1.0
    • Method Detail

      • calculateTargetLocation

        protected final LinkRenderer.TargetLocation calculateTargetLocation​(double sx,
                                                                            double sy,
                                                                            double tx,
                                                                            double ty)
      • draw

        public void draw​(T link,
                         GraphicsContext gc,
                         Rectangle2D sourceBounds,
                         Rectangle2D targetBounds)
        Draws the given link between the two activity bounds into the given graphics context.
        Parameters:
        link - the link to draw
        gc - the graphics context
        sourceBounds - the bounds of the source activity
        targetBounds - the bounds of the target activity
      • drawStartToStart

        protected abstract void drawStartToStart​(GraphicsContext gc,
                                                 Rectangle2D sourceRect,
                                                 Rectangle2D targetRect)
        Draws a path in the given graphics context from the start of the source rectangle to the start of the target rectangle.
        Parameters:
        sourceRect - the source rectangle
        targetRect - the target rectangle
        Since:
        1.0
      • drawEndToEnd

        protected abstract void drawEndToEnd​(GraphicsContext gc,
                                             Rectangle2D sourceRect,
                                             Rectangle2D targetRect)
        Draws a path in the given graphics context from the end of the source rectangle to the end of the target rectangle.
        Parameters:
        sourceRect - the source rectangle
        targetRect - the target rectangle
        Since:
        1.0
      • drawStartToEnd

        protected abstract 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.
        Parameters:
        sourceRect - the source rectangle
        targetRect - the target rectangle
        Since:
        1.0
      • drawEndToStart

        protected abstract 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.
        Parameters:
        sourceRect - the source rectangle
        targetRect - the target rectangle
        Since:
        1.0
      • getStrokeWidth

        public final double getStrokeWidth()
      • strokeWidthProperty

        public final DoubleProperty strokeWidthProperty()
      • setStrokeWidth

        public final void setStrokeWidth​(double strokeWidth)
      • getStrokeColor

        public final Color getStrokeColor()
      • setStrokeColor

        public final void setStrokeColor​(Color strokeColor)
      • getArrowHeadColor

        public final Color getArrowHeadColor()
      • setArrowHeadColor

        public final void setArrowHeadColor​(Color arrowHeadColor)
      • arrowSizeProperty

        public final IntegerProperty arrowSizeProperty()
        The arrow size determines how big the arrow head will be drawn.
        Returns:
        the arrow head size
      • getArrowSize

        public final int getArrowSize()
      • setArrowSize

        public final void setArrowSize​(int arrowSize)
      • offsetProperty

        public final DoubleProperty offsetProperty()
        The offset determines the end location of the first segment of the calculated path. The first segment is used to move away from the start or end bounds before continuing to draw up or down.
      • getOffset

        public final double getOffset()
        The offset determines the end location of the first segment of the calculated path. The first segment is used to move away from the start or end bounds before continuing to draw up or down.
        Returns:
        the offset
        Since:
        1.0
      • setOffset

        public final void setOffset​(double offset)
        The offset determines the end location of the first segment of the calculated path. The first segment is used to move away from the start or end bounds before continuing to draw up or down.
        Parameters:
        offset - the offset in pixels
        Since:
        1.0
      • gapProperty

        public DoubleProperty gapProperty()
        The gap determines how far the line is drawn away from the bounds of the source or target timeline object.
      • getGap

        public final double getGap()
        The gap determines how far the line is drawn away from the bounds of the source or target timeline object.
        Returns:
        the gap between line and timeline objects
        Since:
        1.0
      • setGap

        public final void setGap​(double gap)
        The gap determines how far the line is drawn away from the bounds of the source or target timeline object.
        Parameters:
        gap - the distance between line and timeline objects
        Since:
        1.0