org.kohsuke.graphviz
Class Graph

java.lang.Object
  extended by org.kohsuke.graphviz.GraphObject<Graph>
      extended by org.kohsuke.graphviz.Graph

public class Graph
extends GraphObject<Graph>

Represents a graph.

Author:
Kohsuke Kawaguchi

Constructor Summary
Graph()
           
 
Method Summary
 Graph edge(Edge e)
           
 Graph edge(Node src, Node dst)
           
 Graph edge(Node src, Node dst, Style s)
           
 Graph edgeWith(Style s)
          Sets the style to be used in successive edge(...) invocations.
 void generateTo(java.util.List<java.lang.String> commands, java.io.File f)
          Generates the graph into the specified file.
 void generateTo(java.util.List<java.lang.String> commands, java.io.OutputStream out)
          Generates the graph into the specified OutputStream.
 Graph node(Node n)
           
 Graph node(java.lang.String label)
           
 Graph node(java.lang.String label, Style s)
           
 Graph nodeWith(Style s)
          Sets the style to be used in successive node(...) invocations.
 Graph subGraph(Graph g)
           
 Graph to()
          Used between two invocations of the node method to insert a new edge between them.
 void writeTo(java.io.OutputStream out)
          Writes out this graph in the dot format.
 
Methods inherited from class org.kohsuke.graphviz.GraphObject
attr, attr, attr, attr, escape, getEffectiveAttributes, id, style, style
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph

public Graph()
Method Detail

nodeWith

public Graph nodeWith(Style s)
Sets the style to be used in successive node(...) invocations.


edgeWith

public Graph edgeWith(Style s)
Sets the style to be used in successive edge(...) invocations.


node

public Graph node(Node n)

node

public Graph node(java.lang.String label)

node

public Graph node(java.lang.String label,
                  Style s)

to

public Graph to()
Used between two invocations of the node method to insert a new edge between them.


edge

public Graph edge(Edge e)

edge

public Graph edge(Node src,
                  Node dst)

edge

public Graph edge(Node src,
                  Node dst,
                  Style s)

subGraph

public Graph subGraph(Graph g)

writeTo

public void writeTo(java.io.OutputStream out)
Writes out this graph in the dot format.


generateTo

public void generateTo(java.util.List<java.lang.String> commands,
                       java.io.OutputStream out)
                throws java.lang.InterruptedException,
                       java.io.IOException
Generates the graph into the specified OutputStream.

Parameters:
commands - The complete dot invocation and format specifier, such as ["dot","-Tgif"].
Throws:
java.lang.InterruptedException
java.io.IOException

generateTo

public void generateTo(java.util.List<java.lang.String> commands,
                       java.io.File f)
                throws java.lang.InterruptedException,
                       java.io.IOException
Generates the graph into the specified file.

Throws:
java.lang.InterruptedException
java.io.IOException


Copyright © 2008. All Rights Reserved.