org.xistrat.util.d3.vrmlgraph
Class VRMLOutput

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

public class VRMLOutput
extends java.lang.Object

This class is used to output a VRML representation of the currently stored GraphData object.

Since:
0.6.90

Constructor Summary
VRMLOutput(GraphData graph)
          Constructor for the VRMLOutput object
 
Method Summary
 void setBackgroundColour(java.lang.String backgroundColour)
          Sets the backgroundColour attribute of the VRMLOutput object
 void setEdgeColour(java.lang.String edgeColour)
          Sets the edgeColour attribute of the VRMLOutput object
 void setEdgeTransparency(double edgeTransparency)
          Sets the edgeTransparency attribute of the VRMLOutput object
 void setEdgeWidth(double edgeWidth)
          Sets the edgeWidth attribute of the VRMLOutput object
 void setFontColour(java.lang.String fontColour)
          Sets the fontColour attribute of the VRMLOutput object
 void setFontSize(double fontSize)
          Sets the fontSize attribute of the VRMLOutput object
 void setNodeColour(java.lang.String nodeColour)
          Sets the nodeColour attribute of the VRMLOutput object
 void setNodeSize(double nodeSize)
          Sets the nodeSize attribute of the VRMLOutput object
 void setNodeTransparency(double nodeTransparency)
          Sets the nodeTransparency attribute of the VRMLOutput object
 void setTitle(java.lang.String title)
          Sets the title attribute of the VRMLOutput object
 void setZDropBack(double zDropBack)
          Sets the zDropBack attribute of the VRMLOutput object
 void showLabels(boolean b)
          Specify whether or not Node labels are to be drawn on the VRML scene.
 void writeToFile(java.lang.String outFile)
          Writes a representation of the current graph to a VRML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VRMLOutput

public VRMLOutput(GraphData graph)
Constructor for the VRMLOutput object

Parameters:
graph - The GraphData object to be represented as VRML
Method Detail

setFontSize

public void setFontSize(double fontSize)
Sets the fontSize attribute of the VRMLOutput object

Parameters:
fontSize - The new font size to be used in VRML output.

setFontColour

public void setFontColour(java.lang.String fontColour)
Sets the fontColour attribute of the VRMLOutput object

Parameters:
fontColour - The new font colour to be used in VRML output

setNodeSize

public void setNodeSize(double nodeSize)
Sets the nodeSize attribute of the VRMLOutput object

Parameters:
nodeSize - The new size of the Nodes to be drawn.

setNodeColour

public void setNodeColour(java.lang.String nodeColour)
Sets the nodeColour attribute of the VRMLOutput object

Parameters:
nodeColour - The new colour of the Nodes to be drawn

setNodeTransparency

public void setNodeTransparency(double nodeTransparency)
Sets the nodeTransparency attribute of the VRMLOutput object

Parameters:
nodeTransparency - The new transparency of the nodes

setBackgroundColour

public void setBackgroundColour(java.lang.String backgroundColour)
Sets the backgroundColour attribute of the VRMLOutput object

Parameters:
backgroundColour - The new background colour of the VRML scene

setZDropBack

public void setZDropBack(double zDropBack)
Sets the zDropBack attribute of the VRMLOutput object

Parameters:
zDropBack - Set the distance between the viewer and the centre of the graph

setEdgeWidth

public void setEdgeWidth(double edgeWidth)
Sets the edgeWidth attribute of the VRMLOutput object

Parameters:
edgeWidth - Set the thickness of the edges to be drawn

setEdgeColour

public void setEdgeColour(java.lang.String edgeColour)
Sets the edgeColour attribute of the VRMLOutput object

Parameters:
edgeColour - Set the colour of the edges to be drawn

setEdgeTransparency

public void setEdgeTransparency(double edgeTransparency)
Sets the edgeTransparency attribute of the VRMLOutput object

Parameters:
edgeTransparency - Set the transparency of the edges

setTitle

public void setTitle(java.lang.String title)
Sets the title attribute of the VRMLOutput object

Parameters:
title - The new title of the VRML scene

showLabels

public void showLabels(boolean b)
Specify whether or not Node labels are to be drawn on the VRML scene.

Parameters:
b - Set to true to drawn Node labels. Default is false.

writeToFile

public void writeToFile(java.lang.String outFile)
                 throws java.lang.Exception
Writes a representation of the current graph to a VRML file

Parameters:
outFile - The filename to output to
Throws:
java.lang.Exception - An Exception is thrown if an error occurs.