Interface JmixKanbanItems<T>
- Type Parameters:
T
- type of items contained
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
KanbanItems<T>
- All Known Implementing Classes:
ContainerKanbanItems
,EmptyKanbanItems
,JmixEmptyKanbanItems
,ListKanbanItems
Base interface for
JmixKanban
component items element implementation.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Event sent on changes in the items collection - adding, removing, replacing elements.static enum
Type of items change. -
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) Finds an item by its id.Finds an item by its string id.getItems()
<V> V
getItemValue
(T item, String propertyPath) 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.
-
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:
true
if the underlying collection contains an item,false
otherwise
-
addItemsChangeListener
com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<JmixKanbanItems.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
-