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

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

public class GraphvizLayouter
extends Object

Layouter that calls Graphviz through a child process to perform layout. The graph structure and layout information is passed through a textual format called Dot, see the Dot language specification. Serialization and parsing of this textual format is done using Xtext.

Rating proposed yellow
(2009-12-11) msp

Field Summary
static String CIRCO_COMMAND
          command for Circo layout.
static float DEF_MIN_SPACING
          default value for minimal spacing.
static String DOT_COMMAND
          command for Dot layout.
static boolean ENABLE_DEBUG
          if true, debug output is enabled, which writes dot files to the home folder.
static String FDP_COMMAND
          command for Fdp layout.
static double FONT_SIZE_MULT
          default multiplier for font sizes.
static String NEATO_COMMAND
          command for Neato layout.
static String OPT_LABEL_DISTANCE
          layout option identifier for label distance.
static String TWOPI_COMMAND
          command for Twopi layout.
 
Constructor Summary
GraphvizLayouter()
           
 
Method Summary
 void layout(KNode parentNode, IKielerProgressMonitor progressMonitor, String command)
          Performs the actual work of the layout process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_LABEL_DISTANCE

public static final String OPT_LABEL_DISTANCE
layout option identifier for label distance.

See Also:
Constant Field Values

DOT_COMMAND

public static final String DOT_COMMAND
command for Dot layout.

See Also:
Constant Field Values

NEATO_COMMAND

public static final String NEATO_COMMAND
command for Neato layout.

See Also:
Constant Field Values

TWOPI_COMMAND

public static final String TWOPI_COMMAND
command for Twopi layout.

See Also:
Constant Field Values

FDP_COMMAND

public static final String FDP_COMMAND
command for Fdp layout.

See Also:
Constant Field Values

CIRCO_COMMAND

public static final String CIRCO_COMMAND
command for Circo layout.

See Also:
Constant Field Values

DEF_MIN_SPACING

public static final float DEF_MIN_SPACING
default value for minimal spacing.

See Also:
Constant Field Values

FONT_SIZE_MULT

public static final double FONT_SIZE_MULT
default multiplier for font sizes.

See Also:
Constant Field Values

ENABLE_DEBUG

public static final boolean ENABLE_DEBUG
if true, debug output is enabled, which writes dot files to the home folder.

See Also:
Constant Field Values
Constructor Detail

GraphvizLayouter

public GraphvizLayouter()
Method Detail

layout

public void layout(KNode parentNode,
                   IKielerProgressMonitor progressMonitor,
                   String command)
            throws KielerException
Performs the actual work of the layout process. Translates the KNode into a structure GraphViz understands, calls the desired GraphViz layouter and annotates the KLayoutGraph with the position and size information provided by GraphViz.

Parameters:
parentNode - the node to process
progressMonitor - a monitor to which progress is reported
command - Graphviz command to use, determines the layout algorithm
Throws:
KielerException - if Graphviz layout fails