Package org.luwrain.controls
Class CommanderArea.ListModelAdapter<E>
java.lang.Object
org.luwrain.controls.CommanderArea.ListModelAdapter<E>
- All Implemented Interfaces:
ListArea.Model<CommanderArea.Wrapper<E>>
- Enclosing class:
CommanderArea<E>
protected static class CommanderArea.ListModelAdapter<E>
extends Object
implements ListArea.Model<CommanderArea.Wrapper<E>>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionListModelAdapter(CommanderArea.Model<E> model, CommanderArea.Filter<E> filter, Comparator<CommanderArea.NativeItem<E>> comparator) -
Method Summary
-
Field Details
-
model
-
-
Constructor Details
-
ListModelAdapter
public ListModelAdapter(CommanderArea.Model<E> model, CommanderArea.Filter<E> filter, Comparator<CommanderArea.NativeItem<E>> comparator)
-
-
Method Details
-
getItemCount
public int getItemCount()Description copied from interface:ListArea.ModelReturns the total number of items in the model.- Specified by:
getItemCountin interfaceListArea.Model<E>- Returns:
- the item count
-
getItem
Description copied from interface:ListArea.ModelReturns the item at the given index.- Specified by:
getItemin interfaceListArea.Model<E>- Parameters:
index- the zero-based index of the item- Returns:
- the item at that position, or
nullif the index is out of bounds
-
refresh
public void refresh()Description copied from interface:ListArea.ModelCalled when the underlying data has changed and the list needs to be refreshed. Implementations should reload or update their data.- Specified by:
refreshin interfaceListArea.Model<E>
-