edu.northwestern.at.wordhoard.swing.calculator.analysis
Class FrequencyAnalysisDataRow

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.FrequencyAnalysisDataRow
All Implemented Interfaces:
SortedTableModel.Row

public class FrequencyAnalysisDataRow
extends java.lang.Object
implements SortedTableModel.Row

Holds frequency analysis entries for tabular display.


Field Summary
protected  java.lang.Object[] rowData
          The analysis results for this row.
protected  java.lang.String textItem
          The text item being analyzed.
 
Constructor Summary
FrequencyAnalysisDataRow(java.lang.String textItem, double[] rowData)
          Constructs a new row.
FrequencyAnalysisDataRow(java.lang.String textItem, java.lang.Object[] rowData)
          Constructs a new row.
FrequencyAnalysisDataRow(java.lang.String textItem, java.lang.String textItem2, double[] rowData)
          Constructs a new row.
FrequencyAnalysisDataRow(java.lang.String textItem, java.lang.String textItem2, java.lang.Object[] rowData)
          Constructs a new row.
 
Method Summary
 int compareTo(SortedTableModel.Row obj, int columnIndex)
          Compares this row to another row using a specified column.
 java.lang.Object getUniqueRowID()
          Gets the associated unique ID for this row.
 java.lang.Object getValue(int columnIndex)
          Gets the value of a column.
 java.lang.String toString()
          Display text associated with node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

textItem

protected java.lang.String textItem
The text item being analyzed.


rowData

protected java.lang.Object[] rowData
The analysis results for this row.

Constructor Detail

FrequencyAnalysisDataRow

public FrequencyAnalysisDataRow(java.lang.String textItem,
                                double[] rowData)
Constructs a new row.

Parameters:
textItem - The text item which acts as a label for this row.
rowData - The analysis results for this row.

FrequencyAnalysisDataRow

public FrequencyAnalysisDataRow(java.lang.String textItem,
                                java.lang.String textItem2,
                                double[] rowData)
Constructs a new row.

Parameters:
textItem - The text item which acts as a label for this row.
textItem2 - A secondary text item.
rowData - The analysis results for this row.

FrequencyAnalysisDataRow

public FrequencyAnalysisDataRow(java.lang.String textItem,
                                java.lang.Object[] rowData)
Constructs a new row.

Parameters:
textItem - The text item which acts as a label for this row.
rowData - The analysis results for this row.

FrequencyAnalysisDataRow

public FrequencyAnalysisDataRow(java.lang.String textItem,
                                java.lang.String textItem2,
                                java.lang.Object[] rowData)
Constructs a new row.

Parameters:
textItem - The text item which acts as a label for this row.
textItem2 - A secondary text item.
rowData - The analysis results for this row.
Method Detail

getValue

public java.lang.Object getValue(int columnIndex)
Gets the value of a column.

Specified by:
getValue in interface SortedTableModel.Row
Parameters:
columnIndex - Column index.
Returns:
Column value.

compareTo

public int compareTo(SortedTableModel.Row obj,
                     int columnIndex)
Compares this row to another row using a specified column.

Specified by:
compareTo in interface SortedTableModel.Row
Parameters:
obj - The other row.
columnIndex - Column index.
Returns:
< 0 if this row < other row, 0 if this row = other row, > 0 if this row > other row.

getUniqueRowID

public java.lang.Object getUniqueRowID()
Gets the associated unique ID for this row.

Specified by:
getUniqueRowID in interface SortedTableModel.Row
Returns:
Unique ID for this row. This should be something unique to each table row.

toString

public java.lang.String toString()
Display text associated with node.

Overrides:
toString in class java.lang.Object