public class PatternRouter extends java.lang.Object implements LinkRouter
| Constructor and Description |
|---|
PatternRouter()
Initializes a new instance of the PatternRouter class.
|
PatternRouter(Diagram diagram)
Initializes a new instance of the PatternRouter class.
|
PatternRouter(Diagram diagram,
java.util.List<RoutePattern> patterns)
Initializes a new instance of the PatternRouter class.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getBendPenalty()
Gets the penalty weight for candidate route bends.
|
Diagram |
getDiagram()
Gets the Diagram whose links will be routed.
|
float |
getLengthPenalty()
Gets the penalty weight for candidate route length.
|
boolean |
getMinimizeCrossings()
Gets a value indicating whether to minimize crossings with other links.
|
float |
getMinimumDistance()
Gets the minimum allowed distance from obstacles for a route to be accepted.
|
DiagramNodeList |
getObstacles()
Gets a list of obstacle nodes.
|
java.util.List<RoutePattern> |
getPatterns()
Gets a list of RoutePattern objects representing the routing patterns.
|
float |
getPreferredDistance()
Gets the preferred distance from link's bend points to the link's nodes.
|
float |
getVicinityPenalty()
Gets the penalty weight for passing through obstacle node vicinity.
|
boolean |
routeLink(DiagramLink link,
ConnectionPoint originConnection,
ConnectionPoint destinationConnection,
boolean nowCreating)
Implements LinkRouter.routeLink.
|
DiagramLinkList |
routeLinks(DiagramLinkList links)
Implements LinkRouter.routeLinks.
|
void |
setBendPenalty(float value)
Sets the penalty weight for candidate route bends.
|
void |
setDiagram(Diagram value)
Sets the Diagram whose links will be routed.
|
void |
setLengthPenalty(float value)
Sets the penalty weight for candidate route length.
|
void |
setMinimizeCrossings(boolean value)
Sets a value indicating whether to minimize crossings with other links.
|
void |
setMinimumDistance(float value)
Sets the minimum allowed distance from obstacles for a route to be accepted.
|
void |
setObstacles(DiagramNodeList value)
Sets a list of obstacle nodes.
|
void |
setPatterns(java.util.List<RoutePattern> value)
Sets a list of RoutePattern objects representing the routing patterns.
|
void |
setPreferredDistance(float value)
Sets the preferred distance from link's bend points to the link's nodes.
|
void |
setVicinityPenalty(float value)
Sets the penalty weight for passing through obstacle node vicinity.
|
public PatternRouter()
public PatternRouter(Diagram diagram)
diagram - The Diagram whose links will be routed.public PatternRouter(Diagram diagram, java.util.List<RoutePattern> patterns)
diagram - The Diagram whose links will be routed.patterns - A list of RoutePattern objects.public boolean routeLink(DiagramLink link, ConnectionPoint originConnection, ConnectionPoint destinationConnection, boolean nowCreating)
routeLink in interface LinkRouterlink - The DiagramLink to route.originConnection - Represents connection to Origin node, potentially
different from link's stored connection when modifying first control point.destinationConnection - Represents connection to Destination node, potentially
different from link's stored connection when modifying last control point.nowCreating - Indicates whether link is currently being created.public DiagramLinkList routeLinks(DiagramLinkList links)
routeLinks in interface LinkRouterlinks - A list of DiagramLink objects that should be routed.public Diagram getDiagram()
public void setDiagram(Diagram value)
setDiagram in interface LinkRoutervalue - A Diagram instance.public DiagramNodeList getObstacles()
public void setObstacles(DiagramNodeList value)
value - A DiagramNodeList instance.public java.util.List<RoutePattern> getPatterns()
public void setPatterns(java.util.List<RoutePattern> value)
value - A Listpublic float getMinimumDistance()
public void setMinimumDistance(float value)
value - A float value specifying minimum distance.public float getPreferredDistance()
public void setPreferredDistance(float value)
value - A float value specifying preferred distance.public boolean getMinimizeCrossings()
public void setMinimizeCrossings(boolean value)
public float getLengthPenalty()
public void setLengthPenalty(float value)
value - A float value.public float getBendPenalty()
public void setBendPenalty(float value)
value - A float value.public float getVicinityPenalty()
public void setVicinityPenalty(float value)
value - A float value.