public interface SortableTableModel extends TableModel
Modifier and Type | Method and Description |
---|---|
int |
getActualRow(int visibleRow)
Returns the actual underlying row the given visible one represents.
|
int |
getDisplayRow(int internalRow)
Returns the "visible" row derived from row in the actual table model.
|
int |
getSortColumn()
Returns the sort column.
|
TableModel |
getUnsortedModel()
returns the underlying model, can be null.
|
boolean |
isAscending()
Returns whether sorting is ascending or not.
|
boolean |
isSorted()
returns whether the table was sorted.
|
void |
setUnsortedModel(TableModel value)
Sets the base model to use.
|
void |
sort(int columnIndex)
sorts the table over the given column (ascending).
|
void |
sort(int columnIndex,
boolean ascending)
sorts the table over the given column, either ascending or descending.
|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
void setUnsortedModel(TableModel value)
value
- the base modelTableModel getUnsortedModel()
boolean isSorted()
int getSortColumn()
boolean isAscending()
isSorted()
,
getSortColumn()
int getActualRow(int visibleRow)
visibleRow
- the displayed row to retrieve the original row forint getDisplayRow(int internalRow)
internalRow
- the row in the actual modelvoid sort(int columnIndex)
columnIndex
- the column to sort overvoid sort(int columnIndex, boolean ascending)
columnIndex
- the column to sort overascending
- ascending if true, otherwise descendingCopyright © 2017. All Rights Reserved.