com.sun.grid.installer.gui
public abstract class SortedTableModel extends javax.swing.table.DefaultTableModel
DefaultTableModel,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
int[] |
sortedIndexes |
| Constructor and Description |
|---|
SortedTableModel(java.lang.Object[][] data,
java.lang.String[] columnHeaders)
Contructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRowIndex(int sortedRow)
Returns with the index of the sorted row index.
|
int[] |
getSortedIndexes()
Returns with the new instance of sorted indexes depending on the row count.
|
int |
getSortedRowIndex(int row)
Returns with the sorted index of the specified row
|
void |
reSort()
Re-sorts the rows based on the last column and direction selection.
|
void |
sortByColumn(int col,
boolean isAscent)
Calls sorting depending on the values of the given column then updates the table.
|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAtaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListenerpublic SortedTableModel(java.lang.Object[][] data,
java.lang.String[] columnHeaders)
public void sortByColumn(int col,
boolean isAscent)
col - The sorting based ont this column's values.isAscent - The order of the sorted rows.public int[] getSortedIndexes()
public int getSortedRowIndex(int row)
row - The row id in the view.getRowIndexpublic int getRowIndex(int sortedRow)
sortedRow - The sorted row id in the model.getSortedRowIndexpublic void reSort()