Class ListKanbanItems<T>
java.lang.Object
io.jmix.kanbanflowui.component.data.ListKanbanItems<T>
- All Implemented Interfaces:
DataUnit
,HasType<T>
,KanbanItems<T>
,JmixKanbanItems<T>
,Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.kanbanflowui.kit.component.data.JmixKanbanItems
JmixKanbanItems.ItemsChangeEvent<T>, JmixKanbanItems.ItemsChangeType
-
Field Summary
-
Constructor Summary
ConstructorDescriptionListKanbanItems
(String idAttribute, Class<?> idType) ListKanbanItems
(String idAttribute, Class<?> idType, Collection<T> items) ListKanbanItems
(String idAttribute, Class<?> idType, T... items) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds passed item to the list.void
addItems
(Collection<T> items) Adds passed items to the list.final void
Adds passed items to the list.com.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.com.vaadin.flow.shared.Registration
Registers a new state change listener.boolean
containsItem
(T item) protected Object
deserializeId
(String stringValue) protected void
fireChangeEvent
(JmixKanbanItems.ItemsChangeType operationType, Collection<T> items) protected EventBus
Finds an item by its id.Finds an item by its string id.getItems()
<V> V
getItemValue
(T item, String propertyPath) protected MethodsCache
getMethodsCache
(Object object) getState()
getType()
protected Object
getValueInternal
(T item, String path) void
Removes all items.void
removeItem
(T item) Removes the passed item from the list.void
setItemValue
(T item, String propertyPath, Object value) Sets the value to the item.protected void
setValueInternal
(T item, String path, Object value) void
updateItem
(T item) If the item with the same id exists, it is replaced with the given instance.
-
Field Details
-
items
-
idAttribute
-
idType
-
-
Constructor Details
-
ListKanbanItems
-
ListKanbanItems
-
ListKanbanItems
-
-
Method Details
-
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
-
getItems
- Specified by:
getItems
in interfaceJmixKanbanItems<T>
- Returns:
- unmodifiable collection of items
-
getItemValue
- Specified by:
getItemValue
in interfaceJmixKanbanItems<T>
- Parameters:
item
- the itempropertyPath
- the property path- Returns:
- the item value
-
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
-
getItemId
- Specified by:
getItemId
in interfaceJmixKanbanItems<T>
- Parameters:
item
- the item- Returns:
- the id of the item
-
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
-
addItem
Adds passed item to the list.- Parameters:
item
- item to add
-
addItems
Adds passed items to the list.- Parameters:
items
- items to add
-
addItems
Adds passed items to the list.- Parameters:
items
- items to add
-
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
-
removeItem
Removes the passed item from the list.- Parameters:
item
- item to remove
-
removeAll
public void removeAll()Removes all items. -
containsItem
- Specified by:
containsItem
in interfaceJmixKanbanItems<T>
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
getType
-
getState
-
addStateChangeListener
public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener) Description copied from interface:DataUnit
Registers a new state change listener.- Specified by:
addStateChangeListener
in interfaceDataUnit
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
getValueInternal
-
setValueInternal
-
deserializeId
-
getMethodsCache
-
fireChangeEvent
-
getEventBus
-