public class EmptyTreeDataGridItems<E> extends EmptyDataGridItems<E> implements TreeDataGridItems<E>
DataGridItems.ItemSetChangeEvent<T>, DataGridItems.SelectedItemChangeEvent<T>, DataGridItems.Sortable<T>, DataGridItems.ValueChangeEvent<T>
DataUnit.StateChangeEvent
metaClass
Constructor and Description |
---|
EmptyTreeDataGridItems(io.jmix.core.metamodel.model.MetaClass metaClass) |
Modifier and Type | Method and Description |
---|---|
int |
getChildCount(E parent) |
java.util.stream.Stream<E> |
getChildren(E item) |
java.lang.String |
getHierarchyPropertyName()
Returns the property of entity which forms the hierarchy.
|
E |
getParent(E item) |
boolean |
hasChildren(E item) |
void |
resetSortOrder() |
void |
sort(java.lang.Object[] propertyId,
boolean[] ascending) |
addItemSetChangeListener, addSelectedItemChangeListener, addStateChangeListener, addValueChangeListener, containsItem, getEntityMetaClass, getItem, getItemByIndex, getItemId, getItems, getItems, getItemValue, getSelectedItem, getState, indexOfItem, setSelectedItem, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enableSorting, suppressSorting
addItemSetChangeListener, addSelectedItemChangeListener, addValueChangeListener, containsItem, getItem, getItemByIndex, getItemId, getItems, getItems, getItemValue, getSelectedItem, indexOfItem, setSelectedItem, size
addStateChangeListener, getState
public EmptyTreeDataGridItems(io.jmix.core.metamodel.model.MetaClass metaClass)
public int getChildCount(E parent)
getChildCount
in interface TreeDataGridItems<E>
parent
- the parent itempublic java.util.stream.Stream<E> getChildren(@Nullable E item)
getChildren
in interface TreeDataGridItems<E>
item
- the item to obtain children or null
to get root itemspublic boolean hasChildren(E item)
hasChildren
in interface TreeDataGridItems<E>
item
- the item to checktrue
if the item has children, false
otherwise@Nullable public E getParent(E item)
getParent
in interface TreeDataGridItems<E>
item
- the item to get parentnull
if no parentpublic java.lang.String getHierarchyPropertyName()
TreeDataGridItems
getHierarchyPropertyName
in interface TreeDataGridItems<E>
public void sort(java.lang.Object[] propertyId, boolean[] ascending)
sort
in interface DataGridItems.Sortable<E>
sort
in class EmptyDataGridItems<E>
public void resetSortOrder()
resetSortOrder
in interface DataGridItems.Sortable<E>
resetSortOrder
in class EmptyDataGridItems<E>