com.inxar.syntacs.util
Class Dot

java.lang.Object
  |
  +--com.inxar.syntacs.util.Dot
All Implemented Interfaces:
GraphViz

public class Dot
extends Object
implements GraphViz

Basic implementation of the GraphViz interface.


Inner classes inherited from class org.inxar.syntacs.util.GraphViz
GraphViz.Edge, GraphViz.Node
 
Constructor Summary
Dot(String name)
           
 
Method Summary
 GraphViz attr(String key, String val)
          Adds a new attribute to the graph and returns the graph instance.
 GraphViz comment(String text)
          Sets the comment for the graph.
 GraphViz.Edge edge(String src, String dst)
          Adds a new Edge to the graph and returns it to the caller for further refinement.
 String getName()
          Returns the name of the graph.
 boolean isDirected()
          Returns true if this is a digraph instance (for input to the dot program, false if it is a non-directed graph (for input to the neato program).
 void isDirected(boolean isDirected)
          Setter method for the directed flag.
 GraphViz.Node node(String name)
          Adds a new Node to the graph and returns it to the caller for further refinement.
 void setName(String name)
          The the name of the graph.
 GraphViz subgraph(String name)
          Adds a new subgraph to the graph and returns it to the caller for further refinement.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dot

public Dot(String name)
Method Detail

attr

public GraphViz attr(String key,
                     String val)
Description copied from interface: GraphViz
Adds a new attribute to the graph and returns the graph instance.
Specified by:
attr in interface GraphViz

comment

public GraphViz comment(String text)
Description copied from interface: GraphViz
Sets the comment for the graph.
Specified by:
comment in interface GraphViz

setName

public void setName(String name)
Description copied from interface: GraphViz
The the name of the graph.
Specified by:
setName in interface GraphViz

getName

public String getName()
Description copied from interface: GraphViz
Returns the name of the graph.
Specified by:
getName in interface GraphViz

isDirected

public void isDirected(boolean isDirected)
Description copied from interface: GraphViz
Setter method for the directed flag.
Specified by:
isDirected in interface GraphViz

isDirected

public boolean isDirected()
Description copied from interface: GraphViz
Returns true if this is a digraph instance (for input to the dot program, false if it is a non-directed graph (for input to the neato program).
Specified by:
isDirected in interface GraphViz

node

public GraphViz.Node node(String name)
Description copied from interface: GraphViz
Adds a new Node to the graph and returns it to the caller for further refinement.
Specified by:
node in interface GraphViz

edge

public GraphViz.Edge edge(String src,
                          String dst)
Description copied from interface: GraphViz
Adds a new Edge to the graph and returns it to the caller for further refinement.
Specified by:
edge in interface GraphViz

subgraph

public GraphViz subgraph(String name)
Description copied from interface: GraphViz
Adds a new subgraph to the graph and returns it to the caller for further refinement.
Specified by:
subgraph in interface GraphViz

toString

public String toString()
Overrides:
toString in class Object