public class TableSorter
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
static int |
ASCENDING
_more_
|
static java.util.Comparator |
COMPARABLE_COMAPRATOR
_more_
|
static int |
DESCENDING
_more_
|
static java.util.Comparator |
LEXICAL_COMPARATOR
_more_
|
static int |
NOT_SORTED
_more_
|
protected javax.swing.table.TableModel |
tableModel
_more_
|
Constructor and Description |
---|
TableSorter()
_more_
|
TableSorter(javax.swing.table.TableModel tableModel)
_more_
|
TableSorter(javax.swing.table.TableModel tableModel,
javax.swing.table.JTableHeader tableHeader)
_more_
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getColumnClass(int column)
_more_
|
int |
getColumnCount()
_more_
|
java.lang.String |
getColumnName(int column)
_more_
|
protected java.util.Comparator |
getComparator(int column)
_more_
|
protected javax.swing.Icon |
getHeaderRendererIcon(int column,
int size)
_more_
|
int |
getRowCount()
_more_
|
int |
getSortingStatus(int column)
_more_
|
javax.swing.table.JTableHeader |
getTableHeader()
_more_
|
javax.swing.table.TableModel |
getTableModel()
_more_
|
java.lang.Object |
getValueAt(int row,
int column)
_more_
|
boolean |
isCellEditable(int row,
int column)
_more_
|
boolean |
isSorting()
_more_
|
int |
modelIndex(int viewIndex)
_more_
|
void |
setColumnComparator(java.lang.Class type,
java.util.Comparator comparator)
_more_
|
void |
setSortingStatus(int column,
int status)
_more_
|
void |
setTableHeader(javax.swing.table.JTableHeader tableHeader)
_more_
|
void |
setTableModel(javax.swing.table.TableModel tableModel)
_more_
|
void |
setValueAt(java.lang.Object aValue,
int row,
int column)
_more_
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
protected javax.swing.table.TableModel tableModel
public static final int DESCENDING
public static final int NOT_SORTED
public static final int ASCENDING
public static final java.util.Comparator COMPARABLE_COMAPRATOR
public static final java.util.Comparator LEXICAL_COMPARATOR
public TableSorter()
public TableSorter(javax.swing.table.TableModel tableModel)
tableModel
- _more_public TableSorter(javax.swing.table.TableModel tableModel, javax.swing.table.JTableHeader tableHeader)
tableModel
- _more_tableHeader
- _more_public javax.swing.table.TableModel getTableModel()
public void setTableModel(javax.swing.table.TableModel tableModel)
tableModel
- _more_public javax.swing.table.JTableHeader getTableHeader()
public void setTableHeader(javax.swing.table.JTableHeader tableHeader)
tableHeader
- _more_public boolean isSorting()
public int getSortingStatus(int column)
column
- _more_public void setSortingStatus(int column, int status)
column
- _more_status
- _more_protected javax.swing.Icon getHeaderRendererIcon(int column, int size)
column
- _more_size
- _more_public void setColumnComparator(java.lang.Class type, java.util.Comparator comparator)
type
- _more_comparator
- _more_protected java.util.Comparator getComparator(int column)
column
- _more_public int modelIndex(int viewIndex)
viewIndex
- _more_public int getRowCount()
public int getColumnCount()
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- _more_public java.lang.Class getColumnClass(int column)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
column
- _more_public boolean isCellEditable(int row, int column)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- _more_column
- _more_public java.lang.Object getValueAt(int row, int column)
row
- _more_column
- _more_public void setValueAt(java.lang.Object aValue, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- _more_row
- _more_column
- _more_