Package io.jmix.ui.component.data.table
Class EmptyTableItems<E>
java.lang.Object
io.jmix.ui.component.data.table.EmptyTableItems<E>
- All Implemented Interfaces:
DataUnit,EmptyDataUnit,EntityDataUnit,EntityTableItems<E>,TableItems<E>,TableItems.Ordered<E>,TableItems.Sortable<E>
- Direct Known Subclasses:
EmptyGroupTableItems,EmptyTreeTableItems
public class EmptyTableItems<E>
extends Object
implements EntityTableItems<E>, TableItems.Sortable<E>, EmptyDataUnit
-
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
Fields -
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.booleancontainsId(Object itemId) Collection<?>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) voidupdateItem(E item) Update an item in the collection if it is already there.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.data.TableItems
getItemNNMethods inherited from interface io.jmix.ui.component.data.TableItems.Sortable
enableSorting, suppressSorting
-
Field Details
-
metaClass
-
-
Constructor Details
-
EmptyTableItems
-
-
Method Details
-
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
-
getItemIds
- Specified by:
getItemIdsin interfaceTableItems<E>
-
getItem
- Specified by:
getItemin interfaceTableItems<E>
-
getItemValue
- Specified by:
getItemValuein interfaceTableItems<E>
-
size
public int size()- Specified by:
sizein interfaceTableItems<E>
-
containsId
- Specified by:
containsIdin interfaceTableItems<E>
-
getType
- Specified by:
getTypein interfaceTableItems<E>
-
supportsProperty
- Specified by:
supportsPropertyin interfaceTableItems<E>
-
getItems
- Specified by:
getItemsin interfaceTableItems<E>- Returns:
- unmodifiable collection of items
-
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
-
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
-
getState
-
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
-
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
-
resetSortOrder
public void resetSortOrder()Description copied from interface:TableItems.SortableResets sort order.- Specified by:
resetSortOrderin interfaceTableItems.Sortable<E>
-