Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table
Interface SortListModel

All Superinterfaces:
TableModel
All Known Implementing Classes:
SortTableModel

public interface SortListModel
extends TableModel

This interface defines methods for comparing the rows of a tablemodel.


Method Summary
 int compareRows(int row1, int row2)
          Compares two rows with each other and returns the result of the comparison.
 int compareRows(Object o1, Object o2)
          Compares two rows with each other and returns the result of the comparison.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

compareRows

int compareRows(int row1,
                int row2)
Compares two rows with each other and returns the result of the comparison.

Parameters:
row1 - the first row
row2 - the second row
Returns:
-1 if row1 evaluates less than row2, 0 if equal or 1 if row1 evaluates more than row2

compareRows

int compareRows(Object o1,
                Object o2)
Compares two rows with each other and returns the result of the comparison. This method is preferred if the row data are contained in a list.

Parameters:
o1 - the first row object
o2 - the second row object
Returns:
-1 if o1 evaluates less than o2, 0 if equal or 1 if o1 evaluates more than o2

Copyright © 2005 Scientific Applications. All Rights Reserved.