Search this API

y.layout
Class Swimlanes

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

public class Swimlanes
extends java.lang.Object

Swimlanes provides helper classes and methods to handle swimlanes. It is used by IncrementalHierarchicLayouter to arrange the nodes in lanes.

 

Nested Class Summary
static class Swimlanes.SwimlaneRepresentant
          A SwimlaneRepresentant represents the position and arrangement mode for a swimlane.
 
Field Summary
static byte MODE_IGNORE_GROUPS
          Swimlane ordering mode specifier defining that node grouping is ignored during the swimlane ordering optimization.
static byte MODE_MIXED
          Swimlane ordering mode specifier defining that both node grouping and edge length are considered during the swimlane ordering optimization.
static byte MODE_ONLY_GROUPS
          Swimlane ordering mode specifier defining that only node grouping is considered during the swimlane ordering optimization.
 
Method Summary
static void arrangeSwimlanes(Graph graph, DataProvider node2Swimlane)
          Calculates an ordering of the swimlanes.
static void arrangeSwimlanes(Graph graph, DataProvider node2Swimlane, int iterations, int mode)
          Calculates an ordering of the swimlanes considering the specified ordering mode.
 
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
Swimlane ordering mode specifier defining that node grouping is ignored during the swimlane ordering optimization.

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

MODE_ONLY_GROUPS

public static final byte MODE_ONLY_GROUPS
Swimlane ordering mode specifier defining that only node grouping is considered during the swimlane ordering optimization.

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

MODE_MIXED

public static final byte MODE_MIXED
Swimlane ordering mode specifier defining that both node grouping and edge length are considered during the swimlane ordering optimization.

See Also:
arrangeSwimlanes(Graph,DataProvider,int,int), Constant Field Values
Method Detail

arrangeSwimlanes

public static void arrangeSwimlanes(Graph graph,
                                    DataProvider node2Swimlane)
Calculates an ordering of the swimlanes. The ordering will try to reduce:
  1. the number of swimlanes traversed by edges
  2. the number of swimlanes spanned by group nodes

 
A group node can span a swimlane without having a descendant in it.
Parameters:
graph - the input graph
node2Swimlane - the assignment of nodes to swimlanes
See Also:
Swimlanes.SwimlaneRepresentant, Grouping

arrangeSwimlanes

public static void arrangeSwimlanes(Graph graph,
                                    DataProvider node2Swimlane,
                                    int iterations,
                                    int mode)
Calculates an ordering of the swimlanes considering the specified ordering mode. Depending on the swimlane mode, the ordering will try to reduce:
  1. the number of swimlanes traversed by edges
  2. the number of swimlanes spanned by group nodes

 
A group node can span a swimlane without having a descendant in it.
Parameters:
graph - the input graph
node2Swimlane - the assignment of nodes to swimlanes
iterations - the number of iterations performed by the heuristic.
mode - one of the valid swimlane ordering mode specifier
See Also:
Swimlanes.SwimlaneRepresentant, Grouping

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