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>
Interface for components that are used inside an
HasItemsAndComponents for representing a single item. |
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, addComponentAsFirst, addComponentAtIndex, remove, removeAll
isEnabled, setEnabled
getElement
default 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 © 2018. All rights reserved.