de.cau.cs.kieler.kiml
Class RecursiveLayouterEngine

java.lang.Object
  extended by de.cau.cs.kieler.kiml.RecursiveLayouterEngine

public class RecursiveLayouterEngine
extends Object

Performs layout in a graph with hierarchy by executing a layout provider on each level of the hierarchy. This is done recursively from the leafs to the root of the nodes in the graph, using size information from lower levels in the levels above.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
RecursiveLayouterEngine()
           
 
Method Summary
 AbstractLayoutProvider getLastLayoutProvider()
          Returns the last layout provider that was used by the layouter engine.
 void layout(KNode layoutGraph, IKielerProgressMonitor progressMonitor, boolean layoutAncestors)
          Performs recursive layout on the given layout graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveLayouterEngine

public RecursiveLayouterEngine()
Method Detail

layout

public void layout(KNode layoutGraph,
                   IKielerProgressMonitor progressMonitor,
                   boolean layoutAncestors)
            throws KielerException
Performs recursive layout on the given layout graph.

Parameters:
layoutGraph - instance of a layout graph
progressMonitor - monitor to which progress of the layout algorithms is reported
layoutAncestors - if true, layout is not only performed for the selected node, but also for its ancestors
Throws:
KielerException - if a layout algorithm fails

getLastLayoutProvider

public AbstractLayoutProvider getLastLayoutProvider()
Returns the last layout provider that was used by the layouter engine. This can be used to check the source of error if an exception is caught during layout.

Returns:
the last used layout provider, or null if there is none