public interface SortableTableModel extends TableModel
SortableTableModel extends a TableModel by methods that are
required to order the model by a certain column.
A simple way to use the SortableTableModel is to use a classic
TableModel and pass it to a SortableTableModelProxy, which will take
care for the sorting.
| Modifier and Type | Method and Description |
|---|---|
int |
getSortedColumn()
Gets the index of the column that is currently sorted.
|
boolean |
isDescending()
Gets the current sort order.
|
void |
sortByColumn(int columnIndex,
boolean desc)
Sorts by a certain column in the given order.
|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAtvoid sortByColumn(int columnIndex, boolean desc)
columnIndex - Column to sort at.desc - true: descending, false: ascendingint getSortedColumn()
boolean isDescending()
Copyright © 2004–2016. All rights reserved.