org.nuiton.web.gwt.table
Class SortableTableModel
java.lang.Object
org.nuiton.web.gwt.table.AbstractGWTTableModel
org.nuiton.web.gwt.table.SortableTableModel
- All Implemented Interfaces:
- Serializable, EventListener, GWTTableModel, TableModelListener
public class SortableTableModel
- extends AbstractGWTTableModel
- implements Serializable, TableModelListener
This class is used to provide sorting functionnalities when clicking on table
columns. It is based on an underlying model that contains data.
- Since:
- 1.1
- Author:
- jcouteau
- See Also:
- Serialized Form
| Methods inherited from class org.nuiton.web.gwt.table.AbstractGWTTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
protected GWTTableModel model
sortedColumn
protected int sortedColumn
- The sorted column, -1 means no sorting
sortingOrder
protected int sortingOrder
- The sorting order, -1 means no sorting
NO_SORTING
public static final int NO_SORTING
- See Also:
- Constant Field Values
ASC
public static final int ASC
- See Also:
- Constant Field Values
DSC
public static final int DSC
- See Also:
- Constant Field Values
rowsOrder
protected int[] rowsOrder
SortableTableModel
public SortableTableModel(GWTTableModel model)
tableChanged
public void tableChanged(TableModelEvent e)
- Specified by:
tableChanged in interface TableModelListener
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface GWTTableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface GWTTableModel
getValueAt
public Object getValueAt(int col,
int row)
- Specified by:
getValueAt in interface GWTTableModel
setSortedColumn
public void setSortedColumn(int column)
setSortedColumn
public void setSortedColumn(int column,
int order)
getSortedColumn
public int getSortedColumn()
setSortingOrder
public void setSortingOrder(int order)
getSortingOrder
public int getSortingOrder()
isSortable
protected boolean isSortable(int column)
initRowsOrder
protected void initRowsOrder()
Copyright © 2010-2011 CodeLutin. All Rights Reserved.