SPT Core API

com.sptci.echo2.table
Interface SortableTableModel<D>

Type Parameters:
D - The class of the model object backing the model.
All Known Implementing Classes:
DatabaseTableModel, DefaultSortableTableModel, JDOFilterTableModel, JDOTableModel, StatementTableModel, TransactionalJDOTableModel

public interface SortableTableModel<D>

A genericised TableModel used to hold instances of objects of the type specified. Contains additional methods to sort the contents of the model.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: SortableTableModel.java 4120 2008-05-25 20:49:48Z rakesh $
Author:
Rakesh Vidyadharan 2007-11-12

Nested Class Summary
static class SortableTableModel.Direction
          The direction in which the current column is sorted.
 
Method Summary
 SortableTableModel.Direction getSortDirection(int column)
          Return the sort direction for the specified column.
 void sort(int column)
          Sort the data by the values in the specified column index.
 void sort(int column, SortableTableModel.Direction direction)
          Sort the data by the values in the specified column index.
 

Method Detail

getSortDirection

SortableTableModel.Direction getSortDirection(int column)
Return the sort direction for the specified column.

Parameters:
column - The column whose sort direction is to be returned.
Returns:
The sort direction for the column. Return null if no sort directive is available.

sort

void sort(int column)
Sort the data by the values in the specified column index. The SortableTableModel.Direction of sorting is inferred from the current sort order.

Parameters:
column - The index of the column by which the data is to be sorted.
See Also:
AbstractTableModel.fireTableDataChanged()

sort

void sort(int column,
          SortableTableModel.Direction direction)
Sort the data by the values in the specified column index.

Parameters:
column - The index of the column by which the data is to be sorted.
direction - The direction in which the data is to be sorted.
See Also:
AbstractTableModel.fireTableDataChanged()

SPT Core API