public abstract class SortableTableModel
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
elements
All the rows are stored as a List.
|
Constructor and Description |
---|
SortableTableModel() |
Modifier and Type | Method and Description |
---|---|
int |
getColumn() |
boolean |
isAscending() |
void |
setComparator(TableModelComparator comparator)
This comparator must be set.
|
void |
sortByColumn(int column,
boolean ascending) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public void setComparator(TableModelComparator comparator)
public void sortByColumn(int column, boolean ascending)
public boolean isAscending()
public int getColumn()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.