T - the type of the displayed itemspublic interface HasItemsAndComponents<T> extends HasComponents, HasItems<T>
The items should be represented by components that implement
HasItemsAndComponents.ItemComponent. Additionally any type of components can be added at
any position with addComponents(Object, Component...) or
prependComponents(Object, Component...).
| Modifier and Type | Interface and Description |
|---|---|
static interface |
HasItemsAndComponents.ItemComponent<T>
Represents a single item component that is used inside an
HasItemsAndComponents. |
| Modifier and Type | Method and Description |
|---|---|
default void |
addComponents(T afterItem,
Component... components)
Adds the components after the given item.
|
default int |
getItemPosition(T item)
Gets the index of the child element that represents the given item.
|
default void |
prependComponents(T beforeItem,
Component... components)
Adds the components before the given item.
|
add, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllisEnabled, setEnabledgetElementdefault void addComponents(T afterItem, Component... components)
afterItem - item to add components aftercomponents - components to add after itemIllegalArgumentException - if this component doesn't contain the itemdefault void prependComponents(T beforeItem, Component... components)
beforeItem - item to add components in front ofcomponents - components to add before itemIllegalArgumentException - if this component doesn't contain the itemdefault int getItemPosition(T item)
item - the item to look forCopyright © 2025. All rights reserved.