Packagecom.yworks.yfiles.layout.router.polyline
Classpublic class PathSearchContext
InheritancePathSearchContext Inheritance YObject Inheritance Object

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 currentEdge).

See also

currentEdge


Public Properties
 PropertyDefined By
  combinedSourceCell : PartitionCell
[read-only] Returns an artificial partition cell with the size of the bounding box of all source cells of the currentEdge.
PathSearchContext
  combinedTargetCell : PartitionCell
[read-only] Returns an artificial partition cell with the size of the bounding box of all target cells of the currentEdge.
PathSearchContext
  configuration : PathSearchConfiguration
[read-only] Returns the configuration used for the path search.
PathSearchContext
  currentEdge : Edge
[read-only] Returns the edge that is routed.
PathSearchContext
  currentEdgeLayoutDescriptor : EdgeLayoutDescriptor
[read-only] Returns the edge layout descriptor for the currentEdge containing edge specific settings for the path search.
PathSearchContext
  edges : EdgeCursor
[read-only] The edges that are routed.
PathSearchContext
  pathSearch : PathSearch
[read-only] Returns the path search that uses this context.
PathSearchContext
  pathSearchResult : PathSearchResult
[read-only] Returns the results of the path search.
PathSearchContext
Public Methods
 MethodDefined By
  
PathSearchContext(pathSearch:PathSearch, configuration:PathSearchConfiguration, init:Boolean = true)
Creates a new instance.
PathSearchContext
  
Adds an additional source cell of the currentEdge if it is not already contained in the list of source cells.
PathSearchContext
  
Adds an additional target cell of the currentEdge if it is not already contained in the list of target cells.
PathSearchContext
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PathSearchContext
  
Returns the source cell with the given index in the list of all cells that are covered by the source node of the currentEdge.
PathSearchContext
  
Returns the target cell with the given index in the list of all cells that are covered by the target node of the currentEdge.
PathSearchContext
 Inherited
hashCode():int
YObject
  
Determines if the given cell is a source cell of the currentEdge.
PathSearchContext
  
Determines if the given cell is a target cell of the currentEdge.
PathSearchContext
  
[static] Creates a new instance.
PathSearchContext
  
Returns the number of all cells that are covered by the source node of the currentEdge.
PathSearchContext
  
Returns the number of all cells that are covered by the target node of the currentEdge.
PathSearchContext
Protected Methods
 MethodDefined By
  
Initializes this object.
PathSearchContext
  
setCurrentEdge(currentEdge:Edge):void
Specifies the edge that is routed.
PathSearchContext
  
setEdges(edges:EdgeList):void
Sets the list of edges that shall be routed.
PathSearchContext
Property Detail
combinedSourceCellproperty
combinedSourceCell:PartitionCell  [read-only]

Returns an artificial partition cell with the size of the bounding box of all source cells of the currentEdge.


Implementation
    public function get combinedSourceCell():PartitionCell

See also

combinedTargetCellproperty 
combinedTargetCell:PartitionCell  [read-only]

Returns an artificial partition cell with the size of the bounding box of all target cells of the currentEdge.


Implementation
    public function get combinedTargetCell():PartitionCell

See also

configurationproperty 
configuration:PathSearchConfiguration  [read-only]

Returns the configuration used for the path search.


Implementation
    public function get configuration():PathSearchConfiguration
currentEdgeproperty 
currentEdge:Edge  [read-only]

Returns the edge that is routed.

This edge is one of those in edges.


Implementation
    public function get currentEdge():Edge

See also

currentEdgeLayoutDescriptorproperty 
currentEdgeLayoutDescriptor:EdgeLayoutDescriptor  [read-only]

Returns the edge layout descriptor for the currentEdge containing edge specific settings for the path search.


Implementation
    public function get currentEdgeLayoutDescriptor():EdgeLayoutDescriptor

See also

edgesproperty 
edges:EdgeCursor  [read-only]

