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, GEMLayouter, 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 String INPUT_FORMAT
          the input format for the ogdf server.
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(String theName)
          Contructs an OgdfLayouter.
 
Method Summary
protected  void addInformation(String key, Object value)
          Adds additional information for the next layout.
protected  void addOption(String key, Object value)
          Adds an option for the next layout.
protected  void applyLayout(KNode parentNode, Map<String,KVectorChain> layoutInformation)
          Applies the layout information back to the original graph.
 void doLayout(KNode layoutNode, IKielerProgressMonitor progressMonitor, OgdfServer ogdfServer)
          Layouts the given graph.
protected  void postProcess(KNode layoutNode)
          Performs post-processing on the given node.
protected  void prepareLabelLayout(KNode layoutNode)
          Prepare the label layout.
protected abstract  void prepareLayouter(KNode layoutNode)
          Sets the layout specific options and modules depending on the options defined in the node.
 void setDebugCanvas(IDebugCanvas thecanvas)
          Set the debug canvas.
 
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.


INPUT_FORMAT

public static final String INPUT_FORMAT
the input format for the ogdf server.

See Also:
Constant Field Values
Constructor Detail

OgdfLayouter

public OgdfLayouter(String theName)
Contructs an OgdfLayouter.

Parameters:
theName - the name of the layouter as used in the ogdf server
Method Detail

setDebugCanvas

public void setDebugCanvas(IDebugCanvas thecanvas)
Set the debug canvas.

Parameters:
thecanvas - the debug canvas

doLayout

public void doLayout(KNode layoutNode,
                     IKielerProgressMonitor progressMonitor,
                     OgdfServer ogdfServer)
Layouts the given graph.

Parameters:
layoutNode - the node representing the graph
progressMonitor - the progress monitor
ogdfServer - the OGDF server process interface

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

addOption

protected void addOption(String key,
                         Object value)
Adds an option for the next layout.

Parameters:
key - the option key
value - the value

addInformation

protected void addInformation(String key,
                              Object value)
Adds additional information for the next layout.

Parameters:
key - the option key
value - the value

prepareLabelLayout

protected void prepareLabelLayout(KNode layoutNode)
Prepare the label layout.

Parameters:
layoutNode - the parent layout node

applyLayout

protected void applyLayout(KNode parentNode,
                           Map<String,KVectorChain> layoutInformation)
Applies the layout information back to the original graph.

Parameters:
parentNode - the parent node of the layout graph
layoutInformation - the layout information