Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Nested Class Summary
`private class` | `SortFilterModel.Row`

Field Summary
`private String` | `_sortDirection` These are just here to implement the interface
`private boolean` | `dirty`
`private ArrayList` | `rows`
`private static long` | `serialVersionUID`
`private int` | `sortColumn`

Fields inherited from class org.apache.struts2.components.table.AbstractFilterModel
`model`

Fields inherited from class javax.swing.table.AbstractTableModel
`listenerList`

Fields inherited from interface org.apache.struts2.components.table.SortableTableModel
`ASC, DESC, NONE`

Constructor Summary
`SortFilterModel(TableModel tm)`

Method Summary
`void` | `addMouseListener(JTable table)`
`int` | `getSortedColumnNumber()`
`String` | `getSortedDirection(int columnNumber)`
`Object` | `getValueAt(int r, int c)`
`boolean` | `isCellEditable(int r, int c)`
`protected void` | `refresh()`
`void` | `removeRow(int rowNum)`
`void` | `setModel(TableModel tm)`
`void` | `setValueAt(Object aValue, int r, int c)`
`protected void` | `sort(int c)`
`void` | `sort(int columnNumber, String direction)`
`void` | `tableChanged(TableModelEvent e)` Implements the TableModelListener interface to receive notifications of * changes to the table model.

Methods inherited from class org.apache.struts2.components.table.AbstractFilterModel
`addRow, getColumnClass, getColumnCount, getColumnName, getModel, getRowCount, removeAllRows`

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`

Methods inherited from interface javax.swing.table.TableModel
`addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, removeTableModelListener`

Field Detail

### 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

Constructor Detail

### SortFilterModel

    public SortFilterModel(TableModel tm)

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.