VALUE - is the generic type of the selectable values.public interface UiFeatureSelectedValue<VALUE> extends UiFeature, AttributeWriteSelectedValue<VALUE>, AttributeWriteSelectionMode
features of an object that offers
selection of values. Additionally, it allows to
add and
remove instances of
UiHandlerEventSelection.| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionHandler(UiHandlerEventSelection<VALUE> handler)
This method adds the given
UiHandlerEventSelection to this object. |
boolean |
isSelected(SelectionChoice choice)
This method determines if the given logical
SelectionChoice is currently selected. |
boolean |
removeSelectionHandler(UiHandlerEventSelection<VALUE> handler)
This method removes the given
UiHandlerEventSelection from this object. |
boolean |
setSelection(SelectionChoice choice,
SelectionOperation operation)
This method allows to change the selection of a logical
SelectionChoice in a generic way. |
setSelectedValue, setSelectedValuesgetSelectedValue, getSelectedValues, getSelectionCount, hasSelectedValuesetSelectionModegetSelectionModevoid addSelectionHandler(UiHandlerEventSelection<VALUE> handler)
UiHandlerEventSelection to this object.handler - is the UiHandlerEventSelection to add.boolean removeSelectionHandler(UiHandlerEventSelection<VALUE> handler)
UiHandlerEventSelection from this object.handler - is the UiHandlerEventSelection to remove.true if the handler has been removed successfully, false
if it was NOT registered and nothing has
changed.boolean setSelection(SelectionChoice choice, SelectionOperation operation)
SelectionChoice in a generic way. The
following table shows the combinations and their effect:
| choice | operation | setSelection(choice, operation) | multi selection only |
|---|---|---|---|
SelectionChoice.ALL |
SelectionOperation.SET |
selects all items. | yes |
SelectionChoice.ALL |
SelectionOperation.ADD |
same effect as above. | yes |
SelectionChoice.ALL |
SelectionOperation.REMOVE |
de-selects all items so none is selected. | yes |
SelectionChoice.ALL |
SelectionOperation.TOGGLE |
toggles the selection of all items so the selection gets inverted. | yes |
SelectionChoice.FIRST |
SelectionOperation.SET |
clears the selection and then selects the first item. | no |
SelectionChoice.FIRST |
SelectionOperation.ADD |
Adds the first item to the current selection. |
yes |
SelectionChoice.FIRST |
SelectionOperation.REMOVE |
Removes the first item from the current selection. |
no |
SelectionChoice.FIRST |
SelectionOperation.TOGGLE |
Toggles the selection of the first item. | no |
SelectionChoice.LAST |
SelectionOperation.SET |
clears the selection and then selects the last item. | no |
SelectionChoice.LAST |
SelectionOperation.ADD |
Adds the last item to the current selection. |
yes |
SelectionChoice.LAST |
SelectionOperation.REMOVE |
Removes the last item from the current selection. |
no |
SelectionChoice.LAST |
SelectionOperation.TOGGLE |
Toggles the selection of the last item. | no |
choice - is the SelectionChoice indicating the items to select or deselect.operation - is the SelectionOperation indicating what to do with the choice.true if the operation was successful, false otherwise. If there are no
items at all true is returned in case of SelectionChoice.ALL and
false otherwise.boolean isSelected(SelectionChoice choice)
SelectionChoice is currently selected.choice - is the SelectionChoice to check.true if the items identified by the given choice are currently
selected, false otherwise (if at least one of them is NOT selected).Copyright © 2001–2016 mmm-Team. All rights reserved.