public class SortableListModel<T> extends SimpleListModel<T> implements ISortableTableModel, ITruncateableDataModel
DEFAULT_MAX_SIZE, IN_MEMORY_FILTER_OR_SORT_MAX_SIZE| Constructor and Description |
|---|
SortableListModel(Class<T> clz,
List<T> list) |
| Modifier and Type | Method and Description |
|---|---|
Class<T> |
getDataClass()
Returns the type of the record contained in the list.
|
String |
getSortKey()
DO NOT USE: Whomever uses the model should define sorting and remember it.
|
boolean |
isSortDescending()
DO NOT USE: Whomever uses the model should define sorting and remember it.
|
boolean |
isTruncated()
Return true if the result is truncated.
|
void |
setComparator(Comparator<T> comparator)
Sets a new comparator to use.
|
void |
setTruncated(boolean tr) |
void |
sortOn(String key,
boolean descending) |
getListadd, add, delete, delete, getComparator, getItem, getItems, getRows, indexOf, modified, modified, moveaddChangeListener, fireAdded, fireDeleted, fireModelChanged, fireModified, getListeners, refresh, removeChangeListenerpublic Class<T> getDataClass()
public void sortOn(String key, boolean descending) throws Exception
sortOn in interface ISortableTableModelExceptionpublic void setComparator(Comparator<T> comparator) throws Exception
TableListModelBasesetComparator in class TableListModelBase<T>Exceptionpublic String getSortKey()
ISortableTableModelgetSortKey in interface ISortableTableModelpublic boolean isSortDescending()
ISortableTableModelisSortDescending in interface ISortableTableModelpublic boolean isTruncated()
ITruncateableDataModelisTruncated in interface ITruncateableDataModelpublic void setTruncated(boolean tr)
Copyright © 2017 etc.to. All rights reserved.