Sets a value indicating whether a link should avoid nodes by going the shortest path from its origin to its destination without crossing any other nodes.uld automatically find its way between nodes so that it will not cross other nodes.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public void setAutoRoute ( |
true if the link should be routed automatically, otherwise false.
If AutoRoute is enabled, a link automatically finds the shortest possible path between its origin and destination that doesn't intersect Obstacle nodes. The number and orientation of the link's segments are updated when the nodes it links are moved around. The positions of end points of a routed link are not changed, unless the link is also set to Dynamic.
It is best to use AutoRoute with links of the Cascading style. Note that automatic routing overrides the RetainForm behavior.
![]() |
---|
Links whose AutoRoute property is enabled are re-routed when they intersect with newly added nodes. Consequently, when constructing a large diagram programmatically, each link could be re-routed multiple times, once for each newly added node whose location arguments collide with link's bounding rectangle. That might slow down diagram generation a lot. To avoid that, create all nodes before adding the links; that requires a single calculation for each link's route. Alternatively, enclose batch creation operations within suspendLinkRouter and resumeLinkRouter calls. |