Interface JmixPivotTableItems<T>
- Type Parameters:
T- type of items contained
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
PivotTableItems<T>
- All Known Implementing Classes:
ContainerPivotTableItems,EmptyPivotTableItems,JmixEmptyPivotTableItems,ListPivotTableItems
Base interface for
JmixPivotTable component items element implementation.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent sent on changes in the items collection - adding, removing, replacing elements.static enumType of items change. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationAdds a listener that will be called when the associated collection or the property of an item of this collection changes.booleancontainsItem(T item) Finds an item by its id.Finds an item by its string id.getItems()<V> VgetItemValue(T item, String propertyPath) voidsetItemValue(T item, String propertyPath, Object value) Sets the value to the item.voidupdateItem(T item) If the item with the same id exists, it is replaced with the given instance.
-
Method Details
-
getItems
Collection<T> getItems()- Returns:
- unmodifiable collection of items
-
getItem
Finds an item by its id.- Parameters:
itemId- the item id- Returns:
- the item by the given id
-
getItemValue
- Parameters:
item- the itempropertyPath- the property path- Returns:
- the item value
-
getItemId
- Parameters:
item- the item- Returns:
- the id of the item
-
setItemValue
Sets the value to the item.- Parameters:
item- the itempropertyPath- the property pathvalue- the value to set
-
getItem
Finds an item by its string id.- Parameters:
stringId- the item string id- Returns:
- the item by the given id
-
updateItem
If the item with the same id exists, it is replaced with the given instance. If not, the given instance is added to the items list.- Parameters:
item- item to update
-
containsItem
- Parameters:
item- an item to check- Returns:
trueif the underlying collection contains an item,falseotherwise
-
addItemsChangeListener
com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<JmixPivotTableItems.ItemsChangeEvent<T>> listener) Adds a listener that will be called when the associated collection or the property of an item of this collection changes.- Parameters:
listener- a listener to add- Returns:
- a handle that can be used for removing the listener
-