de.cau.cs.kieler.kiml.ui.layouter
Class Draw2DLayoutProvider

java.lang.Object
  extended by de.cau.cs.kieler.kiml.AbstractLayoutProvider
      extended by de.cau.cs.kieler.kiml.ui.layouter.Draw2DLayoutProvider

public class Draw2DLayoutProvider
extends AbstractLayoutProvider

Layout provider that uses the layout algorithm shipped with Draw2D. Either the default version or the Compound version of the algorithm can be applied. TODO implement compound graph layout using CompoundDirectedGraphLayout

Rating proposed yellow
(2009-12-11) msp

Field Summary
static String PARAM_COMPOUND
          parameter value for the compound version of the layout algorithm.
 
Constructor Summary
Draw2DLayoutProvider()
           
 
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)
          Initialize the layout provider with the given parameter.
 
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
 

Field Detail

PARAM_COMPOUND

public static final String PARAM_COMPOUND
parameter value for the compound version of the layout algorithm.

See Also:
Constant Field Values
Constructor Detail

Draw2DLayoutProvider

public Draw2DLayoutProvider()
Method Detail

initialize

public void initialize(String parameter)
Initialize the layout provider with the given parameter. The default implementation does nothing.

Overrides:
initialize in class AbstractLayoutProvider
Parameters:
parameter - a string used to parameterize the layout provider instance

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