Package com.vaadin.client.connectors
Interface AbstractMultiSelectConnector.MultiSelectWidget
-
- All Known Implementing Classes:
VListSelect,VTwinColSelect
- Enclosing class:
- AbstractMultiSelectConnector
public static interface AbstractMultiSelectConnector.MultiSelectWidgetAbstraction layer to help populate different multiselect widgets based on same JSON data.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description RegistrationaddSelectionChangeListener(BiConsumer<Set<String>,Set<String>> selectionChangeListener)Adds a selection change listener the select.static StringgetCaption(elemental.json.JsonObject item)Returns the caption for the given item.static Optional<String>getIconUrl(elemental.json.JsonObject item)Returns the optional icon URL for the given item.static StringgetKey(elemental.json.JsonObject item)Returns the key for the given item.static booleanisEnabled(elemental.json.JsonObject item)Returns whether the given item is enabled or not.static booleanisSelected(elemental.json.JsonObject item)Returns whether this item is selected or not.voidsetItems(List<elemental.json.JsonObject> items)Sets the given items to the select.
-
-
-
Method Detail
-
setItems
void setItems(List<elemental.json.JsonObject> items)
Sets the given items to the select.- Parameters:
items- the items for the select
-
addSelectionChangeListener
Registration addSelectionChangeListener(BiConsumer<Set<String>,Set<String>> selectionChangeListener)
Adds a selection change listener the select.- Parameters:
selectionChangeListener- the listener to add, notnull- Returns:
- a registration handle to remove the listener
-
getCaption
static String getCaption(elemental.json.JsonObject item)
Returns the caption for the given item.- Parameters:
item- the item, notnull- Returns:
- caption of the item
-
getKey
static String getKey(elemental.json.JsonObject item)
Returns the key for the given item.- Parameters:
item- the item, notnull- Returns:
- key of the item
-
isEnabled
static boolean isEnabled(elemental.json.JsonObject item)
Returns whether the given item is enabled or not.Disabling items is not supported by all multiselects.
- Parameters:
item- the item, notnull- Returns:
trueenabled,falseif not
-
isSelected
static boolean isSelected(elemental.json.JsonObject item)
Returns whether this item is selected or not.- Parameters:
item- the item, notnull- Returns:
trueis selected,falseif not
-
-