Packagecom.yworks.yfiles.layout.router
Classpublic class StraightLineEdgeRouter
InheritanceStraightLineEdgeRouter Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object
Subclasses PartialLayouter_StraightLineEdgeRouter

Simple edge router implementation that draws edges straight-line considering the specified port constraints.



Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  selectedEdgesDpKey : Object
Specifies the data provider key used to look up the selected state of the edges of the graph to be laid out.
StraightLineEdgeRouter
  selectedNodesDpKey : Object
Specifies the data provider key used to look up the selected state of the nodes of the graph to be laid out.
StraightLineEdgeRouter
  sphereOfAction : int
Specifies the edge (sub-)set to be routed.
StraightLineEdgeRouter
Public Methods
 MethodDefined By
  
StraightLineEdgeRouter(init:Boolean = true)
Creates a new StraightLineEdgeRouter.
StraightLineEdgeRouter
  
canLayout(graph:LayoutGraph):Boolean
[override]
StraightLineEdgeRouter
  
doLayout(graph:LayoutGraph):void
[override]
StraightLineEdgeRouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
StraightLineEdgeRouter
 Inherited
hashCode():int
YObject
  
[static] Creates a new StraightLineEdgeRouter.
StraightLineEdgeRouter
  
[static] Creates a new StraightLineEdgeRouter that uses the given layouter instance as core layouter.
StraightLineEdgeRouter
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
Initializes this object.
StraightLineEdgeRouter
  
Initializes this object.
StraightLineEdgeRouter
Public Constants
 ConstantDefined By
  ROUTE_ALL_EDGES : int = 0
[static] Sphere of action specifier.
StraightLineEdgeRouter
  ROUTE_EDGES_AT_SELECTED_NODES : int = 4
[static] Sphere of action specifier.
StraightLineEdgeRouter
  ROUTE_SELECTED_EDGES : int = 2
[static] Sphere of action specifier.
StraightLineEdgeRouter
Property Detail
selectedEdgesDpKeyproperty
selectedEdgesDpKey:Object

Specifies the data provider key used to look up the selected state of the edges of the graph to be laid out. By default, com.yworks.yfiles.layout.LayouterKeys.SELECTED_EDGES is used.

If the sphere of action is set to ROUTE_SELECTED_EDGES, only the selected keys are routed while all other edges are considered to have fixed routes.


Implementation
    public function get selectedEdgesDpKey():Object
    public function set selectedEdgesDpKey(value:Object):void

Throws
IllegalArgumentException — if the specified key is null.

See also

selectedNodesDpKeyproperty 
selectedNodesDpKey:Object

Specifies the data provider key used to look up the selected state of the nodes of the graph to be laid out. By default, com.yworks.yfiles.layout.LayouterKeys.SELECTED_NODES is used.

If the sphere of action is set to ROUTE_EDGES_AT_SELECTED_NODES, only edges of selected nodes are routed while all other edges are considered to have fixed routes.


Implementation
    public function get selectedNodesDpKey():Object
    public function set selectedNodesDpKey(value:Object):void

Throws
IllegalArgumentException — if the specified key is null.

See also

sphereOfActionproperty 
sphereOfAction:int

Specifies the edge (sub-)set to be routed. Defaults to ROUTE_ALL_EDGES.


Implementation
    public function get sphereOfAction():int
    public function set sphereOfAction(value:int):void

Throws
IllegalArgumentException — if the given argument is not one of the above constants.

See also

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

Creates a new StraightLineEdgeRouter.

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
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Parameters

graph:LayoutGraph

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

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

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

See also

initStraightLineEdgeRouter2()method 
protected final function initStraightLineEdgeRouter2(core:Layouter):void

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

Parameters

core:Layouter

See also

newStraightLineEdgeRouter1()method 
public static function newStraightLineEdgeRouter1():StraightLineEdgeRouter

Creates a new StraightLineEdgeRouter.

Returns
StraightLineEdgeRouter
newStraightLineEdgeRouter2()method 
public static function newStraightLineEdgeRouter2(core:Layouter):StraightLineEdgeRouter

Creates a new StraightLineEdgeRouter that uses the given layouter instance as core layouter.

Parameters

core:Layouter — a layouter instance that is used as core layouter.

Returns
StraightLineEdgeRouter
Constant Detail
ROUTE_ALL_EDGESConstant
public static const ROUTE_ALL_EDGES:int = 0

Sphere of action specifier. Route all edges of the input graph.

See also

ROUTE_EDGES_AT_SELECTED_NODESConstant 
public static const ROUTE_EDGES_AT_SELECTED_NODES:int = 4

Sphere of action specifier. Route only edges connected to selected nodes. The selection state of a node is determined by a boolean value returned by the data provider associated with the data provider key selectedNodesDpKey.

See also

ROUTE_SELECTED_EDGESConstant 
public static const ROUTE_SELECTED_EDGES:int = 2

Sphere of action specifier. Route only selected edges of the input graph. The selection state of an edge is determined by a boolean value returned by the data provider associated with the data provider key selectedEdgesDpKey.

See also