The edges that are routed.


Implementation
    public function get edges():EdgeCursor
pathSearchproperty 
pathSearch:PathSearch  [read-only]

Returns the path search that uses this context.


Implementation
    public function get pathSearch():PathSearch
pathSearchResultproperty 
pathSearchResult:PathSearchResult  [read-only]

Returns the results of the path search.


Implementation
    public function get pathSearchResult():PathSearchResult
Constructor Detail
PathSearchContext()Constructor
public function PathSearchContext(pathSearch:PathSearch, configuration:PathSearchConfiguration, init:Boolean = true)

Creates a new instance.

Parameters
pathSearch:PathSearch — The path search that uses this context.
 
configuration:PathSearchConfiguration — The configuration used for the path search.
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
addSourceCell()method
public function addSourceCell(cell:PartitionCell):void

Adds an additional source cell of the currentEdge if it is not already contained in the list of source cells.

Parameters

cell:PartitionCell — The new source cell to add.

See also

addTargetCell()method 
public function addTargetCell(cell:PartitionCell):void

Adds an additional target cell of the currentEdge if it is not already contained in the list of target cells.

Parameters

cell:PartitionCell — the new target cell to add

See also

getClass()method 
override public function getClass():Class

Returns
Class
getSourceCell()method 
public function getSourceCell(index:int):PartitionCell

Returns the source cell with the given index in the list of all cells that are covered by the source node of the currentEdge.

Parameters

index:int

Returns
PartitionCell — the source cell with the given index in the list of all cells that are covered by the source node of the currentEdge.

See also

getTargetCell()method 
public function getTargetCell(index:int):PartitionCell

Returns the target cell with the given index in the list of all cells that are covered by the target node of the currentEdge.

Parameters

index:int

Returns
PartitionCell — the target cell with the given index in the list of all cells that are covered by the target node of the currentEdge.

See also

initPathSearchContext()method 
protected final function initPathSearchContext(pathSearch:PathSearch, configuration:PathSearchConfiguration):void

Initializes this object. See the documentation of the corresponding factory method newPathSearchContext() for details.

Parameters

pathSearch:PathSearch
 
configuration:PathSearchConfiguration

See also

isSourceCell()method 
public function isSourceCell(cell:PartitionCell):Boolean

Determines if the given cell is a source cell of the currentEdge.

Parameters

cell:PartitionCell — The cell to be tested.

Returns
Booleantrue if the given cell is in the list of source cells, false otherwise.

See also

isTargetCell()method 
public function isTargetCell(cell:PartitionCell):Boolean

Determines if the given cell is a target cell of the currentEdge.

Parameters

cell:PartitionCell — The cell to be tested.

Returns
Booleantrue if the given cell is in the list of target cells, false otherwise.

See also

newPathSearchContext()method 
public static function newPathSearchContext(pathSearch:PathSearch, configuration:PathSearchConfiguration):PathSearchContext

Creates a new instance.

Parameters

pathSearch:PathSearch — The path search that uses this context.
 
configuration:PathSearchConfiguration — The configuration used for the path search.

Returns
PathSearchContext
setCurrentEdge()method 
protected function setCurrentEdge(currentEdge:Edge):void

Specifies the edge that is routed.

Parameters

currentEdge:Edge — The edge that shall be routed.

setEdges()method 
protected function setEdges(edges:EdgeList):void

Sets the list of edges that shall be routed.

Parameters

edges:EdgeList — The list of edges that shall be routed.

sourceCellCount()method 
public function sourceCellCount():int

Returns the number of all cells that are covered by the source node of the currentEdge.

Returns
int — the number of all cells that are covered by the source node of the currentEdge

See also

targetCellCount()method 
public function targetCellCount():int

Returns the number of all cells that are covered by the target node of the currentEdge.

Returns
int — the number of all cells that are covered by the target node of the currentEdge

See also