T
- the type of data in the model.public interface FilteredModel<T>
Modifier and Type | Method and Description |
---|---|
void |
addFilteringListener(EventListener listener) |
boolean |
contains(T item,
boolean includeFiltered)
Returns true if this model contains the given item, visible or filtered.
|
void |
filterContents()
Filters the table according to the condition returned by
getFilterCondition() . |
java.util.List<T> |
getAllItems() |
FilterCondition<T> |
getFilterCondition()
Returns the filter condition defined by this model, null if no filter condition has been set.
|
int |
getFilteredItemCount() |
java.util.List<T> |
getFilteredItems() |
int |
getVisibleItemCount() |
java.util.List<T> |
getVisibleItems() |
boolean |
isFiltered(T item)
Returns true if the given item is being filtered in this model, that is, is not visible
|
boolean |
isVisible(T item)
Returns true if the given item is visible, that is, not filtered in this model
|
void |
removeFilteringListener(EventListener listener) |
void |
setFilterCondition(FilterCondition<T> filterCondition)
Sets the filter condition and filters the model
|
void addFilteringListener(EventListener listener)
listener
- a listener notified each time this model is filteredvoid removeFilteringListener(EventListener listener)
listener
- the listener to removevoid filterContents()
getFilterCondition()
.
If no filter condition is specified this method does nothing.
This method does not interfere with the internal ordering of the visible items.FilterCondition<T> getFilterCondition()
void setFilterCondition(FilterCondition<T> filterCondition)
filterCondition
- the FilterCondition to use, null if no filtering should be performedjava.util.List<T> getVisibleItems()
java.util.List<T> getFilteredItems()
java.util.List<T> getAllItems()
int getVisibleItemCount()
int getFilteredItemCount()
boolean contains(T item, boolean includeFiltered)
item
- the itemincludeFiltered
- if true then the filtered items are includedboolean isVisible(T item)
item
- the itemboolean isFiltered(T item)
item
- the item