Packagecom.yworks.yfiles.layout.router
Classpublic class ChannelEdgeRouter
InheritanceChannelEdgeRouter Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

This class represents an edge router. It combines two strategic steps of edge routing and executes them after each other. The first strategy is called path finder strategy and will route the edges, potentially with edge overlaps. The second strategy will then split overlapping edge segments inside their channels and distribute them according to the specific distribution strategy. For path finding strategies you can for example use com.yworks.yfiles.layout.router.ChannelEdgeRouter_OrthogonalShortestPathPathFinder or com.yworks.yfiles.layout.router.OrthogonalPatternEdgeRouter . By default the latter will be used. One possible implementation of an edge distribution strategy is com.yworks.yfiles.layout.router.OrthogonalSegmentDistributionStage, which is also used by default. Note: when exchanging only one of the strategies, make sure, that their algorithms will use the same (sub)set of graph objects. The strategies bound to this router by default will use key AFFECTED_EDGES to determine the affected edges.

See also

com.yworks.yfiles.layout.router.ChannelEdgeRouter_OrthogonalShortestPathPathFinder
com.yworks.yfiles.layout.router.OrthogonalPatternEdgeRouter
com.yworks.yfiles.layout.router.OrthogonalSegmentDistributionStage
AFFECTED_EDGES


Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  edgeDistributionStrategy : Layouter
Getter: Returns the currently used edge distribution strategy of this router.
ChannelEdgeRouter
  pathFinderStrategy : Layouter
Getter: Returns the currently used path finder strategy of this router.
ChannelEdgeRouter
Public Methods
 MethodDefined By
  
ChannelEdgeRouter(init:Boolean = true)
ChannelEdgeRouter
  
canLayout(graph:LayoutGraph):Boolean
[override]
ChannelEdgeRouter
  
doLayout(graph:LayoutGraph):void
[override]
ChannelEdgeRouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
ChannelEdgeRouter
 Inherited
hashCode():int
YObject
  
[static]
ChannelEdgeRouter
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
  
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero.
ChannelEdgeRouter
  
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero.
ChannelEdgeRouter
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
Initializes this object.
ChannelEdgeRouter
Public Constants
 ConstantDefined By
  AFFECTED_EDGES : Object = y.layout.router.ChannelEdgeRouter.AFFECTED_EDGES
[static] This field is used as the key to add a DataProvider to the graph, which specifies the edges, that are affected by the edge routing.
ChannelEdgeRouter
Property Detail
edgeDistributionStrategyproperty
edgeDistributionStrategy:Layouter

Getter: Returns the currently used edge distribution strategy of this router.

Setter: Sets the strategy with which overlapping edge segments will be distributed in their provided channel. Note: when exchanging only one of the strategies, make sure, that their algorithms will use the same (sub)set of graph objects. The strategies bound to this router by default will us key AFFECTED_EDGES to determine the affected edges.


Implementation
    public function get edgeDistributionStrategy():Layouter
    public function set edgeDistributionStrategy(value:Layouter):void

See also

pathFinderStrategyproperty 
pathFinderStrategy:Layouter

Getter: Returns the currently used path finder strategy of this router.

Setter: Sets the strategy for path finding. Path finding means routing the edges in a first approach. Note: when exchanging only one of the strategies, make sure, that their algorithms will use the same (sub)set of graph objects. The strategies bound to this router by default will us key AFFECTED_EDGES to determine the affected edges.


Implementation
    public function get pathFinderStrategy():Layouter
    public function set pathFinderStrategy(value:Layouter):void

See also

Constructor Detail
ChannelEdgeRouter()Constructor
public function ChannelEdgeRouter(init:Boolean = true)

Parameters
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
canLayout()method
override public function canLayout(graph:LayoutGraph):Boolean

Parameters

graph:LayoutGraph

Returns
Boolean
checkGroupNodeSize()method 
protected function checkGroupNodeSize(layout:GraphLayout, node:Object):void

This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero. It is called by the doLayout() method for each group node object in the input graph.

Parameters

layout:GraphLayout — a graph layout object.
 
node:Object — the group node object to test.


Throws
IllegalArgumentException — thrown if the width/height of the group node object is zero.

See also

checkNodeSize()method 
protected function checkNodeSize(layout:GraphLayout, node:Object):void

This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero. It is called by the doLayout() method for each node object in the input graph.

Parameters

layout:GraphLayout — a graph layout object.
 
node:Object — the node object to test.


Throws
IllegalArgumentException — thrown if the width/height of the node object is zero.

See also

doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Parameters

graph:LayoutGraph

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

Returns
Class
initChannelEdgeRouter()method 
protected final function initChannelEdgeRouter():void

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

See also

newChannelEdgeRouter()method 
public static function newChannelEdgeRouter():ChannelEdgeRouter

Returns
ChannelEdgeRouter
Constant Detail
AFFECTED_EDGESConstant
public static const AFFECTED_EDGES:Object = y.layout.router.ChannelEdgeRouter.AFFECTED_EDGES

This field is used as the key to add a DataProvider to the graph, which specifies the edges, that are affected by the edge routing.