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, 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 float DEF_BORDER_SPACING
          default value for border spacing.
static float DEF_LABEL_EDGE_DIST
          default value for label edge distance.
static float DEF_LABEL_MARGIN_DIST
          default value for label margin distance.
static IProperty<Float> LABEL_EDGE_DIST
          label edge distance property.
static String LABEL_EDGE_DIST_ID
          layout option identifier for label edge distance.
static IProperty<Float> LABEL_MARGIN_DIST
          label margin distance property.
static String LABEL_MARGIN_DIST_ID
          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.
 void initDefaults(IPropertyHolder defaultsHolder)
          Initialize the default values for the layout provider.
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

DEF_BORDER_SPACING

public static final float DEF_BORDER_SPACING
default value for border spacing.

See Also:
Constant Field Values

LABEL_EDGE_DIST_ID

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

See Also:
Constant Field Values

DEF_LABEL_EDGE_DIST

public static final float DEF_LABEL_EDGE_DIST
default value for label edge distance.

See Also:
Constant Field Values

LABEL_EDGE_DIST

public static final IProperty<Float> LABEL_EDGE_DIST
label edge distance property.


LABEL_MARGIN_DIST_ID

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

See Also:
Constant Field Values

DEF_LABEL_MARGIN_DIST

public static final float DEF_LABEL_MARGIN_DIST
default value for label margin distance.

See Also:
Constant Field Values

LABEL_MARGIN_DIST

public static final IProperty<Float> LABEL_MARGIN_DIST
label margin distance property.

Constructor Detail

OgdfLayouter

public OgdfLayouter()
Method Detail

initDefaults

public void initDefaults(IPropertyHolder defaultsHolder)
Initialize the default values for the layout provider. Subclasses should extend this method with their own default values.

Parameters:
defaultsHolder - the layout options holder for default values

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

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