public class RoutingOptions extends java.lang.Object implements RoutingOptions
Diagram.getRoutingOptions()
method lets you customize the behavior of the link routing algorithm.| Modifier and Type | Method and Description |
|---|---|
Anchoring |
getAnchoring()
Gets a value indicating whether the routing algorithm should align
links to the anchor points of nodes.
|
short |
getCrossingCost()
Gets the value added to the total route cost if a link crosses
another link.
|
static RouteHeuristics |
getDistance()
Return a heuristic function that returns the real distance
sqrt(dx^2 + dy^2) between two pieces of the routing grid.
|
static RouteHeuristics |
getDistSquare()
Returns a heuristic function that returns the square distance
dx^2 + dy^2 as a cost evaluation of the distance between two
pieces of the routing grid.
|
boolean |
getDontOptimizeLongRoutes()
Gets a value indicating whether the algorithm should spend time
to optimize long routes.
|
Orientation |
getEndOrientation()
Gets a value indicating whether routes should end in horizontal or
vertical direction.
|
float |
getGridSize()
Gets the size of the routing grid.
|
boolean |
getIgnoreAnchoring()
For internal use.
|
short |
getLengthCost()
Gets the value added to the total route cost for each grid square
occupied by the link.
|
static RouteHeuristics |
getMaxAbs()
Returns a heuristic function that returns max(dx, dy) as a cost
evaluation of the distance between two pieces of the routing grid.
|
short |
getNodeVicinityCost()
Gets the value added to the total route cost when a link passes
through the buffer area around a node.
|
float |
getNodeVicinitySize()
Gets the size of the buffer area around a node for which link routes
are assigned higher costs if they pass through that area.
|
RouteHeuristics |
getRouteHeuristics()
Gets the heuristic function used by the routing algorithm to choose
next points in the route.
|
boolean |
getSmartPolylineEnds()
Gets a value indicating whether the end segments of polyline
links should be oriented orthogonally to the node bounds.
|
Orientation |
getStartOrientation()
Gets a value indicating whether routes should start in horizontal or
vertical direction.
|
java.util.EnumSet<RerouteLinks> |
getTriggerRerouting()
Gets a value indicating when JDiagram should look for new link routes.
|
short |
getTurnCost()
Gets the value added to the total route cost when a link makes a turn.
|
void |
setAnchoring(Anchoring value)
Sets a value indicating whether the routing algorithm should align
links to the anchor points of nodes.
|
void |
setCrossingCost(short value)
Sets the value added to the total route cost if a link crosses
another link.
|
void |
setDefaultMode()
Sets the routing cost parameters to their default values.
|
void |
setDontOptimizeLongRoutes(boolean value)
Sets a value indicating whether the algorithm should spend time
to optimize long routes.
|
void |
setEndOrientation(Orientation value)
Sets a value indicating whether routes should end in horizontal or
vertical direction.
|
void |
setGridSize(float value)
Sets the size of the routing grid.
|
void |
setLengthCost(short value)
Sets the value added to the total route cost for each grid square
occupied by the link.
|
void |
setMinSegmentsMode()
Sets the routing costs to values that find routes having
low number of segments.
|
void |
setNodeVicinityCost(short value)
Sets the value added to the total route cost when a link passes
through the buffer area around a node.
|
void |
setNodeVicinitySize(float value)
Sets the size of the buffer area around a node for which link routes
are assigned higher costs if they pass through that area.
|
void |
setQuickMode()
Sets the routing costs to values that quickly find routes,
however with a lower route quality.
|
void |
setRouteHeuristics(RouteHeuristics value)
Sets the heuristic function used by the routing algorithm to choose
next points in the route.
|
void |
setSmartPolylineEnds(boolean value)
Sets a value indicating whether the end segments of polyline
links should be oriented orthogonally to the node bounds.
|
void |
setStartOrientation(Orientation value)
Sets a value indicating whether routes should start in horizontal or
vertical direction.
|
void |
setTriggerRerouting(java.util.EnumSet<RerouteLinks> value)
Sets a value indicating when JDiagram should look for new link routes.
|
void |
setTurnCost(short value)
Sets the value added to the total route cost when a link makes a turn.
|
public void setDefaultMode()
public void setQuickMode()
public void setMinSegmentsMode()
public float getGridSize()
getGridSize in interface RoutingOptionspublic void setGridSize(float value)
setGridSize in interface RoutingOptionsvalue - A float value specifying the size of the routing grid pieces.public float getNodeVicinitySize()
public void setNodeVicinitySize(float value)
value - A float value specifying the size of the buffer zone around a
node where a penalty cost is added to the cost of a passing link.public short getCrossingCost()
public void setCrossingCost(short value)
value - An integer value added to the cost of a route
when a link crosses another link.public short getLengthCost()
getLengthCost in interface RoutingOptionspublic void setLengthCost(short value)
value - An integer value added to the cost of a route for each routing
grid square through which the link passes.public short getNodeVicinityCost()
getNodeVicinityCost in interface RoutingOptionspublic void setNodeVicinityCost(short value)
value - An integer value added to the cost of a route when the link
passes near a node.public short getTurnCost()
getTurnCost in interface RoutingOptionspublic void setTurnCost(short value)
value - An integer value added to the cost of a route when
the link makes a turn.public boolean getDontOptimizeLongRoutes()
true if the shape of long routes should not be
optimized, otherwise false.public void setDontOptimizeLongRoutes(boolean value)
value - true if the shape of long routes should not be
optimized, otherwise false.public java.util.EnumSet<RerouteLinks> getTriggerRerouting()
RerouteLinks members.public void setTriggerRerouting(java.util.EnumSet<RerouteLinks> value)
value - A combination of RerouteLinks members.public Orientation getStartOrientation()
Orientation enumeration.public void setStartOrientation(Orientation value)
value - A member of the Orientation enumeration.public Orientation getEndOrientation()
Orientation enumeration.public void setEndOrientation(Orientation value)
value - A member of the Orientation enumeration.public Anchoring getAnchoring()
Anchoring enumeration.public void setAnchoring(Anchoring value)
value - A member of the Anchoring enumeration.public boolean getIgnoreAnchoring()
getIgnoreAnchoring in interface RoutingOptionspublic boolean getSmartPolylineEnds()
public void setSmartPolylineEnds(boolean value)
value - public RouteHeuristics getRouteHeuristics()
RouteHeuristics object used to predict the route cost.public void setRouteHeuristics(RouteHeuristics value)
value - A RouteHeuristics object used to predict the route cost.public static RouteHeuristics getMaxAbs()
RouteHeuristics object.public static RouteHeuristics getDistSquare()
RouteHeuristics object.public static RouteHeuristics getDistance()
RouteHeuristics object.