Packagecom.yworks.yfiles.layout
Classpublic class Swimlanes
InheritanceSwimlanes Inheritance YObject Inheritance Object

Helper class for swimlanes.



Public Methods
 MethodDefined By
  
Swimlanes(init:Boolean = true)
Swimlanes
  
arrangeSwimlanes(graph:Graph, node2Swimlane:DataProvider):void
[static] Calculates an ordering of the swim lanes such that: 1) the number of swim lanes traversed by edges is reduced.
Swimlanes
  
arrangeSwimlanes2(graph:Graph, node2Swimlane:DataProvider, iterations:int, mode:int):void
[static] Calculates an ordering of the swim lanes such that: 1) the number of swim lanes traversed by edges is reduced.
Swimlanes
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
Swimlanes
 Inherited
hashCode():int
YObject
  
[static]
Swimlanes
Protected Methods
 MethodDefined By
  
Swimlanes
Public Constants
 ConstantDefined By
  MODE_IGNORE_GROUPS : int = 0
[static] Swim lane ordering mode specifier.
Swimlanes
  MODE_MIXED : int = 2
[static] Swim lane ordering mode specifier.
Swimlanes
  MODE_ONLY_GROUPS : int = 1
[static] Swim lane ordering mode specifier.
Swimlanes
Constructor Detail
Swimlanes()Constructor
public function Swimlanes(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
arrangeSwimlanes()method
public static function arrangeSwimlanes(graph:Graph, node2Swimlane:DataProvider):void

Calculates an ordering of the swim lanes such that:

1) the number of swim lanes traversed by edges is reduced. 2) the number of swim lanes spanned by group nodes (see com.yworks.yfiles.layout.grouping.GraphGrouping) is reduced. (Note, that a group node can span a swim lane without having a descendant in it.)

Parameters

graph:Graph — the input graph.
 
node2Swimlane:DataProvider — a DataProvider assigning an object of class com.yworks.yfiles.layout.Swimlanes_SwimlaneRepresentant to each node in the graph. Two nodes v,w are in the same swim lane if they are assigned to the same swim lane representative. After calling this method, method com.yworks.yfiles.layout.Swimlanes_SwimlaneRepresentant.swimlanePos returns for each swim lane representative an integer value (>= 0) denoting the optimized position of the associated swim lane.

See also

arrangeSwimlanes2()method 
public static function arrangeSwimlanes2(graph:Graph, node2Swimlane:DataProvider, iterations:int, mode:int):void

Calculates an ordering of the swim lanes such that:

1) the number of swim lanes traversed by edges is reduced. 2) the number of swim lanes spanned by group nodes (see com.yworks.yfiles.layout.grouping.GraphGrouping) is reduced. (Note, that a group node can span a swim lane without having a descendant in it.)

Parameters

graph:Graph — the input graph.
 
node2Swimlane:DataProvider — a DataProvider assigning an object of class com.yworks.yfiles.layout.Swimlanes_SwimlaneRepresentant to each node in the graph. Two nodes v,w are in the same swim lane if they are assigned to the same swim lane representative. After calling this method, method com.yworks.yfiles.layout.Swimlanes_SwimlaneRepresentant.swimlanePos returns for each swim lane representative an integer value (>= 0) denoting the optimized position of the associated swim lane.
 
iterations:int — the number of iterations performed by the heuristic. The default value is 5.
 
mode:int — swim lane ordering mode specifier. Possible values are MODE_MIXED (default), MODE_ONLY_GROUPS and MODE_IGNORE_GROUPS.

See also

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

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

newSwimlanes()method 
public static function newSwimlanes():Swimlanes

Returns
Swimlanes
Constant Detail
MODE_IGNORE_GROUPSConstant
public static const MODE_IGNORE_GROUPS:int = 0

Swim lane ordering mode specifier. Specifies that node grouping is ignored during the swim lane ordering optimization.

See also

MODE_MIXEDConstant 
public static const MODE_MIXED:int = 2

Swim lane ordering mode specifier. Specifies that both node grouping and edge length are considered during the swim lane ordering optimization.

See also

MODE_ONLY_GROUPSConstant 
public static const MODE_ONLY_GROUPS:int = 1

Swim lane ordering mode specifier. Specifies that only node grouping is considered during the swim lane ordering optimization.

See also