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 Sortable
Sortable.getDefinitions()
public void setDefinitions(Sortable.Definition[] definitions)
Sortable
setDefinitions
in interface Sortable
definitions
- 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()
Sortable
sort
in interface Sortable
Sortable.sort()
public void addTableModelListener(TableModelListener l)
addTableModelListener
in interface TableModel
TableModel.addTableModelListener(TableModelListener)
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
TableModel.getColumnClass(int)
public int getColumnCount()
getColumnCount
in interface TableModel
TableModel.getColumnCount()
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
TableModel.getColumnName(int)
public int getRowCount()
getRowCount
in interface TableModel
TableModel.getRowCount()
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
TableModel.getValueAt(int, int)
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
TableModel.isCellEditable(int, int)
public void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
TableModel.removeTableModelListener(TableModelListener)
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
TableModel.setValueAt(Object, int, int)
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.