public class CurvedLinkRenderer<T extends ActivityLink<?>> extends LinkRenderer<T>
ActivityLink
. It is only used by the LinksCanvas
.LinkRenderer.ArrowDirection, LinkRenderer.TargetLocation
Constructor and Description |
---|
CurvedLinkRenderer(GraphicsBase<?> graphics,
String name)
Constructs a new link renderer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawEndToEnd(javafx.scene.canvas.GraphicsContext gc,
javafx.geometry.Rectangle2D sourceRect,
javafx.geometry.Rectangle2D targetRect)
Draws a link in the given graphics context from the end of the source
rectangle to the end of the target rectangle.
|
protected void |
drawEndToStart(javafx.scene.canvas.GraphicsContext gc,
javafx.geometry.Rectangle2D sourceRect,
javafx.geometry.Rectangle2D targetRect)
Draws a path in the given graphics context from the end of the source
rectangle to the start of the target rectangle.
|
protected void |
drawStartToEnd(javafx.scene.canvas.GraphicsContext gc,
javafx.geometry.Rectangle2D sourceRect,
javafx.geometry.Rectangle2D targetRect)
Draws a path in the given graphics context from the start of the source
rectangle to the end of the target rectangle.
|
protected void |
drawStartToStart(javafx.scene.canvas.GraphicsContext gc,
javafx.geometry.Rectangle2D sourceRect,
javafx.geometry.Rectangle2D targetRect)
Draws a link in the given graphics context from the start of the source
rectangle to the start of the target rectangle.
|
double |
getCurve()
Returns the radius of the curve.
|
void |
setCurve(double curve)
Sets the radius for the curve.
|
arrowHeadColorProperty, arrowSizeProperty, calculateTargetLocation, draw, drawArrowHead, gapProperty, getArrowHeadColor, getArrowSize, getGap, getOffset, getStrokeColor, getStrokeWidth, offsetProperty, setArrowHeadColor, setArrowSize, setGap, setOffset, setStrokeColor, setStrokeWidth, strokeColorProperty, strokeWidthProperty
alphaProperty, disableRedrawAfterPropertyChange, enabledProperty, enableRedrawAfterPropertyChange, getAlpha, getGraphics, getLocation, getName, getTimeAt, isEnabled, isSnapToPixel, redrawObservable, setAlpha, setEnabled, setSnapToPixel, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty
public CurvedLinkRenderer(GraphicsBase<?> graphics, String name)
protected void drawStartToStart(javafx.scene.canvas.GraphicsContext gc, javafx.geometry.Rectangle2D sourceRect, javafx.geometry.Rectangle2D targetRect)
drawStartToStart
in class LinkRenderer<T extends ActivityLink<?>>
sourceRect
- the source rectangletargetRect
- the target rectangleprotected void drawEndToEnd(javafx.scene.canvas.GraphicsContext gc, javafx.geometry.Rectangle2D sourceRect, javafx.geometry.Rectangle2D targetRect)
drawEndToEnd
in class LinkRenderer<T extends ActivityLink<?>>
sourceRect
- the source rectangletargetRect
- the target rectangleprotected void drawStartToEnd(javafx.scene.canvas.GraphicsContext gc, javafx.geometry.Rectangle2D sourceRect, javafx.geometry.Rectangle2D targetRect)
drawStartToEnd
in class LinkRenderer<T extends ActivityLink<?>>
sourceRect
- the source rectangletargetRect
- the target rectangleprotected void drawEndToStart(javafx.scene.canvas.GraphicsContext gc, javafx.geometry.Rectangle2D sourceRect, javafx.geometry.Rectangle2D targetRect)
drawEndToStart
in class LinkRenderer<T extends ActivityLink<?>>
sourceRect
- the source rectangletargetRect
- the target rectanglepublic final void setCurve(double curve)
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).curve
- the radius of the curvepublic final double getCurve()
Copyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.