Class JmixEmptyKanbanItems<T>
java.lang.Object
io.jmix.kanbanflowui.kit.component.data.JmixEmptyKanbanItems<T>
- Type Parameters:
T
- type of items contained
- All Implemented Interfaces:
JmixKanbanItems<T>
,Serializable
- Direct Known Subclasses:
EmptyKanbanItems
Empty data provider for a
JmixKanban
component.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.kanbanflowui.kit.component.data.JmixKanbanItems
JmixKanbanItems.ItemsChangeEvent<T>, JmixKanbanItems.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> JmixEmptyKanbanItems<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
-
JmixEmptyKanbanItems
public JmixEmptyKanbanItems()
-
-
Method Details
-
getInstance
- Type Parameters:
T
- type of items contained- Returns:
- instance of the
JmixEmptyKanbanItems
-
getItems
- Specified by:
getItems
in interfaceJmixKanbanItems<T>
- Returns:
- unmodifiable collection of items
-
getItem
Description copied from interface:JmixKanbanItems
Finds an item by its id.- Specified by:
getItem
in interfaceJmixKanbanItems<T>
- Parameters:
itemId
- the item id- Returns:
- the item by the given id
-
getItem
Description copied from interface:JmixKanbanItems
Finds an item by its string id.- Specified by:
getItem
in interfaceJmixKanbanItems<T>
- Parameters:
stringId
- the item string id- Returns:
- the item by the given id
-
getItemValue
- Specified by:
getItemValue
in interfaceJmixKanbanItems<T>
- Parameters:
itemId
- the itempropertyId
- the property path- Returns:
- the item value
-
getItemId
- Specified by:
getItemId
in interfaceJmixKanbanItems<T>
- Parameters:
item
- the item- Returns:
- the id of the item
-
setItemValue
Description copied from interface:JmixKanbanItems
Sets the value to the item.- Specified by:
setItemValue
in interfaceJmixKanbanItems<T>
- Parameters:
item
- the itempropertyPath
- the property pathvalue
- the value to set
-
updateItem
Description copied from interface:JmixKanbanItems
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 interfaceJmixKanbanItems<T>
- Parameters:
item
- item to update
-
containsItem
- Specified by:
containsItem
in interfaceJmixKanbanItems<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<JmixKanbanItems.ItemsChangeEvent<T>> listener) Description copied from interface:JmixKanbanItems
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 interfaceJmixKanbanItems<T>
- Parameters:
listener
- a listener to add- Returns:
- a handle that can be used for removing the listener
-