|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.cwi.sen1.visplugin.table.model.TableSorter
public class TableSorter
Table sorter. Sorts a table using comparators
Field Summary | |
---|---|
(package private) SortableTableModel |
model
|
Constructor Summary | |
---|---|
TableSorter(SortableTableModel model)
Constructor. |
Method Summary | |
---|---|
private int |
compare(int column,
int row1,
int row2)
Compare two values in one column, these two values are the values at (column, row1) and (column, row2). |
private int |
compare(java.lang.Number num1,
java.lang.Number num2)
Number comparator based on doubles. |
void |
sort(int column,
boolean isAscent)
Sort the table on a given column and an order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
SortableTableModel model
Constructor Detail |
---|
public TableSorter(SortableTableModel model)
model
- The model to sortMethod Detail |
---|
public void sort(int column, boolean isAscent)
column
- the column to sort onisAscent
- ascending (true) or or decending (false) orderprivate int compare(int column, int row1, int row2)
column
- the column to sort onrow1
- The numbers to comparerow2
- The numbers to compareprivate int compare(java.lang.Number num1, java.lang.Number num2)
num1
- The numbers to comparenum2
- The numbers to compare
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |