Package com.macrofocus.selection
Interface MutableSelection<E>
-
- All Superinterfaces:
java.lang.Iterable<E>
,Selection<E>
- All Known Subinterfaces:
MutableSingleSelection<E>
- All Known Implementing Classes:
AbstractMutableSelection
,AbstractMutableSingleSelection
,BeanSingleSelection
,NullSelection
,NullSingleSelection
,PropertySingleSelection
,SimpleSelection
,SimpleSingleSelection
@JsType public interface MutableSelection<E> extends Selection<E>
Defines the requirements for a selection that can change.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
clearSelection()
Change the selection to the empty set.void
setEnabled(boolean enabled)
boolean
setSelected(boolean selected, E... elements)
Set the selection state.void
setSelected(E element)
void
setSelected(E element, boolean selected)
boolean
setSelected(java.lang.Iterable<E> elements, boolean selected)
Set the selection state.void
setSelectedElements(E... elements)
void
setSelectedIterable(java.lang.Iterable<E> elements)
-
Methods inherited from interface com.macrofocus.selection.Selection
addSelectionListener, addWeakSelectionListener, getSelectedCount, getSelectedSet, isActive, isEnabled, isSelected, removeSelectionListener, removeSelectionListeners
-
-
-
-
Method Detail
-
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
@JsIgnore void setSelected(E element)
-
setSelected
@JsIgnore void setSelected(E element, boolean selected)
-
setSelected
@JsIgnore boolean setSelected(java.lang.Iterable<E> elements, boolean selected)
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.
-
setSelected
@JsIgnore boolean setSelected(boolean selected, E... elements)
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
@JsIgnore void setSelectedElements(E... elements)
-
setSelectedIterable
@JsIgnore void setSelectedIterable(java.lang.Iterable<E> elements)
-
setEnabled
@JsIgnore void setEnabled(boolean enabled)
-
-