Packagecom.yworks.yfiles.layout.router.polyline
Classpublic class PolylineLayoutStage
InheritancePolylineLayoutStage Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

Adds polyline segment to the orthogonal edge paths of a graph. The current implementation only adds octilinear segments to all orthogonal edges (non-orthogonal edges are completely ignored). Between two succeeding vertical and horizontal segments, an octilinear segment is added whose length can be influenced by the maximum non orthogonal segment ratio (maximumNonOrthogonalSegmentRatio) and the preferred polyline segment length (preferredPolylineSegmentLength) . The new octilinear segments keep a minimum distance (minimalNodeToEdgeDistance) between the edges and all nodes in the graph if possible.

See also

maximum non orthogonal segment ratio
preferred polyline segment length
minimum distance


Public Properties
 PropertyDefined By
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
  maximumNonOrthogonalSegmentRatio : Number
Specifies the maximum segment length ratio at each end of an orthogonal segment that may get converted into a (non-orthogonal) polyline segment.
PolylineLayoutStage
  minimalNodeToEdgeDistance : Number
Specifies the minimal distance between edges and node bounds.
PolylineLayoutStage
  preferredPolylineSegmentLength : Number
Specifies the preferred segment length for (non-orthogonal) polyline segments.
PolylineLayoutStage
  selectedEdgesDpKey : Object
Specifies the data provider key used to look up the selected state of the edges of the graph to be laid out.
PolylineLayoutStage
  selectedNodesDpKey : Object
Specifies the data provider key used to look up the selected state of the nodes of the graph to be laid out.
PolylineLayoutStage
  sphereOfAction : int
Determines the (sub-)set of edges to be routed polylinear.
PolylineLayoutStage
Public Methods
 MethodDefined By
  
PolylineLayoutStage(init:Boolean = true)
PolylineLayoutStage
  
canLayout(graph:LayoutGraph):Boolean
[override]
PolylineLayoutStage
  
doLayout(graph:LayoutGraph):void
[override]
PolylineLayoutStage
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PolylineLayoutStage
 Inherited
hashCode():int
YObject
  
[static]
PolylineLayoutStage
  
[static] Initializes this layout stage with the given core layouter.
PolylineLayoutStage
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.
PolylineLayoutStage
  
Initializes this object.
PolylineLayoutStage
Public Constants
 ConstantDefined By
  ROUTE_ALL_EDGES : int = 0
[static] Sphere of action specifier.
PolylineLayoutStage
  ROUTE_EDGES_AT_SELECTED_NODES : int = 4
[static] Sphere of action specifier.
PolylineLayoutStage
  ROUTE_SELECTED_EDGES : int = 2
[static] Sphere of action specifier.
PolylineLayoutStage
Property Detail
maximumNonOrthogonalSegmentRatioproperty
maximumNonOrthogonalSegmentRatio:Number

Specifies the maximum segment length ratio at each end of an orthogonal segment that may get converted into a (non-orthogonal) polyline segment. Default is 0.5.


Implementation
    public function get maximumNonOrthogonalSegmentRatio():Number
    public function set maximumNonOrthogonalSegmentRatio(value:Number):void

Throws
IllegalArgumentException — If the ratio is out of bounds.
minimalNodeToEdgeDistanceproperty 
minimalNodeToEdgeDistance:Number

Specifies the minimal distance between edges and node bounds. Default is 10.


Implementation
    public function get minimalNodeToEdgeDistance():Number
    public function set minimalNodeToEdgeDistance(value:Number):void

Throws
IllegalArgumentException — If distance is less than 0.
preferredPolylineSegmentLengthproperty 
preferredPolylineSegmentLength:Number

Specifies the preferred segment length for (non-orthogonal) polyline segments. Default is 50.


Implementation
    public function get preferredPolylineSegmentLength():Number
    public function set preferredPolylineSegmentLength(value:Number):void

Throws
IllegalArgumentException — If length is less than 0.
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

Determines the (sub-)set of edges to be routed polylinear. Default setting is 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
PolylineLayoutStage()Constructor
public function PolylineLayoutStage(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
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Parameters

graph:LayoutGraph

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

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

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

See also

initPolylineLayoutStage2()method 
protected final function initPolylineLayoutStage2(coreLayouter:Layouter):void

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

Parameters

coreLayouter:Layouter

See also

newPolylineLayoutStage1()method 
public static function newPolylineLayoutStage1():PolylineLayoutStage

Returns
PolylineLayoutStage
newPolylineLayoutStage2()method 
public static function newPolylineLayoutStage2(coreLayouter:Layouter):PolylineLayoutStage

Initializes this layout stage with the given core layouter.

Parameters

coreLayouter:Layouter — The core layouter to wrap with this layout stage.

Returns
PolylineLayoutStage
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