|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.swing.table.DefaultSortableTableModel
Converts any TableModel to a SortableTableModel.
Field Summary |
Fields inherited from interface org.freehep.swing.table.SortableTableModel |
UNSORTED |
Constructor Summary | |
DefaultSortableTableModel(TableModel source)
Creates a new instance of DefaultTableSorter |
Method Summary | |
void |
addTableModelListener(TableModelListener l)
|
protected void |
fireTableChanged(TableModelEvent event)
Notifies all listeners of a change to the sorted TableModel. |
Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
String |
getColumnName(int columnIndex)
|
int |
getRowCount()
|
Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
void |
removeTableModelListener(TableModelListener l)
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
void |
sort(int column,
boolean ascending)
Sort the table model using the given column. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultSortableTableModel(TableModel source)
source
- The table model to be converted.Method Detail |
public void addTableModelListener(TableModelListener l)
addTableModelListener
in interface TableModel
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
public void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
public void sort(int column, boolean ascending)
SortableTableModel
sort
in interface SortableTableModel
column
- The index of the column to sort on, or UNSORTED if no sort is necessary.ascending
- If true
sort in ascending order, else sort in descending order.protected void fireTableChanged(TableModelEvent event)
event
- The event to be sent to the listeners.
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |