public interface IArrow
IEdge
.
Instances of this class are used by IEdgeStyle
implementations.
Modifier and Type | Field and Description |
---|---|
static IArrow |
CIRCLE
A singleton
IArrow instance that paints a simple circle-shaped black arrow. |
static IArrow |
CROSS
A singleton
IArrow instance that paints a simple cross-shaped black arrow. |
static IArrow |
DEFAULT
A singleton
IArrow instance that paints a default shaped black arrow. |
static IArrow |
DIAMOND
A singleton
IArrow instance that paints a simple diamond-shaped black arrow. |
static IArrow |
NONE
A singleton
IArrow instance that paints no arrow at all. |
static IArrow |
SHORT
A singleton
IArrow instance that paints a short black arrow. |
static IArrow |
SIMPLE
A singleton
IArrow instance that paints a simple black arrow. |
static IArrow |
TRIANGLE
A singleton
IArrow instance that paints a simple triangle-shaped black arrow. |
Modifier and Type | Method and Description |
---|---|
IBoundsProvider |
getBoundsProvider(IEdge edge,
boolean atSource,
PointD anchor,
PointD directionVector)
Gets an
IBoundsProvider implementation that can yield this arrow's bounds if painted at the given location using
the given direction for the given edge. |
double |
getCropLength()
Gets the cropping length associated with this instance.
|
double |
getLength()
Returns the length of the arrow (the distance from the arrow's tip to the position where the visual representation of
the edge's path should begin).
|
IVisualCreator |
getVisualCreator(IEdge edge,
boolean atSource,
PointD anchor,
PointD direction)
Gets an
IVisualCreator implementation that will paint this arrow at the given location using the given direction
for the given edge. |
static final IArrow CIRCLE
IArrow
instance that paints a simple circle-shaped black arrow.static final IArrow CROSS
IArrow
instance that paints a simple cross-shaped black arrow.static final IArrow DEFAULT
IArrow
instance that paints a default shaped black arrow.static final IArrow DIAMOND
IArrow
instance that paints a simple diamond-shaped black arrow.IBoundsProvider getBoundsProvider(IEdge edge, boolean atSource, PointD anchor, PointD directionVector)
IBoundsProvider
implementation that can yield this arrow's bounds if painted at the given location using
the given direction for the given edge.edge
- the edge this arrow belongs toatSource
- whether this will be the source arrowanchor
- the anchor point for the tip of the arrowdirectionVector
- the direction the arrow is pointing inIBoundsProvider
interface that can subsequently be used to query the bounds. Clients
will always call this method before using the implementation and may not cache the instance returned. This allows for
applying the flyweight design pattern to implementations.double getCropLength()
This value is used by IEdgeStyle
implementations to let the edge appear to end
shortly before its actual target.
double getLength()
IVisualCreator getVisualCreator(IEdge edge, boolean atSource, PointD anchor, PointD direction)
IVisualCreator
implementation that will paint this arrow at the given location using the given direction
for the given edge.edge
- the edge this arrow belongs toatSource
- whether this will be the source arrowanchor
- the anchor point for the tip of the arrowdirection
- the direction the arrow is pointing inIVisualCreator
interface that can subsequently be used to perform the actual painting.
Clients will always call this method before using the implementation and may not cache the instance returned. This
allows for applying the flyweight design pattern to implementations.