org.apache.struts2.components.table
Class SortFilterModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.apache.struts2.components.table.AbstractFilterModel
org.apache.struts2.components.table.SortFilterModel
- All Implemented Interfaces:
- Serializable, EventListener, TableModelListener, TableModel, SortableTableModel
public class SortFilterModel
- extends AbstractFilterModel
- implements TableModelListener, SortableTableModel
- See Also:
- Serialized Form
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
rows
private ArrayList rows
_sortDirection
private String _sortDirection
- These are just here to implement the interface
dirty
private boolean dirty
sortColumn
private int sortColumn
SortFilterModel
public SortFilterModel(TableModel tm)
isCellEditable
public boolean isCellEditable(int r,
int c)
- Specified by:
isCellEditable
in interface TableModel
- Overrides:
isCellEditable
in class AbstractFilterModel
setModel
public void setModel(TableModel tm)
- Overrides:
setModel
in class AbstractFilterModel
getSortedColumnNumber
public int getSortedColumnNumber()
- Specified by:
getSortedColumnNumber
in interface SortableTableModel
getSortedDirection
public String getSortedDirection(int columnNumber)
- Specified by:
getSortedDirection
in interface SortableTableModel
setValueAt
public void setValueAt(Object aValue,
int r,
int c)
- Specified by:
setValueAt
in interface TableModel
- Overrides:
setValueAt
in class AbstractFilterModel
getValueAt
public Object getValueAt(int r,
int c)
- Specified by:
getValueAt
in interface TableModel
- Overrides:
getValueAt
in class AbstractFilterModel
addMouseListener
public void addMouseListener(JTable table)
removeRow
public void removeRow(int rowNum)
throws ArrayIndexOutOfBoundsException,
IllegalStateException
- Overrides:
removeRow
in class AbstractFilterModel
- Throws:
ArrayIndexOutOfBoundsException
IllegalStateException
sort
public void sort(int columnNumber,
String direction)
- Specified by:
sort
in interface SortableTableModel
tableChanged
public void tableChanged(TableModelEvent e)
- Implements the TableModelListener interface to receive
notifications of * changes to the table model. SortFilterModel needs
to receive events for adding and removing rows.
- Specified by:
tableChanged
in interface TableModelListener
refresh
protected void refresh()
sort
protected void sort(int c)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.