Package io.jmix.ui.component.data.table
Class ContainerTableItems<E>
java.lang.Object
io.jmix.ui.component.data.table.ContainerTableItems<E>
- All Implemented Interfaces:
DataUnit,ContainerDataUnit<E>,EntityDataUnit,EntityTableItems<E>,TableItems<E>,TableItems.Ordered<E>,TableItems.Sortable<E>
- Direct Known Subclasses:
ContainerGroupTableItems,ContainerTreeTableItems
public class ContainerTableItems<E>
extends Object
implements EntityTableItems<E>, TableItems.Sortable<E>, ContainerDataUnit<E>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.data.DataUnit
DataUnit.StateChangeEventNested classes/interfaces inherited from interface io.jmix.ui.component.data.TableItems
TableItems.ItemSetChangeEvent<T>, TableItems.Ordered<T>, TableItems.SelectedItemChangeEvent<T>, TableItems.Sortable<T>, TableItems.ValueChangeEvent<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AggregatableDelegateprotected CollectionContainer<E>protected EventHubprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRegisters a new item set change listener.Registers a new selected item change listener.Registers a new state change listener.addValueChangeListener(Consumer<TableItems.ValueChangeEvent<E>> listener) Registers a new value change listener.protected voidprotected voidprotected voidbooleancontainsId(Object itemId) protected SortcreateSort(Object[] propertyId, boolean[] ascending) voidCollection<?>getItems()getItemValue(Object itemId, MetaPropertyPath propertyId) getState()Class<?>booleanTests if the Item corresponding to the given Item ID is the first item.booleanTests if the item corresponding to the given item ID is the last item.nextItemId(Object itemId) Gets the ID of the item following the Item that corresponds toitemId.prevItemId(Object itemId) Gets the ID of the item preceding the item that corresponds toitemId.voidResets sort order.voidsetSelectedItem(E item) Set current item in the source.intsize()voidSorts data.booleansupportsProperty(Object propertyId) voidvoidupdateItem(E item) Update an item in the collection if it is already there.
-
Field Details
-
container
-
aggregatableDelegate
-
suppressSorting
protected boolean suppressSorting -
events
-
-
Constructor Details
-
ContainerTableItems
-
-
Method Details
-
getContainer
- Specified by:
getContainerin interfaceContainerDataUnit<E>
-
containerItemChanged
-
containerCollectionChanged
-
containerItemPropertyChanged
-
getItemIds
- Specified by:
getItemIdsin interfaceTableItems<E>
-
getItems
- Specified by:
getItemsin interfaceTableItems<E>- Returns:
- unmodifiable collection of items
-
getItem
- Specified by:
getItemin interfaceTableItems<E>
-
getItemNN
- Specified by:
getItemNNin interfaceTableItems<E>
-
updateItem
Description copied from interface:TableItemsUpdate an item in the collection if it is already there.- Specified by:
updateItemin interfaceTableItems<E>- Parameters:
item- the item to update
-
getItemValue
- Specified by:
getItemValuein interfaceTableItems<E>
-
size
public int size()- Specified by:
sizein interfaceTableItems<E>
-
containsId
- Specified by:
containsIdin interfaceTableItems<E>
-
getState
-
getType
- Specified by:
getTypein interfaceTableItems<E>
-
supportsProperty
- Specified by:
supportsPropertyin interfaceTableItems<E>
-
getSelectedItem
- Specified by:
getSelectedItemin interfaceEntityTableItems<E>- Returns:
- the current item contained in the source
-
setSelectedItem
Description copied from interface:EntityTableItemsSet current item in the source.- Specified by:
setSelectedItemin interfaceEntityTableItems<E>- Parameters:
item- the item to set
-
addStateChangeListener
Description copied from interface:DataUnitRegisters a new state change listener.- Specified by:
addStateChangeListenerin interfaceDataUnit- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addValueChangeListener
Description copied from interface:TableItemsRegisters a new value change listener.- Specified by:
addValueChangeListenerin interfaceTableItems<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addItemSetChangeListener
Description copied from interface:TableItemsRegisters a new item set change listener.- Specified by:
addItemSetChangeListenerin interfaceTableItems<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addSelectedItemChangeListener
public Subscription addSelectedItemChangeListener(Consumer<TableItems.SelectedItemChangeEvent<E>> listener) Description copied from interface:TableItemsRegisters a new selected item change listener.- Specified by:
addSelectedItemChangeListenerin interfaceTableItems<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
getEntityMetaClass
- Specified by:
getEntityMetaClassin interfaceEntityDataUnit- Returns:
MetaClassof an entity contained in the source
-
nextItemId
Description copied from interface:TableItems.OrderedGets the ID of the item following the Item that corresponds toitemId.- Specified by:
nextItemIdin interfaceTableItems.Ordered<E>- Parameters:
itemId- item id- Returns:
- ID of the next visible Item or
null
-
prevItemId
Description copied from interface:TableItems.OrderedGets the ID of the item preceding the item that corresponds toitemId.- Specified by:
prevItemIdin interfaceTableItems.Ordered<E>- Parameters:
itemId- item id- Returns:
- ID of the previous visible item or
null
-
firstItemId
- Specified by:
firstItemIdin interfaceTableItems.Ordered<E>- Returns:
- ID of the first visible item
-
lastItemId
- Specified by:
lastItemIdin interfaceTableItems.Ordered<E>- Returns:
- ID of the last visible item
-
isFirstId
Description copied from interface:TableItems.OrderedTests if the Item corresponding to the given Item ID is the first item.- Specified by:
isFirstIdin interfaceTableItems.Ordered<E>- Parameters:
itemId- item id- Returns:
trueif the item is first visible item,falseif not
-
isLastId
Description copied from interface:TableItems.OrderedTests if the item corresponding to the given item ID is the last item.- Specified by:
isLastIdin interfaceTableItems.Ordered<E>- Parameters:
itemId- item id- Returns:
trueif the item is last visible item in the,falseif not
-
sort
Description copied from interface:TableItems.SortableSorts data.- Specified by:
sortin interfaceTableItems.Sortable<E>- Parameters:
propertyId- id of propertyascending- asc / desc flags
-
createSort
-
resetSortOrder
public void resetSortOrder()Description copied from interface:TableItems.SortableResets sort order.- Specified by:
resetSortOrderin interfaceTableItems.Sortable<E>
-
suppressSorting
public void suppressSorting()- Specified by:
suppressSortingin interfaceTableItems.Sortable<E>
-
enableSorting
public void enableSorting()- Specified by:
enableSortingin interfaceTableItems.Sortable<E>
-