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 algorithm 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. If an exception occurs, getLastLayoutProvider() can be used to get more information about the algorithm that caused the exception.

Rating yellow
(2011-03-14) reviewed by cmot, cds

Constructor Summary
RecursiveLayouterEngine(IDebugCanvas thedebugCanvas)
          Creates a recursive layouter engine with the given debug canvas.
 
Method Summary
 AbstractLayoutProvider getLastLayoutProvider()
          Returns the last layout provider that was used by the layouter engine.
 void layout(KNode layoutGraph, IKielerProgressMonitor progressMonitor)
          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(IDebugCanvas thedebugCanvas)
Creates a recursive layouter engine with the given debug canvas.

Parameters:
thedebugCanvas - the debug canvas to use
Method Detail

layout

public void layout(KNode layoutGraph,
                   IKielerProgressMonitor progressMonitor)
Performs recursive layout on the given layout graph. Layout is not only performed for the selected node, but also for its ancestors, if there are any.

Parameters:
layoutGraph - instance of a layout graph
progressMonitor - monitor to which progress of the layout algorithms is reported

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