soot.util
Class DotGraph

java.lang.Object
  |
  +--soot.util.DotGraph
All Implemented Interfaces:
Renderable

public class DotGraph
extends java.lang.Object
implements Renderable


Constructor Summary
DotGraph(java.lang.String graphname)
          Creates a new graph for drawing.
 
Method Summary
 DotGraph createSubGraph(java.lang.String label)
          creates a sub graph.
 DotGraphEdge drawEdge(java.lang.String from, java.lang.String to)
          Draws a directed edge
 void drawUndirectedEdge(java.lang.String label1, java.lang.String label2)
          draws an undirected edge
 DotGraphNode getNode(java.lang.String name)
          Gets the graph node by name.
 void plot()
          Generates the drawing on canvas to the dot file.
 void render(java.io.OutputStream out, int indent)
           
 void setGraphAttribute(java.lang.String id, java.lang.String value)
          sets any general attributes
 void setGraphLabel(java.lang.String label)
          sets the graph label
 void setGraphSize(double width, double height)
          sets the size of drawing area, in inches
 void setNodeShape(java.lang.String shape)
          Sets all node shapes, see the list of node shapes in DotGraphConstants.
 void setNodeStyle(java.lang.String style)
          Sets all node styles
 void setOrientation(java.lang.String orientation)
          sets the graph rotation angles
 void setPageSize(double width, double height)
          sets the pages size, once this is set, the generated graph will be broken into several pages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotGraph

public DotGraph(java.lang.String graphname)
Creates a new graph for drawing.

Method Detail

plot

public void plot()
Generates the drawing on canvas to the dot file.


drawEdge

public DotGraphEdge drawEdge(java.lang.String from,
                             java.lang.String to)
Draws a directed edge

Returns:
a graph edge

getNode

public DotGraphNode getNode(java.lang.String name)
Gets the graph node by name.


setNodeShape

public void setNodeShape(java.lang.String shape)
Sets all node shapes, see the list of node shapes in DotGraphConstants.


setNodeStyle

public void setNodeStyle(java.lang.String style)
Sets all node styles


setGraphSize

public void setGraphSize(double width,
                         double height)
sets the size of drawing area, in inches


setPageSize

public void setPageSize(double width,
                        double height)
sets the pages size, once this is set, the generated graph will be broken into several pages.


setOrientation

public void setOrientation(java.lang.String orientation)
sets the graph rotation angles


setGraphLabel

public void setGraphLabel(java.lang.String label)
sets the graph label


setGraphAttribute

public void setGraphAttribute(java.lang.String id,
                              java.lang.String value)
sets any general attributes


drawUndirectedEdge

public void drawUndirectedEdge(java.lang.String label1,
                               java.lang.String label2)
draws an undirected edge


createSubGraph

public DotGraph createSubGraph(java.lang.String label)
creates a sub graph.

Returns:
the newly created sub graph.

render

public void render(java.io.OutputStream out,
                   int indent)
            throws java.io.IOException
Specified by:
render in interface Renderable
java.io.IOException