public class EdgeSelectionIndicatorInstaller extends EdgeDecorationInstaller
ICanvasObjectInstaller
interface that can install the selection outline of an
IEdge
.
This will install
an ICanvasObject
that will render the path and the bends of an edge using a pen
for the path and a
drawing
for the bends.
Modifier and Type | Field and Description |
---|---|
static ResourceKey |
BEND_TEMPLATE_KEY
A
ResourceKey that will be used to find the IVisualTemplate that will be used to draw the bends of the
edge. |
static ResourceKey |
PEN_KEY
A
ResourceKey that will be used to find the Pen that will be used to draw the path of the edge. |
Constructor and Description |
---|
EdgeSelectionIndicatorInstaller() |
Modifier and Type | Method and Description |
---|---|
protected IVisualTemplate |
getBendDrawing(CanvasControl canvas,
IEdge edge)
Callback method that retrieves the drawing of the bend for the context.
|
protected String |
getDecoratorStyleClass(CanvasControl canvas,
IEdge edge)
Callback method that retrieves the style class for the context.
|
protected Pen |
getPen(CanvasControl canvas,
IEdge edge)
Callback method that retrieves the pen for the context.
|
addCanvasObject
public static final ResourceKey BEND_TEMPLATE_KEY
ResourceKey
that will be used to find the IVisualTemplate
that will be used to draw the bends of the
edge.public static final ResourceKey PEN_KEY
ResourceKey
that will be used to find the Pen
that will be used to draw the path of the edge.protected IVisualTemplate getBendDrawing(CanvasControl canvas, IEdge edge)
This implementation will use the BEND_TEMPLATE_KEY
resource to find a IVisualTemplate
instance. If null
is yielded, a default drawing will be used.
getBendDrawing
in class EdgeDecorationInstaller
canvas
- The canvas for which the drawing shall be returned.edge
- The edge for which the rendering will be used.protected String getDecoratorStyleClass(CanvasControl canvas, IEdge edge)
EdgeDecorationInstaller
getDecoratorStyleClass
in class EdgeDecorationInstaller
protected Pen getPen(CanvasControl canvas, IEdge edge)
This implementation will use the PEN_KEY
resource to find a Pen
instance. If null
is yielded, a
default pen will be used.
getPen
in class EdgeDecorationInstaller
edge
- The edge for which the rendering will be used.canvas
- The canvas for which the pen shall be returned.