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.StateChangeEvent
Nested 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
-
Constructor Summary
-
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.boolean
containsId
(Object itemId) Collection<?>
getItems()
getItemValue
(Object itemId, MetaPropertyPath propertyId) getState()
Class<?>
boolean
Tests if the Item corresponding to the given Item ID is the first item.boolean
Tests 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
.void
Resets sort order.void
setSelectedItem
(E item) Set current item in the source.int
size()
void
Sorts data.boolean
supportsProperty
(Object propertyId) void
updateItem
(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, wait
Methods inherited from interface io.jmix.ui.component.data.TableItems
getItemNN
Methods inherited from interface io.jmix.ui.component.data.TableItems.Sortable
enableSorting, suppressSorting
-
Field Details
-
metaClass
-
-
Constructor Details
-
EmptyTableItems
-
-
Method Details
-
getSelectedItem
- Specified by:
getSelectedItem
in interfaceEntityTableItems<E>
- Returns:
- the current item contained in the source
-
setSelectedItem
Description copied from interface:EntityTableItems
Set current item in the source.- Specified by:
setSelectedItem
in interfaceEntityTableItems<E>
- Parameters:
item
- the item to set
-
getItemIds
- Specified by:
getItemIds
in interfaceTableItems<E>
-
getItem
- Specified by:
getItem
in interfaceTableItems<E>
-
getItemValue
- Specified by:
getItemValue
in interfaceTableItems<E>
-
size
public int size()- Specified by:
size
in interfaceTableItems<E>
-
containsId
- Specified by:
containsId
in interfaceTableItems<E>
-
getType
- Specified by:
getType
in interfaceTableItems<E>
-
supportsProperty
- Specified by:
supportsProperty
in interfaceTableItems<E>
-
getItems
- Specified by:
getItems
in interfaceTableItems<E>
- Returns:
- unmodifiable collection of items
-
updateItem
Description copied from interface:TableItems
Update an item in the collection if it is already there.- Specified by:
updateItem
in interfaceTableItems<E>
- Parameters:
item
- the item to update
-
addValueChangeListener
Description copied from interface:TableItems
Registers a new value change listener.- Specified by:
addValueChangeListener
in 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:TableItems
Registers a new item set change listener.- Specified by:
addItemSetChangeListener
in 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:TableItems
Registers a new selected item change listener.- Specified by:
addSelectedItemChangeListener
in 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:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
getState
-
addStateChangeListener
Description copied from interface:DataUnit
Registers a new state change listener.- Specified by:
addStateChangeListener
in 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.Ordered
Gets the ID of the item following the Item that corresponds toitemId
.- Specified by:
nextItemId
in interfaceTableItems.Ordered<E>
- Parameters:
itemId
- item id- Returns:
- ID of the next visible Item or
null
-
prevItemId
Description copied from interface:TableItems.Ordered
Gets the ID of the item preceding the item that corresponds toitemId
.- Specified by:
prevItemId
in interfaceTableItems.Ordered<E>
- Parameters:
itemId
- item id- Returns:
- ID of the previous visible item or
null
-
firstItemId
- Specified by:
firstItemId
in interfaceTableItems.Ordered<E>
- Returns:
- ID of the first visible item
-
lastItemId
- Specified by:
lastItemId
in interfaceTableItems.Ordered<E>
- Returns:
- ID of the last visible item
-
isFirstId
Description copied from interface:TableItems.Ordered
Tests if the Item corresponding to the given Item ID is the first item.- Specified by:
isFirstId
in interfaceTableItems.Ordered<E>
- Parameters:
itemId
- item id- Returns:
true
if the item is first visible item,false
if not
-
isLastId
Description copied from interface:TableItems.Ordered
Tests if the item corresponding to the given item ID is the last item.- Specified by:
isLastId
in interfaceTableItems.Ordered<E>
- Parameters:
itemId
- item id- Returns:
true
if the item is last visible item in the,false
if not
-
sort
Description copied from interface:TableItems.Sortable
Sorts data.- Specified by:
sort
in interfaceTableItems.Sortable<E>
- Parameters:
propertyId
- id of propertyascending
- asc / desc flags
-
resetSortOrder
public void resetSortOrder()Description copied from interface:TableItems.Sortable
Resets sort order.- Specified by:
resetSortOrder
in interfaceTableItems.Sortable<E>
-