@OpenApiAll public abstract class PathElementRenderer extends PresentationElementRenderer
PathElement
.
Path decoration methods are called even when the path is being drawn/created in a diagram, and supplier or client not yet connected, breakpoints are not yet set.PresentationElementRenderer
,
ShapeRenderer
Constructor and Description |
---|
PathElementRenderer() |
Modifier and Type | Method and Description |
---|---|
protected void |
drawPathAdornment(java.awt.Graphics g,
PathElement pathElement,
java.awt.Point supplierPoint,
java.awt.Point clientPoint,
java.util.List<java.awt.Point> breakPoints,
PresentationElement supplier,
PresentationElement client)
Draws the path adornment.
|
protected int |
getClientEndPreferredSize(PathElement pathElement,
PresentationElement client)
The path client end preferred size.
|
protected PathEndRenderer |
getClientEndRenderer(PathElement pathElement,
PresentationElement client)
Provides the path client end renderer.
|
int |
getLineWidth(PathElement pathElement)
Returns path line width
Override to use the custom line width
|
protected java.awt.BasicStroke |
getPathStroke(PathElement pathElement)
Stroke used to draw path.
|
protected int |
getSupplierEndPreferredSize(PathElement pathElement,
PresentationElement supplier)
The path supplier end preferred size.
|
protected PathEndRenderer |
getSupplierEndRenderer(PathElement pathElement,
PresentationElement supplier)
Provides the path supplier end renderer.
|
protected void |
updateText(PresentationElement presentationElement)
Does nothing, should not be called
|
afterUpdate, beforeUpdate, getCenterlinePoint, getColor, getFontProvider, getText, propertiesChanged
protected int getClientEndPreferredSize(PathElement pathElement, @CheckForNull PresentationElement client)
pathElement
- path elementclient
- client end of the path element. It might not be actually connected to the path. Should be used instead of PathElement.getClient()
protected int getSupplierEndPreferredSize(PathElement pathElement, @CheckForNull PresentationElement supplier)
pathElement
- path elementsupplier
- supplier end of the path. Might be null when the path is being newly created. Should be used instead of PathElement.getSupplier()
@CheckForNull protected PathEndRenderer getClientEndRenderer(PathElement pathElement, @CheckForNull PresentationElement client)
pathElement
- path elementclient
- client end of the path element. It might not be actually connected to the path. Should be used instead of PathElement.getClient()
PathEndRenderer
@CheckForNull protected PathEndRenderer getSupplierEndRenderer(PathElement pathElement, @CheckForNull PresentationElement supplier)
pathElement
- path elementsupplier
- supplier end of the path. Might be null when the path is being newly created. Should be used instead of PathElement.getSupplier()
PathEndRenderer
@CheckForNull protected java.awt.BasicStroke getPathStroke(PathElement pathElement)
pathElement
- drawing pathPresentationElement.getStroke(int)
,
PresentationElement.getStroke(int, int)
,
PresentationElement.getStroke(BasicStroke, int)
,
PresentationElement.getStroke(int, int, int)
,
PresentationElement.getStroke(float, int, int, float, float[], float)
public int getLineWidth(PathElement pathElement)
pathElement
- path to draw.@OpenApi protected void drawPathAdornment(java.awt.Graphics g, PathElement pathElement, java.awt.Point supplierPoint, java.awt.Point clientPoint, java.util.List<java.awt.Point> breakPoints, @CheckForNull PresentationElement supplier, @CheckForNull PresentationElement client)
g
- graphics where path is drawnpathElement
- path to draw adornment forsupplierPoint
- point where the supplier end should be painted. Should be used instead of PathElement.getSupplierDrawPoint()
clientPoint
- point where the client end should be painted. Should be used instead of PathElement.getClientDrawPoint()
()}breakPoints
- breakpoints between the supplier and client points, in that order. Should be used instead of PathElement.getBreakPoints()
supplier
- supplier end of the path. Might be null when the path is being newly created. Should be used instead of PathElement.getSupplier()
client
- client end of the path element. It might not be actually connected to the path. Should be used instead of PathElement.getClient()
protected final void updateText(PresentationElement presentationElement)
updateText
in class PresentationElementRenderer
presentationElement
- presentation element