|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.util.swing.table.TableSorter
public class TableSorter
Allows to sort tables. The following features are supported:
Constructor Summary | |
---|---|
TableSorter(SortableTableModel model)
Instantiate a TableSorter with a given table model. |
Method Summary | |
---|---|
void |
addCriterium(int columnIndex,
boolean isAscent,
boolean clearExisting)
Adds the given criteria to the vector of criteria and sorts the whole model. |
int |
getInsertionIndex(Comparable[] columnValues)
|
int |
getSortDirection(int column)
Return the sort direction for the given column: 0: the column is not considered for sorting 1: the column is sorted in ascending order -1: the column is sorted in descending order. |
int |
getSortPriority(int column)
Get the sort priority for a given column. |
void |
resort()
Resort table by using the stored criteria. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableSorter(SortableTableModel model)
model
- Method Detail |
---|
public void addCriterium(int columnIndex, boolean isAscent, boolean clearExisting)
columnIndex
- column index to sort afterisAscent
- true
- ascendant; false
descendantclearExisting
- true: remove previous criteria; false: add to existing
criteriapublic int getSortPriority(int column)
column
- public int getSortDirection(int column)
column
- public void resort()
Please note: the indexes array of the model will be changed by this method!
public int getInsertionIndex(Comparable[] columnValues)
columnValues
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |