public class SortingTableModel extends Object implements TableModel, Sortable
(c) copyright 2002-2005-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Sortable.Definition| Modifier and Type | Field and Description |
|---|---|
protected Integer[] |
expandedIndex
expandedIndex
|
protected Map |
proxyListeners
the listeners
|
protected TableModel |
source
the source
|
| Constructor and Description |
|---|
SortingTableModel(TableModel source)
constructs a new SortingTableModel
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTableModelListener(TableModelListener l) |
Class |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex) |
Sortable.Definition[] |
getDefinitions() |
int |
getRowCount() |
Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
removeTableModelListener(TableModelListener l) |
void |
setDefinitions(Sortable.Definition[] definitions)
Sets the current definitions defined for this Sortable.
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
void |
sort()
Instructs this Sortable to sort based on currently set sorting
definitions.
|
protected Map proxyListeners
protected TableModel source
protected Integer[] expandedIndex
public SortingTableModel(TableModel source)
source - the sorcepublic Sortable.Definition[] getDefinitions()
getDefinitions in interface SortableSortable.getDefinitions()public void setDefinitions(Sortable.Definition[] definitions)
SortablesetDefinitions in interface Sortabledefinitions - An array of sort definitions. If multiple definitions
for the same field are included, the one with highest index will
be applied.#setDefinitions(Definition[])public void sort()
Sortablesort in interface SortableSortable.sort()public void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModelTableModel.addTableModelListener(TableModelListener)public Class getColumnClass(int columnIndex)
getColumnClass in interface TableModelTableModel.getColumnClass(int)public int getColumnCount()
getColumnCount in interface TableModelTableModel.getColumnCount()public String getColumnName(int columnIndex)
getColumnName in interface TableModelTableModel.getColumnName(int)public int getRowCount()
getRowCount in interface TableModelTableModel.getRowCount()public Object getValueAt(int rowIndex, int columnIndex)
getValueAt in interface TableModelTableModel.getValueAt(int, int)public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelTableModel.isCellEditable(int, int)public void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModelTableModel.removeTableModelListener(TableModelListener)public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt in interface TableModelTableModel.setValueAt(Object, int, int)Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.