|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.zfqjava.swing.model.DefaultColumnSorter
public class DefaultColumnSorter
DefaultColumnSorter provides a default
column sorter.
| Field Summary |
|---|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
DefaultColumnSorter(TableModel model)
|
|
| Method Summary | |
|---|---|
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
String |
getColumnName(int columnIndex)
|
int |
getRowCount()
|
List |
getSortColumnList()
Returns a list contains all sort columns index. |
Boolean |
getSortOrderObject(int column)
Returns the sort order for the specified column. |
TableModel |
getTableModel()
Returns the TableModel that be sorted. |
Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
int |
modelToSorterRow(int modelRow)
Converts the model row index to the ColumnSorter row index. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
void |
sortColumn(int column,
boolean ascending)
Sorts the specified column. |
void |
sortColumn(int column,
Boolean sortOrder)
Sorts the specified column by the specified sort order. |
void |
sortColumn(int column,
Boolean sortOrder,
boolean extend)
Sorts the specified column by the specified sort order. |
int |
sorterToModelRow(int sorterRow)
Converts the ColumnSorter row index to the model row index. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultColumnSorter(TableModel model)
| Method Detail |
|---|
public List getSortColumnList()
public void sortColumn(int column,
Boolean sortOrder)
column - the column to sortsortOrder - the sort order
public void sortColumn(int column,
Boolean sortOrder,
boolean extend)
column - the column to sortsortOrder - the sort orderextend - true for new sort column, false for single sort columnpublic Boolean getSortOrderObject(int column)
column - the column index
public TableModel getTableModel()
public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic Class getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModel
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface TableModel
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic int sorterToModelRow(int sorterRow)
sorterRow - the sorter row index
public int modelToSorterRow(int modelRow)
modelRow - the mode row index
public void sortColumn(int column,
boolean ascending)
ColumnSorter
sortColumn in interface ColumnSortercolumn - the column to sortascending - the sort order
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||