|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.router.polyline.PathSearchContext
public class PathSearchContext
Provides context information that is useful for the path search algorithm.
Most notably, the context provides access to the edge that is currently being routed (see getCurrentEdge()
).
Constructor Summary | |
---|---|
protected |
PathSearchContext(PathSearch pathSearch,
PathSearchConfiguration configuration)
Creates a new instance. |
Method Summary | |
---|---|
void |
addSourceCell(PartitionCell cell)
Adds an additional source cell of the getCurrentEdge() if it is not already contained in the list of
source cells. |
void |
addTargetCell(PartitionCell cell)
Adds an additional target cell of the getCurrentEdge() if it is not already contained in the list of
target cells. |
PartitionCell |
getCombinedSourceCell()
Returns an artificial partition cell with the size of the bounding box of all source cells of the getCurrentEdge() . |
PartitionCell |
getCombinedTargetCell()
Returns an artificial partition cell with the size of the bounding box of all target cells of the getCurrentEdge() . |
PathSearchConfiguration |
getConfiguration()
Returns the configuration used for the path search. |
Edge |
getCurrentEdge()
Returns the edge that is routed. |
EdgeLayoutDescriptor |
getCurrentEdgeLayoutDescriptor()
Returns the edge layout descriptor for the getCurrentEdge() containing edge specific settings for the path
search. |
EdgeCursor |
getEdges()
The edges that are routed. |
PathSearch |
getPathSearch()
Returns the path search that uses this context. |
PathSearchResult |
getPathSearchResult()
Returns the results of the path search. |
PartitionCell |
getSourceCell(int index)
Returns the source cell with the given index in the list of all cells that are covered by the source node of the getCurrentEdge() . |
PartitionCell |
getTargetCell(int index)
Returns the target cell with the given index in the list of all cells that are covered by the target node of the getCurrentEdge() . |
boolean |
isSourceCell(PartitionCell cell)
Determines if the given cell is a source cell of the getCurrentEdge() . |
boolean |
isTargetCell(PartitionCell cell)
Determines if the given cell is a target cell of the getCurrentEdge() . |
protected void |
setCurrentEdge(Edge currentEdge)
Specifies the edge that is routed. |
protected void |
setEdges(EdgeList edges)
Sets the list of edges that shall be routed. |
int |
sourceCellCount()
Returns the number of all cells that are covered by the source node of the getCurrentEdge() . |
int |
targetCellCount()
Returns the number of all cells that are covered by the target node of the getCurrentEdge() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PathSearchContext(PathSearch pathSearch, PathSearchConfiguration configuration)
pathSearch
- The path search that uses this context.configuration
- The configuration used for the path search.Method Detail |
---|
public PathSearch getPathSearch()
public PathSearchConfiguration getConfiguration()
public EdgeCursor getEdges()
protected void setEdges(EdgeList edges)
edges
- The list of edges that shall be routed.public Edge getCurrentEdge()
This edge is one of those in getEdges()
.
protected void setCurrentEdge(Edge currentEdge)
currentEdge
- The edge that shall be routed.public EdgeLayoutDescriptor getCurrentEdgeLayoutDescriptor()
getCurrentEdge()
containing edge specific settings for the path
search.
public int sourceCellCount()
getCurrentEdge()
.
getCurrentEdge()
public void addSourceCell(PartitionCell cell)
getCurrentEdge()
if it is not already contained in the list of
source cells.
cell
- The new source cell to add.sourceCellCount()
,
getSourceCell(int)
public PartitionCell getSourceCell(int index)
getCurrentEdge()
.
getCurrentEdge()
.public boolean isSourceCell(PartitionCell cell)
getCurrentEdge()
.
cell
- The cell to be tested.
true
if the given cell is in the list of source cells, false
otherwise.sourceCellCount()
,
getSourceCell(int)
public PartitionCell getCombinedSourceCell()
getCurrentEdge()
.
getCurrentEdge()
public int targetCellCount()
getCurrentEdge()
.
getCurrentEdge()
public void addTargetCell(PartitionCell cell)
getCurrentEdge()
if it is not already contained in the list of
target cells.
cell
- the new target cell to addtargetCellCount()
,
getTargetCell(int)
public PartitionCell getTargetCell(int index)
getCurrentEdge()
.
getCurrentEdge()
.public boolean isTargetCell(PartitionCell cell)
getCurrentEdge()
.
cell
- The cell to be tested.
true
if the given cell is in the list of target cells, false
otherwise.targetCellCount()
,
getTargetCell(int)
public PartitionCell getCombinedTargetCell()
getCurrentEdge()
.
getCurrentEdge()
public PathSearchResult getPathSearchResult()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |