wt.query.template
Class NodeSetToTableModel

java.lang.Object
  extended bywt.query.template.NodeSetToTableModel

public class NodeSetToTableModel
extends Object

Creates a TableModel from a NodeList.


Field Summary
private  Vector colmnNames
          Vector of the column names to be used in the graph.
private  Vector data
          Vector of the data that will be used in the graph.
private  Vector headingNames
          Vector of the tag names that data needs to be collected from.
private  NodeList nodeListIn
          The NodeList to be put into the TableModel.
 
Constructor Summary
NodeSetToTableModel(NodeList nodeListIn)
          Constructor.
 
Method Summary
 TableModel convert(int style)
          Converts the NodeSet to a TableModel.
protected  Color getColor(int i)
          Get's a color depending on the input.
protected  TableModel pieModel()
          JChart's pie chart needs table model in a certain format.
protected  void snagData()
          Gets the data from the DOM.
protected  TableModel standardModel()
          Puts the data collected from the DOM into the TableModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeListIn

private NodeList nodeListIn
The NodeList to be put into the TableModel.


headingNames

private Vector headingNames
Vector of the tag names that data needs to be collected from.


colmnNames

private Vector colmnNames
Vector of the column names to be used in the graph.


data

private Vector data
Vector of the data that will be used in the graph.

Constructor Detail

NodeSetToTableModel

public NodeSetToTableModel(NodeList nodeListIn)
Constructor.

Method Detail

convert

public TableModel convert(int style)
                   throws WTException
Converts the NodeSet to a TableModel.

Returns:
The TableModel of the data collected.
Throws:
Throws - WTException if data is bad.
WTException

standardModel

protected TableModel standardModel()
Puts the data collected from the DOM into the TableModel

Returns:
TableModel created with the data taken from the DOM.

pieModel

protected TableModel pieModel()
JChart's pie chart needs table model in a certain format.

Returns:
TableModel created with the data taken from the DOM.

snagData

protected void snagData()
                 throws WTException
Gets the data from the DOM.

Throws:
WTException

getColor

protected Color getColor(int i)
Get's a color depending on the input.

Returns:
Color