| Advanced Features > Link Shape Policies > Crossing Link Shape Policy > Crossing Graphics |
Crossing Graphics |
INDEX
PREVIOUS
NEXT
|
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:
IlvTunnelCrossings for tunnel crossings
IlvBridgeCrossings for bridge crossings
Unlike the shape policy itself, crossing graphics cannot be shared between 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));
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |