|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.RoutingOptions
public class RoutingOptions
An instance of this class accessible via the Diagram.getRoutingOptions()
method lets you customize the behavior of the link routing algorithm.
Method Summary | |
---|---|
int |
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. |
int |
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. |
int |
getStartOrientation()
Gets a value indicating whether routes should start in horizontal or vertical direction. |
int |
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(int 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(int 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(int value)
Sets a value indicating whether routes should start in horizontal or vertical direction. |
void |
setTriggerRerouting(int 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setDefaultMode()
public void setQuickMode()
public void setMinSegmentsMode()
public float getGridSize()
getGridSize
in interface RoutingOptions
public void setGridSize(float value)
setGridSize
in interface RoutingOptions
value
- 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 RoutingOptions
public 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 RoutingOptions
public 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 RoutingOptions
public 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 int getTriggerRerouting()
RerouteLinks
constants.public void setTriggerRerouting(int value)
value
- A bitwise combination of the RerouteLinks
constants.public int getStartOrientation()
Orientation
constants.public void setStartOrientation(int value)
value
- One of the Orientation
constants.public int getEndOrientation()
Orientation
constants.public void setEndOrientation(int value)
value
- One of the Orientation
constants.public int getAnchoring()
Anchoring
constants.public void setAnchoring(int value)
value
- One of the Anchoring
constants.public boolean getIgnoreAnchoring()
getIgnoreAnchoring
in interface RoutingOptions
public 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |