| com.sun.data.provider.TableDataSorter
All known Subclasses: com.sun.data.provider.impl.BasicTableDataSorter,
getSortCriteria | public SortCriteria[] getSortCriteria()(Code) | | Returns the current sort criteria on this data sorter.
SortCriteria[] defining the sort order on this TableDataSorter |
getSortLocale | public Locale getSortLocale()(Code) | | Gets the sort locale used when comparing objects. If none is set,
the default locale should be used via Locale.getDefault() .
The Locale used for comparing objects, or null if the defaultLocale is used. |
setSortCriteria | public void setSortCriteria(SortCriteria[] sortCriteria)(Code) | | Sets the sort criteria on this data sorter.
Parameters: sortCriteria - An array of SortCriteria objects definingthe sort order on this TableDataSorter |
setSortLocale | public void setSortLocale(Locale locale)(Code) | | Sets the sort locale to use when comparing objects. If none is set,
the default locale should be used via Locale.getDefault() .
Parameters: locale - The desired Locale to use for sort comparisons |
sort | public RowKey[] sort(TableDataProvider provider, RowKey[] rows) throws DataProviderException(Code) | | Sorts the rows from the specified
TableDataProvider based on
the current sort criteria, and returns an array of
RowKey s
representing the sorted row order. Any excluded rows from the return
value of sort(...) should be considered unsortable, and thus
should be displayed at the end of whatever UI is presenting these items.
NOTE: If a component is bound to a
TableDataProvider and
an TableDataSorter, which are the *same* instance, this method is never
called. The sort order is assumed to be intrinsic in the row key order
of the
TableDataProvider , based on the currently set sort
criteria.
Parameters: provider - The TableDataProvider to sort Parameters: rows - The array of RowKeys to sort. If this isnull then the return value should benull or an empty array of RowKeys. An array of RowKeys representing the sorted rows fromthe specified TableDataProvider. Any excluded rowsfrom the return value of this method should be consideredunsortable, and thus should be displayed at the end of whateverUI is presenting these items. null may be returnedto indicate that sorting is not possible. throws: DataProviderException - Implementations may wish to surfaceinternal exceptions (nested in DataProviderException) ratherthan simply returning null or an empty array. A DPE may alsoindicate that the passed TableDataProvider or RowKeys are notvalid. Consult the documentation of the specific TableDataSorterimplementation for details on what exceptions might be wrapped bya DPE. |
|
|