Module is.codion.common.model
Package is.codion.common.model.selection
Interface MultiItemSelection.Indexes
- Enclosing interface:
- MultiItemSelection<T>
Manages the selected indexes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int index) Adds the given index to the selected indexesvoid
add
(Collection<Integer> indexes) Adds these indexes to the selectionboolean
contains
(int index) void
moveDown()
Moves all selected indexes down one index, wraps around.void
moveUp()
Moves all selected indexes up one index, wraps around.void
remove
(int index) Removes the given index from the selectionvoid
remove
(Collection<Integer> indexes) Removes the given indexes from the selectionvoid
set
(Collection<Integer> indexes) Methods inherited from interface is.codion.common.observer.Observable
addConsumer, addListener, addWeakConsumer, addWeakListener, get, observer, optional, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
-
Method Details
-
set
- Parameters:
indexes
- the indexes to select
-
add
void add(int index) Adds the given index to the selected indexes- Parameters:
index
- the index
-
remove
void remove(int index) Removes the given index from the selection- Parameters:
index
- the index
-
add
Adds these indexes to the selection- Parameters:
indexes
- the indexes to add to the selection
-
remove
Removes the given indexes from the selection- Parameters:
indexes
- the indexes
-
contains
boolean contains(int index) - Parameters:
index
- the index- Returns:
- true if the given index is selected
-
moveDown
void moveDown()Moves all selected indexes down one index, wraps around. If the selection is empty the first index is selected. -
moveUp
void moveUp()Moves all selected indexes up one index, wraps around. If the selection is empty the last index is selected.
-