org.xnap.commons.gui.table
Interface SortableModel

All Known Implementing Classes:
TableSorter

public interface SortableModel

Defines the requirements for tables that can be sorted.

See Also:
TableLayout

Nested Class Summary
static class SortableModel.Order
           
 
Method Summary
 Class getColumnClass(int index)
          Returns the class of the data objects in column at index.
 int getSortedColumn()
          Returns the index of the column that was sorted last.
 SortableModel.Order getSortOrder()
           
 void setMaintainSortOrder(boolean maintainSortOrder)
          Sets the maintain sort order flag.
 void setSortOrder(SortableModel.Order newValue)
           
 SortableModel.Order sortByColumn(int column, SortableModel.Order sortOrder, boolean revert)
          Sort the table by column.
 

Method Detail

getColumnClass

Class getColumnClass(int index)
Returns the class of the data objects in column at index.


getSortedColumn

int getSortedColumn()
Returns the index of the column that was sorted last.


getSortOrder

SortableModel.Order getSortOrder()

setMaintainSortOrder

void setMaintainSortOrder(boolean maintainSortOrder)
Sets the maintain sort order flag.


setSortOrder

void setSortOrder(SortableModel.Order newValue)

sortByColumn

SortableModel.Order sortByColumn(int column,
                                 SortableModel.Order sortOrder,
                                 boolean revert)
Sort the table by column.

Parameters:
column - the column to sort
sortOrder - the sort order to sory by
revert - automatically revert sort order
Returns:
order the new sort order


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.