public abstract class TableListModelBase<T> extends TableModelBase<T> implements IModifyableTableModel<T>
DEFAULT_MAX_SIZE, IN_MEMORY_FILTER_OR_SORT_MAX_SIZE| Constructor and Description |
|---|
TableListModelBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T row)
Add the item at the specified index.
|
void |
add(T row)
Add the item at the end (or the appropriate location wrt the sort order) of the list.
|
T |
delete(int index)
Delete the object at the specified index.
|
boolean |
delete(T val) |
Comparator<T> |
getComparator()
When set the list will be kept ordered.
|
T |
getItem(int index) |
List<T> |
getItems(int start,
int end) |
protected abstract List<T> |
getList() |
int |
getRows()
This must return the total #of rows in this table.
|
int |
indexOf(T val) |
void |
modified(int index) |
void |
modified(T val) |
void |
move(int to,
int from)
Convenience method to move an item from index from to index to.
|
void |
setComparator(Comparator<T> comparator)
Sets a new comparator to use.
|
addChangeListener, fireAdded, fireDeleted, fireModelChanged, fireModified, getListeners, refresh, removeChangeListener@Nonnull public List<T> getItems(int start, int end) throws Exception
getItems in interface ITableModel<T>Exceptionpublic T getItem(int index) throws Exception
getItem in class TableModelBase<T>Exceptionpublic int getRows()
throws Exception
ITableModelgetRows in interface ITableModel<T>Exceptionpublic Comparator<T> getComparator()
public void setComparator(Comparator<T> comparator) throws Exception
comparator - Exceptionpublic void add(int index,
@Nonnull
T row)
throws Exception
add in interface IModifyableTableModel<T>Exceptionpublic void add(@Nonnull T row) throws Exception
add in interface IModifyableTableModel<T>Exceptionpublic T delete(int index) throws Exception
delete in interface IModifyableTableModel<T>index - Exceptionpublic boolean delete(@Nonnull T val) throws Exception
delete in interface IModifyableTableModel<T>ExceptionCopyright © 2017 etc.to. All rights reserved.