org.xnap.gui.table
Interface SortableModel

All Known Implementing Classes:
AbstractColumnTableModel, AbstractColumnTreeTableModel, AbstractSortableTableModel, AzureusTrackerTableModel, ChannelTableModel, ChatPeerTableModel, DefaultColumnTreeTableModel, FilteredTransferTableModel, FreewayPanel.FreewayStatsTableModel, HotlistTableModel, JTellaConnectionTableModel, LibraryTableModel, LimeWireConnectionTableModel, OpenNapServerTableModel, OpenNapWhoisTableModel, PeerTableModel, PircBotServerTableModel, SearchTableModel, TransferTableModel, ZipFileTableModel

public interface SortableModel

Defines the requirements for tables that can be sorted.

See Also:
TableHeaderHandler

Method Summary
 java.lang.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.
 boolean isSortedAscending()
          Returns true, if the table is sorted in ascending order.
 void setMaintainSortOrder(boolean maintainSortOrder)
          Sets the maintain sort order flag.
 boolean sortByColumn(int column, boolean ascending, boolean revert)
          Sort the table by column.
 

Method Detail

getColumnClass

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

See Also:
TableHeaderHandler.sortByColumn(int)

getSortedColumn

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


isSortedAscending

boolean isSortedAscending()
Returns true, if the table is sorted in ascending order.


setMaintainSortOrder

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


sortByColumn

boolean sortByColumn(int column,
                     boolean ascending,
                     boolean revert)
Sort the table by column.

Parameters:
column - the column to sort
ascending - true, if table needs to be sorted in ascending order; false, if in descending order
revert - automatically revert sort order
Returns:
true, if table was sorted ascending; false, if descending


Copyright © 2001-2005 XNap Team. All Rights Reserved.