|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.SortedTableModelRow
public class SortedTableModelRow
Simple concrete implementation of sorted table model row.
Defines a simple concrete implementation of the SortedTableModel.Row interface. The unique row ID may be specified as the value of a column, or as a separate value. The column values may be any objects which implement the Comparable interface.
Field Summary | |
---|---|
protected java.lang.Comparable[] |
rowData
The data for this row. |
protected java.lang.Object |
uniqueID
The unique row identifier value if not present in the row data. |
protected int |
uniqueIDColumn
The column number for the unique row identifier. |
Constructor Summary | |
---|---|
SortedTableModelRow(java.lang.Comparable[] rowData)
Create a row from an array of objects. |
|
SortedTableModelRow(java.lang.Comparable[] rowData,
int uniqueIDColumn)
Create a row from an array of objects. |
|
SortedTableModelRow(java.lang.Comparable[] rowData,
java.lang.Object uniqueID)
Create a row from an array of objects. |
Method Summary | |
---|---|
int |
compareTo(SortedTableModel.Row other,
int columnIndex)
Compare value in specified column with same column in another row. |
java.lang.Object |
getUniqueRowID()
Get the unique row identifier. |
java.lang.Object |
getValue(int columnIndex)
Get value in specified column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Comparable[] rowData
protected int uniqueIDColumn
protected java.lang.Object uniqueID
Constructor Detail |
---|
public SortedTableModelRow(java.lang.Comparable[] rowData)
rowData
- Array of objects to use as row data.
The first entry in the row data is assumed
to contain a unique row identifier. public SortedTableModelRow(java.lang.Comparable[] rowData, int uniqueIDColumn)
rowData
- Array of objects to use as row data.
The first entry is assumed to be a
unique row identifier.uniqueIDColumn
- Column number of the unique row ID value. public SortedTableModelRow(java.lang.Comparable[] rowData, java.lang.Object uniqueID)
rowData
- Array of objects to use as row data.
The first entry is assumed to be a
unique row identifier.uniqueID
- Object containing the unique ID for this row. Method Detail |
---|
public java.lang.Object getValue(int columnIndex)
getValue
in interface SortedTableModel.Row
columnIndex
- The column index of the value to return.
public int compareTo(SortedTableModel.Row other, int columnIndex)
compareTo
in interface SortedTableModel.Row
other
- The other row.columnIndex
- The index of the column to compare.
public java.lang.Object getUniqueRowID()
getUniqueRowID
in interface SortedTableModel.Row
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |