The crossing link shape policy calculates the positions
of the crossings, but it is the crossing graphics that actually draw
the crossings. If no crossing graphic is associated with a link, then
the crossing is not displayed and a gap appears instead. A crossing
graphic is an instance of a subclass of
IlvGraphic that implements the
IlvCrossingGraphic interface.
The package ilog.views.graphic.linkpolicy contains
two predefined crossing graphics:
Unlike the shape policy itself, crossing graphics cannot
be shared by several links. Once a crossing graphic is associated
with a link, it is fully maintained by the crossing link shape policy.
Therefore, it is not necessary to move or to reshape the crossing
graphic, as all this is done by the link shape policy automatically.
To set a tunnel crossing graphic, call:
link.setCrossingGraphic(new IlvTunnelCrossings(link));
To set a bridge crossing graphic, call
link.setCrossingGraphic(new IlvBridgeCrossings(link));