de.cau.cs.kieler.kiml.ogdf
Class OgdfLayouter

java.lang.Object
  extended by de.cau.cs.kieler.kiml.ogdf.OgdfLayouter
Direct Known Subclasses:
CircularLayouter, DavidsonHarelLayouter, FMMMDetailLayouter, FMMMLayouter, PlanarizationLayouter, RadialTreeLayouter, SpringEmbedderFRLayouter, SugiyamaLayouter, TreeLayouter, UpwardPlanarizationLayouter

public abstract class OgdfLayouter
extends Object

The base wrapper class for all OGDF layouters.

Rating red

Field Summary
static String OPT_LABEL_EDGE_DISTANCE
          layout option identifier for label edge distance.
static String OPT_LABEL_MARGIN_DISTANCE
          layout option identifier for label margin distance.
 
Constructor Summary
OgdfLayouter()
           
 
Method Summary
protected  void applyLayout(KNode parentNode)
          Applies the layout result to the original graph.
 void doLayout(KNode layoutNode, IKielerProgressMonitor progressMonitor)
          Layouts the given graph.
abstract  Object getDefault(String optionId)
          Returns the default value for the given layout option.
protected  boolean isUmlGraph(KNode layoutNode)
          Determines whether the given graph should be layouted as UML graph.
protected  void layoutLabels(KNode layoutNode)
          Layout the edge labels.
protected  void postProcess(KNode layoutNode)
          Performs post-processing on the given node.
protected abstract  void prepareLayouter(KNode layoutNode)
          Sets the layout specific options and modules depending on the options defined in the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_LABEL_EDGE_DISTANCE

public static final String OPT_LABEL_EDGE_DISTANCE
layout option identifier for label edge distance.

See Also:
Constant Field Values

OPT_LABEL_MARGIN_DISTANCE

public static final String OPT_LABEL_MARGIN_DISTANCE
layout option identifier for label margin distance.

See Also:
Constant Field Values
Constructor Detail

OgdfLayouter

public OgdfLayouter()
Method Detail

doLayout

public void doLayout(KNode layoutNode,
                     IKielerProgressMonitor progressMonitor)
              throws KielerException
Layouts the given graph.

Parameters:
layoutNode - the node representing the graph
progressMonitor - the progress monitor
Throws:
KielerException - if the layout failed

prepareLayouter

protected abstract void prepareLayouter(KNode layoutNode)
Sets the layout specific options and modules depending on the options defined in the node.

Parameters:
layoutNode - the parent node

postProcess

protected void postProcess(KNode layoutNode)
Performs post-processing on the given node. The default implementation does nothing.

Parameters:
layoutNode - the parent node

layoutLabels

protected void layoutLabels(KNode layoutNode)
Layout the edge labels.

Parameters:
layoutNode - the parent layout node

getDefault

public abstract Object getDefault(String optionId)
Returns the default value for the given layout option.

Parameters:
optionId - a layout option identifier
Returns:
the corresponding default value, or null if the option is not known

isUmlGraph

protected boolean isUmlGraph(KNode layoutNode)
Determines whether the given graph should be layouted as UML graph.

Parameters:
layoutNode - a parent graph
Returns:
true if UML layout should be performed

applyLayout

protected void applyLayout(KNode parentNode)
Applies the layout result to the original graph.

Parameters:
parentNode - the parent node of the layout graph