Package io.jmix.ui.component.data.tree
Class ContainerTreeItems<E>
java.lang.Object
io.jmix.ui.component.data.tree.ContainerTreeItems<E>
- All Implemented Interfaces:
- DataUnit,- ContainerDataUnit<E>,- EntityDataUnit,- EntityTreeItems<E>,- TreeItems<E>
public class ContainerTreeItems<E>
extends Object
implements EntityTreeItems<E>, ContainerDataUnit<E>
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.jmix.ui.component.data.DataUnitDataUnit.StateChangeEventNested classes/interfaces inherited from interface io.jmix.ui.component.data.TreeItemsTreeItems.ItemSetChangeEvent<T>, TreeItems.SelectedItemChangeEvent<T>, TreeItems.ValueChangeEvent<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final CollectionContainer<E>protected EventHubprotected final Stringprotected final boolean
- 
Constructor SummaryConstructorsConstructorDescriptionContainerTreeItems(CollectionContainer<E> container, String hierarchyProperty) ContainerTreeItems(CollectionContainer<E> container, String hierarchyProperty, boolean showOrphans) 
- 
Method SummaryModifier and TypeMethodDescriptionRegisters a new item set change listener.Registers a new selected item change listener.Registers a new state change listener.addValueChangeListener(Consumer<TreeItems.ValueChangeEvent<E>> listener) Registers a new value change listener.protected voidprotected voidprotected voidbooleancontainsItem(E item) intgetChildCount(E parent) getChildren(E item) getItems()getState()booleanhasChildren(E item) voidsetSelectedItem(E item) Set current item in the source.intsize()
- 
Field Details- 
container
- 
hierarchyProperty
- 
showOrphansprotected final boolean showOrphans
- 
events
 
- 
- 
Constructor Details- 
ContainerTreeItemspublic ContainerTreeItems(CollectionContainer<E> container, String hierarchyProperty, boolean showOrphans) 
- 
ContainerTreeItems
 
- 
- 
Method Details- 
containerItemChanged
- 
containerCollectionChanged
- 
containerItemPropertyChanged
- 
getEntityMetaClass- Specified by:
- getEntityMetaClassin interface- EntityDataUnit
- Returns:
- MetaClassof an entity contained in the source
 
- 
getSelectedItem- Specified by:
- getSelectedItemin interface- EntityTreeItems<E>
- Returns:
- the current item contained in the source
 
- 
setSelectedItemDescription copied from interface:EntityTreeItemsSet current item in the source.- Specified by:
- setSelectedItemin interface- EntityTreeItems<E>
- Parameters:
- item- the item to set
 
- 
getState
- 
getItemId
- 
getItem
- 
getItems
- 
containsItem- Specified by:
- containsItemin interface- TreeItems<E>
- Parameters:
- item- an item to check
- Returns:
- trueif the underlying collection contains an item,- falseotherwise
 
- 
sizepublic int size()
- 
getChildCount- Specified by:
- getChildCountin interface- TreeItems<E>
- Parameters:
- parent- the parent item
- Returns:
- child count of the given parent item
 
- 
getChildren- Specified by:
- getChildrenin interface- TreeItems<E>
- Parameters:
- item- the item to obtain children or- nullto get root items
- Returns:
- children of the given item
 
- 
hasChildren- Specified by:
- hasChildrenin interface- TreeItems<E>
- Parameters:
- item- the item to check
- Returns:
- trueif the item has children,- falseotherwise
 
- 
getParent
- 
getHierarchyPropertyName- Specified by:
- getHierarchyPropertyNamein interface- TreeItems<E>
- Returns:
- the name of the property which forms the hierarchy
 
- 
addStateChangeListenerDescription copied from interface:DataUnitRegisters a new state change listener.- Specified by:
- addStateChangeListenerin interface- DataUnit
- Parameters:
- listener- the listener to be added
- Returns:
- a registration object for removing an event listener added to a source
 
- 
addValueChangeListenerDescription copied from interface:TreeItemsRegisters a new value change listener.- Specified by:
- addValueChangeListenerin interface- TreeItems<E>
- Parameters:
- listener- the listener to be added
- Returns:
- a registration object for removing an event listener added to a source
 
- 
addItemSetChangeListenerDescription copied from interface:TreeItemsRegisters a new item set change listener.- Specified by:
- addItemSetChangeListenerin interface- TreeItems<E>
- Parameters:
- listener- the listener to be added
- Returns:
- a registration object for removing an event listener added to a source
 
- 
addSelectedItemChangeListenerpublic Subscription addSelectedItemChangeListener(Consumer<TreeItems.SelectedItemChangeEvent<E>> listener) Description copied from interface:TreeItemsRegisters a new selected item change listener.- Specified by:
- addSelectedItemChangeListenerin interface- TreeItems<E>
- Parameters:
- listener- the listener to be added
- Returns:
- a registration object for removing an event listener added to a source
 
- 
getContainer- Specified by:
- getContainerin interface- ContainerDataUnit<E>
 
 
-