org.xistrat.util.d3.vrmlgraph
Class TextLayout

java.lang.Object
  extended by org.xistrat.util.d3.vrmlgraph.TextLayout

public class TextLayout
extends java.lang.Object

This class contains layout methods for outputting text

Since:
0.6.90

Constructor Summary
TextLayout(java.io.BufferedWriter bw)
          Constructor for the TextLayout object
 
Method Summary
 void writeEdge(java.lang.String nodeA, java.lang.String nodeB)
          Writes all of the Edge Data to the text file, one line per edge, with a tab separating the two Node labels
 void writeEdgeHeader()
          Writes a header to preceed the Edge information
 void writeHeader(java.lang.String title, java.lang.String info)
          Writes a header to the text file, comprising of a title and info field
 void writeNode(double x, double y, double z, java.lang.String label)
          Writes all of the Node data to the text file, one line per Node, with each field separated by a tab
 void writeNodeHeader()
          Writes a header to preceed the Node information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLayout

public TextLayout(java.io.BufferedWriter bw)
Constructor for the TextLayout object

Parameters:
bw - The BufferedWriter to write to
Method Detail

writeHeader

public void writeHeader(java.lang.String title,
                        java.lang.String info)
                 throws java.io.IOException
Writes a header to the text file, comprising of a title and info field

Parameters:
title - The title of the text file
info - Any further information about the text file
Throws:
java.io.IOException - Throws an IOException if an error occurs

writeNodeHeader

public void writeNodeHeader()
                     throws java.io.IOException
Writes a header to preceed the Node information

Throws:
java.io.IOException - Throws an IOException if an error occurs

writeNode

public void writeNode(double x,
                      double y,
                      double z,
                      java.lang.String label)
               throws java.io.IOException
Writes all of the Node data to the text file, one line per Node, with each field separated by a tab

Parameters:
x - The X coordinate of the Node
y - The Y coordinate of the Node
z - The Z coordinate of the Node
label - The label of the Node
Throws:
java.io.IOException - Throws an IOException if an error occurs

writeEdgeHeader

public void writeEdgeHeader()
                     throws java.io.IOException
Writes a header to preceed the Edge information

Throws:
java.io.IOException - Throws an IOException if an error occurs

writeEdge

public void writeEdge(java.lang.String nodeA,
                      java.lang.String nodeB)
               throws java.io.IOException
Writes all of the Edge Data to the text file, one line per edge, with a tab separating the two Node labels

Parameters:
nodeA - The label of the first Node that this edge connects
nodeB - The label of the second Node that this edge connects
Throws:
java.io.IOException - Throws an IOException if an error occurs