public class ListSelectionModels extends Object
ListSelectionModel instances| Modifier and Type | Method and Description |
|---|---|
static void |
addToSelection(ListSelectionModel selectionModel,
Collection<? extends Integer> selectedIndices)
Add the given indices to the selection in the given list selection model
|
static List<Integer> |
computeSelectedIndices(ListSelectionModel selectionModel)
Compute the list of all indices that are selected in the given
selection model
|
static List<Integer> |
computeUnselectedIndices(ListSelectionModel selectionModel,
int size)
Compute the list of all indices that are unselected in the given
selection model
|
static void |
removeFromSelection(ListSelectionModel selectionModel,
Collection<? extends Integer> unselectedIndices)
Remove the given indices from the selection in the given list
selection model
|
static void |
setAsSelection(ListSelectionModel selectionModel,
Collection<? extends Integer> selectedIndices)
Set the given indices as the selection in the given list selection model
|
public static void setAsSelection(ListSelectionModel selectionModel, Collection<? extends Integer> selectedIndices)
selectionModel - The list selection modelselectedIndices - The selected indicespublic static void addToSelection(ListSelectionModel selectionModel, Collection<? extends Integer> selectedIndices)
selectionModel - The list selection modelselectedIndices - The selected indicespublic static void removeFromSelection(ListSelectionModel selectionModel, Collection<? extends Integer> unselectedIndices)
selectionModel - The list selection modelunselectedIndices - The unselected indicespublic static List<Integer> computeUnselectedIndices(ListSelectionModel selectionModel, int size)
selectionModel - The list selection modelsize - The size (number of indices) to assumepublic static List<Integer> computeSelectedIndices(ListSelectionModel selectionModel)
selectionModel - The list selection modelCopyright © 2022. All rights reserved.