de.cau.cs.kieler.klay.layered
Class LayeredLayoutProvider

java.lang.Object
  extended by de.cau.cs.kieler.kiml.AbstractLayoutProvider
      extended by de.cau.cs.kieler.klay.layered.LayeredLayoutProvider

public class LayeredLayoutProvider
extends AbstractLayoutProvider

Layout provider to connect the layered layouter to the Eclipse based layout services.

The layered layouter works with five main phases: cycle breaking, layering, crossing minimization, node placement and edge routing. Before these phases and after the last phase, so called intermediate layout processors can be inserted that do some kind of pre or post processing. Implementations of the different main phases specify the intermediate layout processors they require, which are automatically collected and inserted between the main phases. The layout provider itself also specifies some dependencies.

           Intermediate Layout Processors
 ---------------------------------------------------
 |         |         |         |         |         |
 |   ---   |   ---   |   ---   |   ---   |   ---   |
 |   | |   |   | |   |   | |   |   | |   |   | |   |
 |   | |   |   | |   |   | |   |   | |   |   | |   |
     | |       | |       | |       | |       | |
     | |       | |       | |       | |       | |
     ---       ---       ---       ---       ---
   Phase 1   Phase 2   Phase 3   Phase 4   Phase 5
 

See Also:
ILayoutPhase, ILayoutProcessor
Rating red

Constructor Summary
LayeredLayoutProvider()
           
 
Method Summary
 void doLayout(KNode kgraph, IKielerProgressMonitor progressMonitor)
          Performs the actual layout process, that is attaches layout information to the given node object.
 void layout(LayeredGraph graph, IKielerProgressMonitor themonitor)
          Perform the five phases of the layered layouter.
 boolean supportsHierarchy(KNode layoutNode)
          Determines that the LayeredLayoutProvider handles complete hierarchy of the given layout node.
 
Methods inherited from class de.cau.cs.kieler.kiml.AbstractLayoutProvider
dispose, getDebugCanvas, initialize, setDebugCanvas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayeredLayoutProvider

public LayeredLayoutProvider()
Method Detail

doLayout

public void doLayout(KNode kgraph,
                     IKielerProgressMonitor progressMonitor)
Performs the actual layout process, that is attaches layout information to the given node object.

Specified by:
doLayout in class AbstractLayoutProvider
Parameters:
kgraph - the parent node which should be laid out
progressMonitor - progress monitor used to keep track of progress

layout

public void layout(LayeredGraph graph,
                   IKielerProgressMonitor themonitor)
Perform the five phases of the layered layouter.

Parameters:
graph - the graph that is to be laid out
themonitor - a progress monitor, or null

supportsHierarchy

public boolean supportsHierarchy(KNode layoutNode)
Determines that the LayeredLayoutProvider handles complete hierarchy of the given layout node.

Overrides:
supportsHierarchy in class AbstractLayoutProvider
Parameters:
layoutNode - the graph to be layouted.
Returns:
returns true in contrast to the default value.