Kieker 1.3

kieker.tools.traceAnalysis.plugins.visualization.util.dot
Class DotFactory

java.lang.Object
  extended by kieker.tools.traceAnalysis.plugins.visualization.util.dot.DotFactory

public class DotFactory
extends Object

This class provides a collection of static methods to compile Graphviz Dot elements from string attributes and properties. These elements may be compiled to complete Dot files externally.

Author:
Nina Marwede
See Also:
Graphviz - Graph Visualization Software, Graphviz - Wikipedia

Field Summary
static String DOT_ARROWHEAD_OPEN
           
static double DOT_DEFAULT_FONTSIZE
           
static String DOT_DOT_RANKDIR_LR
           
static String DOT_FILLCOLOR_WHITE
           
static String DOT_SHAPE_BOX
           
static String DOT_SHAPE_BOX3D
           
static String DOT_SHAPE_NONE
           
static String DOT_SHAPE_OVAL
           
static String DOT_STYLE_DASHED
           
static String DOT_STYLE_FILLED
           
 
Method Summary
static StringBuilder createCluster(String prefix, String name, String label, String shape, String style, String framecolor, String fillcolor, String fontcolor, double fontsize, String misc)
          Constructs dot code for a cluster from the specified elements.
static String createConnection(String prefix, String from, String to, double taillabel, double headlabel)
          Creates dot code for a connection.
static String createConnection(String prefix, String from, String to, String style, String arrowhead)
          Creates dot code for a connection.
static String createConnection(String prefix, String from, String to, String label, String style, String arrowhead)
          Creates dot code for a connection.
static StringBuilder createEdgeDefaults(String style, String arrowhead, String labelfontname)
          Constructs dot code for the edge defaults.
static StringBuilder createHeader(String name, String label, String fontcolor, String fontname, double fontsize)
          Constructs dot code for a directed graph (digraph) file header.
static StringBuilder createNode(String prefix, String nodeId, String label, String shape, String style, String framecolor, String fillcolor, String fontcolor, double fontsize, String imageFilename, String misc)
          Constructs dot code for a node from the specified elements.
static StringBuilder createNodeDefaults(String style, String shape, String framecolor, String fontcolor, String fontname, double fontsize, String imagescale)
          Constructs dot code for the node defaults.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOT_SHAPE_BOX

public static final String DOT_SHAPE_BOX
See Also:
Constant Field Values

DOT_SHAPE_BOX3D

public static final String DOT_SHAPE_BOX3D
See Also:
Constant Field Values

DOT_SHAPE_NONE

public static final String DOT_SHAPE_NONE
See Also:
Constant Field Values

DOT_SHAPE_OVAL

public static final String DOT_SHAPE_OVAL
See Also:
Constant Field Values

DOT_STYLE_DASHED

public static final String DOT_STYLE_DASHED
See Also:
Constant Field Values

DOT_ARROWHEAD_OPEN

public static final String DOT_ARROWHEAD_OPEN
See Also:
Constant Field Values

DOT_DEFAULT_FONTSIZE

public static final double DOT_DEFAULT_FONTSIZE
See Also:
Constant Field Values

DOT_DOT_RANKDIR_LR

public static final String DOT_DOT_RANKDIR_LR
See Also:
Constant Field Values

DOT_FILLCOLOR_WHITE

public static final String DOT_FILLCOLOR_WHITE
See Also:
Constant Field Values

DOT_STYLE_FILLED

public static final String DOT_STYLE_FILLED
See Also:
Constant Field Values
Method Detail

createHeader

public static StringBuilder createHeader(String name,
                                         String label,
                                         String fontcolor,
                                         String fontname,
                                         double fontsize)
Constructs dot code for a directed graph (digraph) file header. (Should be called only once per dot file.)

Parameters:
nodeId -
label - text to show at the label locacion (specified elsewhere) with HTML braces (<>)
fontcolor -
fontname -
fontsize -
Returns:
digraph header as dot code

createNodeDefaults

public static StringBuilder createNodeDefaults(String style,
                                               String shape,
                                               String framecolor,
                                               String fontcolor,
                                               String fontname,
                                               double fontsize,
                                               String imagescale)
Constructs dot code for the node defaults. (Should be called only once per dot file.)

Parameters:
style -
shape -
framecolor -
fontcolor -
fontname -
fontsize -
Returns:
graph node defaults as dot code

createEdgeDefaults

public static StringBuilder createEdgeDefaults(String style,
                                               String arrowhead,
                                               String labelfontname)
Constructs dot code for the edge defaults. (Should be called only once per dot file.)

Parameters:
style -
arrowhead -
labelfontname - label font nodeId, works only for headlabel and taillabel, not simple label
Returns:
graph edge defaults as dot code

createNode

public static StringBuilder createNode(String prefix,
                                       String nodeId,
                                       String label,
                                       String shape,
                                       String style,
                                       String framecolor,
                                       String fillcolor,
                                       String fontcolor,
                                       double fontsize,
                                       String imageFilename,
                                       String misc)
Constructs dot code for a node from the specified elements. Null values can be used for all parameters except nodeId -- dot will use defaults then.

Parameters:
prefix - usually spaces, dependent on hierarchy - only for nice ascii formatting inside the dot code
nodeId -
label -
shape -
style -
framecolor -
fillcolor -
fontcolor -
fontsize -
imageFilename -
misc -
Returns:
graph node as dot code

createCluster

public static StringBuilder createCluster(String prefix,
                                          String name,
                                          String label,
                                          String shape,
                                          String style,
                                          String framecolor,
                                          String fillcolor,
                                          String fontcolor,
                                          double fontsize,
                                          String misc)
Constructs dot code for a cluster from the specified elements. ATTENTION: Without closing bracket! ( "}" has to be appended by calling method.)

Parameters:
prefix - usually spaces, dependent on hierarchy - only for nice ascii formatting inside the dot code
nodeId -
label -
shape -
style -
framecolor -
fillcolor -
fontcolor -
fontsize -
misc -
Returns:
graph cluster as dot code

createConnection

public static String createConnection(String prefix,
                                      String from,
                                      String to,
                                      String style,
                                      String arrowhead)
Creates dot code for a connection.

Parameters:
prefix - usually spaces, dependent on hierarchy - only for nice ascii formatting inside the dot code
from -
to -
Returns:
graph connection as dot code

createConnection

public static String createConnection(String prefix,
                                      String from,
                                      String to,
                                      String label,
                                      String style,
                                      String arrowhead)
Creates dot code for a connection. Like (String,String,String), except a label can be added.

Parameters:
prefix -
from -
to -
label -
Returns:
graph connection as dot code

createConnection

public static String createConnection(String prefix,
                                      String from,
                                      String to,
                                      double taillabel,
                                      double headlabel)
Creates dot code for a connection. Like (String,String,String), except a headlabel and a taillabel can be added.

Parameters:
prefix -
from -
to -
taillabel -
headlabel -
Returns:
graph connection as dot code

Kieker 1.3

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net