FreeHEP API
Version current

org.freehep.swing.table
Interface SortableTableModel

All Superinterfaces:
TableModel
All Known Implementing Classes:
DefaultSortableTableModel

public interface SortableTableModel
extends TableModel

An interface to be implemented by table models which are sortable.

Version:
$Id: SortableTableModel.java,v 1.2 2004/06/22 23:00:20 duns Exp $
Author:
Tony Johnson
See Also:
TableSorter
Source Code:
SortableTableModel.java

Field Summary
static int UNSORTED
           
 
Method Summary
 void sort(int column, boolean ascending)
          Sort the table model using the given column.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Field Detail

UNSORTED

public static final int UNSORTED
See Also:
Constant Field Values
Method Detail

sort

public void sort(int column,
                 boolean ascending)
Sort the table model using the given column. Once this method has been called the table model should reorder its rows so that they are sorted using the given column. The table model should generate appropriate change events to reflect any changes made to the model as a result of the sort. If the table data is modified after sort has been called, the table model should continue to sort the data using the given column.

Parameters:
column - The index of the column to sort on, or UNSORTED if no sort is necessary.
ascending - If true sort in ascending order, else sort in descending order.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.