Package | com.yworks.yfiles.layout.router |
Class | public class OrganicEdgeRouter |
Inheritance | OrganicEdgeRouter YObject Object |
Implements | LayoutStage |
See also
Property | Defined By | ||
---|---|---|---|
coreLayouter : Layouter
Specifies the core layouter. | OrganicEdgeRouter | ||
edgeNodeOverlapAllowed : Boolean
Specifies whether or not edge-node overlaps are allowed. | OrganicEdgeRouter | ||
minimalDistance : Number
Getter:
Returns the minimal distance between nodes and non-incident edges. | OrganicEdgeRouter | ||
routingAll : Boolean
Specifies whether edges should be rerouted even if they do not obey all constraints initially. | OrganicEdgeRouter | ||
usingBends : Boolean
Specifies whether given bend coordinates are taken into account when determining initial bend positions. | OrganicEdgeRouter |
Method | Defined By | ||
---|---|---|---|
OrganicEdgeRouter(init:Boolean = true)
Creates a new instance of OrganicEdgeRouter with an initial minimal distance of 10. | OrganicEdgeRouter | ||
canLayout(graph:LayoutGraph):Boolean | OrganicEdgeRouter | ||
Returns a layout stage which can be used to ensure that the nodes do not overlap. | OrganicEdgeRouter | ||
doLayout(graph:LayoutGraph):void | OrganicEdgeRouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | OrganicEdgeRouter | ||
hashCode():int | YObject | ||
[static]
Creates a new instance of OrganicEdgeRouter with an initial minimal distance of 10. | OrganicEdgeRouter | ||
newOrganicEdgeRouter2(minNodeDistance:Number):OrganicEdgeRouter [static]
Creates a new instance of OrganicEdgeRouter using the given initial minimal distance
| OrganicEdgeRouter |
Method | Defined By | ||
---|---|---|---|
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. | OrganicEdgeRouter | ||
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. | OrganicEdgeRouter | ||
initOrganicEdgeRouter1():void
Initializes this object. | OrganicEdgeRouter | ||
initOrganicEdgeRouter2(minNodeDistance:Number):void
Initializes this object. | OrganicEdgeRouter |
Constant | Defined By | ||
---|---|---|---|
ROUTE_EDGE_DPKEY : Object = y.layout.router.OrganicEdgeRouter.ROUTE_EDGE_DPKEY [static]
Use this key to provide the algorithm with boolean values for each edge, specifying the ones which should be rerouted. | OrganicEdgeRouter |
coreLayouter | property |
coreLayouter:Layouter
Specifies the core layouter.
public function get coreLayouter():Layouter
public function set coreLayouter(value:Layouter):void
edgeNodeOverlapAllowed | property |
edgeNodeOverlapAllowed:Boolean
Specifies whether or not edge-node overlaps are allowed. Enabling this option often leads to better results if the createNodeEnlargementStage() LayoutStage is not used (e.g. because the nodes are not allowed to move) and the distances between some nodes are small. However enabling this option may produce edge-node overlaps. Furthermore, the minimal distance (set with minimalDistance cannot always be maintained in that case.
public function get edgeNodeOverlapAllowed():Boolean
public function set edgeNodeOverlapAllowed(value:Boolean):void
See also
minimalDistance | property |
minimalDistance:Number
Getter: Returns the minimal distance between nodes and non-incident edges.
Setter: Specifies the minimal distance the algorithm should guarantee between nodes and non-incident edges. Values should be larger than 10. public function get minimalDistance():Number
public function set minimalDistance(value:Number):void
routingAll | property |
routingAll:Boolean
Specifies whether edges should be rerouted even if they do not obey all constraints initially.
This flag is initially set to false
so that if edges that do not intersect with other nodes will not be rerouted by this algorithm.
public function get routingAll():Boolean
public function set routingAll(value:Boolean):void
usingBends | property |
usingBends:Boolean
Specifies whether given bend coordinates are taken into account when determining initial bend positions.
public function get usingBends():Boolean
public function set usingBends(value:Boolean):void
OrganicEdgeRouter | () | Constructor |
public function OrganicEdgeRouter(init:Boolean = true)
Creates a new instance of OrganicEdgeRouter with an initial minimal distance of 10
.
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.
|
canLayout | () | method |
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.
|
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.
|
IllegalArgumentException — thrown if the width/height of the node object is zero.
|
See also
createNodeEnlargementStage | () | method |
public function createNodeEnlargementStage():LayoutStage
Returns a layout stage which can be used to ensure that the nodes do not overlap. Note that overlapping nodes may lead to bad routing results. The following example demonstrates how to use this stage (router denotes an instance of OrganicEdgeRouter):
CompositeLayoutStage cls = new CompositeLayoutStage(); cls.appendStage(router.createNodeEnlargementStage()); cls.appendStage(new RemoveOverlapsLayoutStage(0)); OrganicEdgeRouter oer = new OrganicEdgeRouter(); oer.setCoreLayouter(cls); oer.doLayout(graph);Returns
LayoutStage |
doLayout | () | method |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initOrganicEdgeRouter1 | () | method |
protected final function initOrganicEdgeRouter1():void
Initializes this object. See the documentation of the corresponding factory method newOrganicEdgeRouter1()
for details.
See also
initOrganicEdgeRouter2 | () | method |
protected final function initOrganicEdgeRouter2(minNodeDistance:Number):void
Initializes this object. See the documentation of the corresponding factory method newOrganicEdgeRouter2()
for details.
Parameters
minNodeDistance:Number |
See also
newOrganicEdgeRouter1 | () | method |
public static function newOrganicEdgeRouter1():OrganicEdgeRouter
Creates a new instance of OrganicEdgeRouter with an initial minimal distance of 10
.
OrganicEdgeRouter |
newOrganicEdgeRouter2 | () | method |
public static function newOrganicEdgeRouter2(minNodeDistance:Number):OrganicEdgeRouter
Creates a new instance of OrganicEdgeRouter using the given initial minimal distance
Parameters
minNodeDistance:Number |
OrganicEdgeRouter |
ROUTE_EDGE_DPKEY | Constant |
public static const ROUTE_EDGE_DPKEY:Object = y.layout.router.OrganicEdgeRouter.ROUTE_EDGE_DPKEY
Use this key to provide the algorithm with boolean values for each edge, specifying the ones which should be rerouted.