Module is.codion.common.model
Package is.codion.common.model.selection
Interface MultiSelection.IndexStore
- Enclosing interface:
MultiSelection<T>
public static interface MultiSelection.IndexStore
The selected indexes a MultiSelection is a view over, the one part of a selection that differs per toolkit.
A store notifies changing() before and changed() after its indexes change, whoever
changed them, the selection deriving its index and item values from get() on each changed().
- See Also:
-
Method Summary
-
Method Details
-
get
- Returns:
- an unmodifiable snapshot of the selected indexes, iterated in ascending order
-
set
Replaces the selected indexes. A no-op if they are unchanged, otherwise
changing()is notified before andchanged()after, the latter at the end of the adjustment whilegrouping().Under
singleSelection()only the highest of the given indexes is selected.- Parameters:
indexes- the indexes to select
-
size
int size()- Returns:
- the number of stored indexes
-
contains
boolean contains(int index) - Parameters:
index- the index- Returns:
- true if the given index is selected
-
singleSelection
State singleSelection()- Returns:
- the
Statecontrolling single selection mode, the selection is cleared when it changes
-
grouping
MultiSelection.Grouping grouping()- Returns:
- the
MultiSelection.Groupinginstance
-
changing
Observer<?> changing()- Returns:
- an observer notified before the selected indexes change
-
changed
Observer<?> changed()- Returns:
- an observer notified after the selected indexes changed, by whoever changed them
-
adjusting
Observer<?> adjusting()- Returns:
- an observer notified on every change to the selected indexes, grouped or not, as the changes happen
- See Also:
-