Package io.jmix.ui.component.data
Interface TreeItems<T>
- All Superinterfaces:
DataUnit
- All Known Subinterfaces:
EntityTreeItems<E>
- All Known Implementing Classes:
ContainerTreeItems
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An event that is fired when TreeItems item set is changed.static class
An event that is fired when TreeItems selected item is changed.static class
An event that is fired when TreeItems value is changed.Nested classes/interfaces inherited from interface io.jmix.ui.component.data.DataUnit
DataUnit.StateChangeEvent
-
Method Summary
Modifier and TypeMethodDescriptionRegisters a new item set change listener.Registers a new selected item change listener.addValueChangeListener
(Consumer<TreeItems.ValueChangeEvent<T>> listener) Registers a new value change listener.boolean
containsItem
(T item) int
getChildCount
(T parent) getChildren
(T item) getItems()
boolean
hasChildren
(T item) int
size()
Methods inherited from interface io.jmix.ui.component.data.DataUnit
addStateChangeListener, getState
-
Method Details
-
getItemId
- Parameters:
item
- the item for obtaining the id- Returns:
- the id on the given item
-
getItem
- Parameters:
itemId
- the item id- Returns:
- the item by the given id
-
getItems
- Returns:
- the stream of all items
-
containsItem
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
size
int size()- Returns:
- size of the underlying collection
-
getChildCount
- Parameters:
parent
- the parent item- Returns:
- child count of the given parent item
-
getChildren
- Parameters:
item
- the item to obtain children ornull
to get root items- Returns:
- children of the given item
-
hasChildren
- Parameters:
item
- the item to check- Returns:
true
if the item has children,false
otherwise
-
getParent
- Parameters:
item
- the item to get parent- Returns:
- the parent of given item or
null
if no parent
-
getHierarchyPropertyName
String getHierarchyPropertyName()- Returns:
- the name of the property which forms the hierarchy
-
addValueChangeListener
Registers a new value change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addItemSetChangeListener
Registers a new item set change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addSelectedItemChangeListener
Registers a new selected item change listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-