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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn event that is fired when TreeItems item set is changed.static classAn event that is fired when TreeItems selected item is changed.static classAn 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.booleancontainsItem(T item) intgetChildCount(T parent) getChildren(T item) getItems()booleanhasChildren(T item) intsize()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:
trueif the underlying collection contains an item,falseotherwise
-
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 ornullto get root items- Returns:
- children of the given item
-
hasChildren
- Parameters:
item- the item to check- Returns:
trueif the item has children,falseotherwise
-
getParent
- Parameters:
item- the item to get parent- Returns:
- the parent of given item or
nullif 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
-