Class JmixEmptyPivotTableItems<T>
java.lang.Object
io.jmix.pivottableflowui.kit.data.JmixEmptyPivotTableItems<T>
- Type Parameters:
T
- type of items contained
- All Implemented Interfaces:
JmixPivotTableItems<T>
,Serializable
- Direct Known Subclasses:
EmptyPivotTableItems
Empty data provider for a
JmixPivotTable
component.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.pivottableflowui.kit.data.JmixPivotTableItems
JmixPivotTableItems.ItemsChangeEvent<T>, JmixPivotTableItems.ItemsChangeType
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Adds a listener that will be called when the associated collection or the property of an item of this collection changes.boolean
containsItem
(T item) static <T> JmixEmptyPivotTableItems<T>
Finds an item by its id.Finds an item by its string id.getItems()
<V> V
getItemValue
(T itemId, String propertyId) void
setItemValue
(T item, String propertyPath, Object value) Sets the value to the item.void
updateItem
(T item) If the item with the same id exists, it is replaced with the given instance.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
JmixEmptyPivotTableItems
public JmixEmptyPivotTableItems()
-
-
Method Details
-
getInstance
- Type Parameters:
T
- type of items contained- Returns:
- instance of the
JmixEmptyPivotTableItems
-
getItems
- Specified by:
getItems
in interfaceJmixPivotTableItems<T>
- Returns:
- unmodifiable collection of items
-
getItem
Description copied from interface:JmixPivotTableItems
Finds an item by its id.- Specified by:
getItem
in interfaceJmixPivotTableItems<T>
- Parameters:
itemId
- the item id- Returns:
- the item by the given id
-
getItem
Description copied from interface:JmixPivotTableItems
Finds an item by its string id.- Specified by:
getItem
in interfaceJmixPivotTableItems<T>
- Parameters:
stringId
- the item string id- Returns:
- the item by the given id
-
getItemValue
- Specified by:
getItemValue
in interfaceJmixPivotTableItems<T>
- Parameters:
itemId
- the itempropertyId
- the property path- Returns:
- the item value
-
getItemId
- Specified by:
getItemId
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- the item- Returns:
- the id of the item
-
setItemValue
Description copied from interface:JmixPivotTableItems
Sets the value to the item.- Specified by:
setItemValue
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- the itempropertyPath
- the property pathvalue
- the value to set
-
updateItem
Description copied from interface:JmixPivotTableItems
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.- Specified by:
updateItem
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- item to update
-
containsItem
- Specified by:
containsItem
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
addItemsChangeListener
public com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<JmixPivotTableItems.ItemsChangeEvent<T>> listener) Description copied from interface:JmixPivotTableItems
Adds a listener that will be called when the associated collection or the property of an item of this collection changes.- Specified by:
addItemsChangeListener
in interfaceJmixPivotTableItems<T>
- Parameters:
listener
- a listener to add- Returns:
- a handle that can be used for removing the listener
-