de.cau.cs.kieler.kiml.graphviz.layouter
Class GraphvizLayoutProvider

java.lang.Object
  extended by de.cau.cs.kieler.core.properties.MapPropertyHolder
      extended by de.cau.cs.kieler.kiml.AbstractLayoutProvider
          extended by de.cau.cs.kieler.kiml.graphviz.layouter.GraphvizLayoutProvider
All Implemented Interfaces:
IPropertyHolder

public class GraphvizLayoutProvider
extends AbstractLayoutProvider

Layout provider for the Graphviz layout tool. The actual interface to Graphviz is implemented in GraphvizLayouter.

The actual Graphviz layout that is applied is determined by the parameter passed in the initialize(String) method. If no parameter is passed, the Dot layouter is applied as default.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
GraphvizLayoutProvider()
          Initialize default options for the layout provider.
 
Method Summary
 void doLayout(KNode layoutNode, IKielerProgressMonitor progressMonitor)
          Performs the actual layout process, that is attaches layout information to the given node object.
 void initialize(String parameter)
          Initializes the Graphviz layout provider with the given parameter string as command.
 boolean supportsHierarchy(KNode layoutNode)
          Determines whether this layout provider would handle the complete hierarchy of the given layout node.
 
Methods inherited from class de.cau.cs.kieler.kiml.AbstractLayoutProvider
getDebugCanvas, setDebugCanvas
 
Methods inherited from class de.cau.cs.kieler.core.properties.MapPropertyHolder
copyProperties, getAllProperties, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphvizLayoutProvider

public GraphvizLayoutProvider()
Initialize default options for the layout provider.

Method Detail

initialize

public void initialize(String parameter)
Initializes the Graphviz layout provider with the given parameter string as command.

Overrides:
initialize in class AbstractLayoutProvider
Parameters:
parameter - parameter string that is interpreted as Graphviz command

doLayout

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

Specified by:
doLayout in class AbstractLayoutProvider
Parameters:
layoutNode - the parent node which should be laid out
progressMonitor - progress monitor used to keep track of progress
Throws:
KielerException - if the method fails to perform layout

supportsHierarchy

public boolean supportsHierarchy(KNode layoutNode)
Determines whether this layout provider would handle the complete hierarchy of the given layout node. If it does, it is expected to layout not only the first hierarchy level of the input graph, but also all its children.

Overrides:
supportsHierarchy in class AbstractLayoutProvider
Parameters:
layoutNode - the parent node for which layout is requested
Returns:
true if the layout provider supports hierarchy