T - the type of the bean we want to store in SelectableItempublic class SelectableBeanItemContainer<T> extends com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>
AbstractInMemoryContainer. Usually
BeanItemContainer or
AbstractBeanContainer would be the best container to use. But we need to add a property to the
container items which indicates if any item is selected. Due to some limitations we cannot inherit BeanItemContainer
or AbstractBeanContainer to fulfill this requirement. Therefore this class is mainly a rough copy of the
BeanItemContainer but does not support any kind of filtering. This may be included in future releases.SelectableItem,
Serialized Formcom.vaadin.data.util.AbstractContainer.BaseItemSetChangeEvent, com.vaadin.data.util.AbstractContainer.BasePropertySetChangeEventcom.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer| Constructor and Description |
|---|
SelectableBeanItemContainer(Class<? super T> type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue)
We do not allow adding additional properties to the container.
|
com.vaadin.data.Item |
addItem(Object itemId) |
com.vaadin.data.Item |
addItemAfter(Object previousItemId,
Object newItemId) |
com.vaadin.data.Item |
addItemAt(int index,
Object newItemId) |
com.vaadin.data.Property |
getContainerProperty(Object itemId,
Object propertyId) |
Collection<String> |
getContainerPropertyIds() |
Collection<T> |
getSelectedAttributes() |
Class<?> |
getType(Object propertyId) |
protected SelectableItem<T> |
getUnfilteredItem(Object itemId) |
boolean |
isSelected(T itemId) |
protected void |
registerNewItem(int position,
T itemId,
SelectableItem<T> item) |
boolean |
removeAllItems() |
boolean |
removeContainerProperty(Object propertyId)
We do not allow removing properties from the container.
|
boolean |
removeItem(Object itemId) |
void |
selectAllItems(boolean select) |
addFilter, addItem, addItemAfter, addItemAt, addItemSetChangeListener, addListener, containsId, doFilterContainer, doSort, filterAll, fireItemAdded, fireItemRemoved, firstItemId, getAllItemIds, getContainerFilters, getFilteredItemIds, getFilters, getIdByIndex, getItem, getItemIds, getItemIds, getItemSorter, getSortablePropertyIds, getVisibleItemIds, hasContainerFilters, indexOfId, internalAddItemAfter, internalAddItemAt, internalAddItemAtEnd, internalRemoveAllItems, internalRemoveItem, isFiltered, isFirstId, isLastId, isPropertyFiltered, lastItemId, nextItemId, passesFilters, prevItemId, removeAllFilters, removeFilter, removeFilters, removeItemSetChangeListener, removeListener, setAllItemIds, setFilteredItemIds, setFilters, setItemSorter, size, sortContaineraddListener, addPropertySetChangeListener, fireContainerPropertySetChange, fireContainerPropertySetChange, fireItemSetChange, fireItemSetChange, getItemSetChangeListeners, getListeners, getPropertySetChangeListeners, removeListener, removePropertySetChangeListener, setItemSetChangeListeners, setPropertySetChangeListenersprotected SelectableItem<T> getUnfilteredItem(Object itemId)
getUnfilteredItem in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public Collection<String> getContainerPropertyIds()
public com.vaadin.data.Property getContainerProperty(Object itemId, Object propertyId)
public com.vaadin.data.Item addItemAt(int index,
Object newItemId)
addItemAt in interface com.vaadin.data.Container.IndexedaddItemAt in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public com.vaadin.data.Item addItemAfter(Object previousItemId, Object newItemId)
addItemAfter in interface com.vaadin.data.Container.OrderedaddItemAfter in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public com.vaadin.data.Item addItem(Object itemId)
addItem in interface com.vaadin.data.ContaineraddItem in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public boolean removeItem(Object itemId)
removeItem in interface com.vaadin.data.ContainerremoveItem in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public boolean removeAllItems()
removeAllItems in interface com.vaadin.data.ContainerremoveAllItems in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>protected void registerNewItem(int position,
T itemId,
SelectableItem<T> item)
registerNewItem in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
addContainerProperty in interface com.vaadin.data.ContaineraddContainerProperty in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>UnsupportedOperationExceptionpublic boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
removeContainerProperty in interface com.vaadin.data.ContainerremoveContainerProperty in class com.vaadin.data.util.AbstractInMemoryContainer<T,String,SelectableItem<T>>UnsupportedOperationExceptionpublic boolean isSelected(T itemId)
public Collection<T> getSelectedAttributes()
public void selectAllItems(boolean select)
Copyright © 2020. All rights reserved.