public interface IContentProviderAPI<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> extends IContentProvider<ITEM,ITEM_CONTENT>
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
ITEM_CONTENT item)
Inserts a new item before the specified index.
|
default void |
add(ITEM_CONTENT item)
Adds a new item to the end of the list.
|
String |
clearSelection()
Clear the selection.
|
ITEM_CONTENT |
get(int index)
Gets an item at the specified index.
|
ITEM_CONTENT[] |
getAll()
Gets all items.
|
int |
getFirstSelectedIndex()
Gets the first selected index.
|
int[] |
getSelectedIndicies()
Gets the selected indicies.
|
int |
indexOf(ITEM_CONTENT item)
Returns the index of an item.
|
void |
onSelectionChanged(ITEM_CONTENT item,
boolean isSelected)
Called from the items when they are selected or unselected from their
setSelection(boolean) method. |
ITEM_CONTENT |
remove(int index)
Removes an item at the specified index.
|
boolean |
remove(ITEM_CONTENT item)
Removes an item.
|
boolean |
removeAll()
Removes all items.
|
String |
setSelection(int index)
Sets the selection as a single selected item at specified index.
|
String |
setSelection(int[] indicies)
Sets the selection to the specified indicies.
|
beginChanges, canModifyWithAPI, commitChanges, dispose, getItemCount, getItemsContainer, initialize, onAdded, onRemoved, onSelectionTypeChanged, reinitialize, updateContents
default void add(ITEM_CONTENT item)
item
- The item to insert.void add(int index, ITEM_CONTENT item)
index
- The insertion point index, -1 for last.item
- The item to insert.IndexOutOfBoundsException
- If the index is not valid.ITEM_CONTENT remove(int index)
index
- The item to remove.IndexOutOfBoundsException
- If the index is not valid.boolean remove(ITEM_CONTENT item)
item
- The item to remove.boolean removeAll()
ITEM_CONTENT get(int index)
index
- The index of the item.IndexOutOfBoundsException
- If the index is not valid.ITEM_CONTENT[] getAll()
getAll
in interface IContentProvider<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>>
int indexOf(ITEM_CONTENT item)
item
- The item to look-up.int getFirstSelectedIndex()
int[] getSelectedIndicies()
String setSelection(int index)
index
- The single item to select at index, -1 to clear the selection.String setSelection(int[] indicies)
indicies
- The indicies.String clearSelection()
void onSelectionChanged(ITEM_CONTENT item, boolean isSelected)
setSelection(boolean)
method.
The method is NOT intended to be called.
item
- The item who's selection changed.isSelected
- The new selection state.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.