Package com.macrofocus.common.selection
Interface MutableSelection<E>
- All Known Subinterfaces:
MutableSingleSelection<E>
- All Known Implementing Classes:
AbstractMutableSelection,AbstractMutableSingleSelection,BeanSingleSelection,NullSelection,NullSingleSelection,PropertySingleSelection,SimpleSelection,SimpleSingleSelection
Defines the requirements for a selection that can change.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChange the selection to the empty set.voidsetEnabled(boolean enabled) voidsetSelected(E element) voidsetSelectedElements(E... elements) booleansetSelectedElementsState(boolean selected, E... elements) Set the selection state.voidsetSelectedIterable(Iterable<E> elements) booleansetSelectedIterableState(Iterable<E> elements, boolean selected) Set the selection state.voidsetSelectedState(E element, boolean selected) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface com.macrofocus.common.selection.Selection
addSelectionListener, addWeakSelectionListener, getSelectedCount, getSelectedSet, isActive, isEnabled, isSelected, removeSelectionListener, removeSelectionListeners
-
Method Details
-
clearSelection
boolean clearSelection()Change the selection to the empty set. If this represents a change to the current selection then notify each listener.- Returns:
- true, if the set of selected elements was changed.
-
setSelected
-
setSelectedState
-
setSelectedIterableState
Set the selection state.- Parameters:
elements- the elements to changeselected- true to have the elements selected, false otherwise- Returns:
- true, if the set of selected elements was changed.
-
setSelectedElementsState
Set the selection state.- Parameters:
selected- true to have the elements selected, false otherwiseelements- the elements to change- Returns:
- true, if the set of selected elements was changed.
-
setSelectedElements
-
setSelectedIterable
-
setEnabled
void setEnabled(boolean enabled)
-