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

java.lang.Object
  extended by de.cau.cs.kieler.kiml.AbstractLayoutProvider
      extended by de.cau.cs.kieler.kiml.graphviz.layouter.GraphvizLayoutProvider

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()
           
 
Method Summary
 void doLayout(KNode layoutNode, IKielerProgressMonitor progressMonitor)
          Performs the actual layout process, that is attaches layout information to the given node object.
 Object getDefault(String optionId)
          Returns the default value for the given layout option.
 void initialize(String parameter)
          Initializes the Graphviz layout provider with the given parameter string as command.
 
Methods inherited from class de.cau.cs.kieler.kiml.AbstractLayoutProvider
supportsHierarchy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphvizLayoutProvider

public GraphvizLayoutProvider()
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

getDefault

public Object getDefault(String optionId)
Returns the default value for the given layout option. The default implementation always returns null.

Overrides:
getDefault in class AbstractLayoutProvider
Parameters:
optionId - identifier of a layout option
Returns:
the default value for the given option, or null if this layout provider does not know that option