Search this API

y.layout
Class Swimlanes

java.lang.Object
  extended by y.layout.Swimlanes

public class Swimlanes
extends Object

Helper class for swimlanes.


Nested Class Summary
static class Swimlanes.SwimlaneRepresentant
          Class that internally represents a swim lane.
 
Field Summary
static byte MODE_IGNORE_GROUPS
          Swim lane ordering mode specifier.
static byte MODE_MIXED
          Swim lane ordering mode specifier.
static byte MODE_ONLY_GROUPS
          Swim lane ordering mode specifier.
 
Constructor Summary
Swimlanes()
           
 
Method Summary
static void arrangeSwimlanes(Graph graph, DataProvider node2Swimlane)
          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 Grouping) is reduced.

static void arrangeSwimlanes(Graph graph, DataProvider node2Swimlane, int iterations, int mode)
          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 Grouping) is reduced.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_IGNORE_GROUPS

public static final byte MODE_IGNORE_GROUPS
Swim lane ordering mode specifier. Specifies that node grouping is ignored during the swim lane ordering optimization.

See Also:
arrangeSwimlanes(y.base.Graph, y.base.DataProvider, int, int), Constant Field Values

MODE_ONLY_GROUPS

public static final byte MODE_ONLY_GROUPS
Swim lane ordering mode specifier. Specifies that only node grouping is considered during the swim lane ordering optimization.

See Also:
arrangeSwimlanes(y.base.Graph,y.base.DataProvider,int,int), Constant Field Values

MODE_MIXED

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

See Also:
arrangeSwimlanes(y.base.Graph,y.base.DataProvider,int,int), Constant Field Values
Constructor Detail

Swimlanes

public Swimlanes()
Method Detail

arrangeSwimlanes

public static void arrangeSwimlanes(Graph graph,
                                    DataProvider node2Swimlane)
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 Grouping) is reduced. (Note, that a group node can span a swim lane without having a descendant in it.)

Parameters:
graph - the input graph.
node2Swimlane - a DataProvider assigning an object of class 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 Swimlanes.SwimlaneRepresentant.getSwimlanePos() returns for each swim lane representative an integer value (>= 0) denoting the optimized position of the associated swim lane.
See Also:
Swimlanes.SwimlaneRepresentant, Grouping

arrangeSwimlanes

public static void arrangeSwimlanes(Graph graph,
                                    DataProvider node2Swimlane,
                                    int iterations,
                                    int mode)
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 Grouping) is reduced. (Note, that a group node can span a swim lane without having a descendant in it.)

Parameters:
graph - the input graph.
node2Swimlane - a DataProvider assigning an object of class 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 Swimlanes.SwimlaneRepresentant.getSwimlanePos() returns for each swim lane representative an integer value (>= 0) denoting the optimized position of the associated swim lane.
iterations - the number of iterations performed by the heuristic. The default value is 5.
mode - swim lane ordering mode specifier. Possible values are MODE_MIXED (default), MODE_ONLY_GROUPS and MODE_IGNORE_GROUPS.
See Also:
Swimlanes.SwimlaneRepresentant, Grouping

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.