|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.util.dot.DotGraph
public class DotGraph
Field Summary | |
---|---|
static String |
DOT_EXTENSION
The extension added to output files, exported so that clients can search for the filenames. |
Constructor Summary | |
---|---|
DotGraph(String graphname)
Creates a new graph for drawing. |
Method Summary | |
---|---|
DotGraph |
createSubGraph(String label)
creates a sub graph. |
DotGraphEdge |
drawEdge(String from,
String to)
Draws a directed edge (including the source and end nodes, if they have not already been drawn). |
DotGraphNode |
drawNode(String name)
Draws a node. |
void |
drawUndirectedEdge(String label1,
String label2)
draws an undirected edge |
DotGraphNode |
getNode(String name)
Gets the graph node by name. |
void |
plot(String filename)
Generates the drawing on canvas to the dot file. |
void |
render(OutputStream out,
int indent)
|
void |
setGraphAttribute(DotGraphAttribute attr)
sets any general attributes |
void |
setGraphAttribute(String id,
String value)
sets any general attributes |
void |
setGraphLabel(String label)
sets the graph label |
void |
setGraphSize(double width,
double height)
sets the size of drawing area, in inches |
void |
setNodeShape(String shape)
Sets all node shapes, see the list of node shapes in DotGraphConstants. |
void |
setNodeStyle(String style)
Sets all node styles |
void |
setOrientation(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 |
Field Detail |
---|
public static final String DOT_EXTENSION
Constructor Detail |
---|
public DotGraph(String graphname)
graphname,
- the name used to identify the graph in the dot source.Method Detail |
---|
public void plot(String filename)
filename
- the name for the output file. By convention, it should
end with DOT_EXTENSION, but this is not enforced.public DotGraphEdge drawEdge(String from, String to)
from,
- the source nodeto,
- the end node
public DotGraphNode drawNode(String name)
name,
- the node to draw.
DotGraphNode
corresponding to the
specified name.public DotGraphNode getNode(String name)
name,
- unique name of the node.
null
if there is no such node.public void setNodeShape(String shape)
shape,
- the node shapepublic void setNodeStyle(String style)
style,
- the node stylepublic void setGraphSize(double width, double height)
public void setPageSize(double width, double height)
public void setOrientation(String orientation)
public void setGraphLabel(String label)
public void setGraphAttribute(String id, String value)
id
- is the attribute name.value
- is the attribute value.public void setGraphAttribute(DotGraphAttribute attr)
attr
- a DotGraphAttribute
specifying the
attribute name and value.public void drawUndirectedEdge(String label1, String label2)
label1,
- label2public DotGraph createSubGraph(String label)
public void render(OutputStream out, int indent) throws IOException
render
in interface Renderable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |