|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.AbstractContainer
com.vaadin.data.util.AbstractInMemoryContainer<ITEMIDTYPE,PROPERTYIDCLASS,ITEMCLASS>
ITEMIDTYPE
- the class of item identifiers in the container, use Object if can
be any classPROPERTYIDCLASS
- the class of property identifiers for the items in the container,
use Object if can be any classITEMCLASS
- the (base) class of the Item instances in the container, use
Item
if unknownpublic abstract class AbstractInMemoryContainer<ITEMIDTYPE,PROPERTYIDCLASS,ITEMCLASS extends Item>
Abstract Container
class that handles common functionality for
in-memory containers. Concrete in-memory container classes can either inherit
this class, inherit AbstractContainer
, or implement the
Container
interface directly.
Adding and removing items (if desired) must be implemented in subclasses by
overriding the appropriate add*Item() and remove*Item() and removeAllItems()
methods, calling the corresponding
#internalAddItemAfter(Object, Object, Item)
,
#internalAddItemAt(int, Object, Item)
,
internalAddItemAtEnd(Object, Item, boolean)
,
internalRemoveItem(Object)
and internalRemoveAllItems()
methods.
By default, adding and removing container properties is not supported, and
subclasses need to implement Container.getContainerPropertyIds()
. Optionally,
subclasses can override addContainerProperty(Object, Class, Object)
and removeContainerProperty(Object)
to implement them.
Features:
Container.Ordered
Container.Indexed
Filterable
and SimpleFilterable
(internal implementation,
does not implement the interface directly)
Sortable
(internal implementation, does not implement the
interface directly)
Sortable
, subclasses need to implement
getSortablePropertyIds()
and call the superclass method
sortContainer(Object[], boolean[])
in the method
sort(Object[], boolean[])
.
To implement Filterable
, subclasses need to implement the methods
Filterable#addContainerFilter(com.vaadin.data.Container.Filter)
(calling #addFilter(Filter)
),
Filterable#removeAllContainerFilters()
(calling
removeAllFilters()
) and
Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)
(calling removeFilter(com.vaadin.data.Container.Filter)
).
To implement SimpleFilterable
, subclasses also need to implement the
methods
SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)
and SimpleFilterable#removeContainerFilters(Object)
calling
addFilter(com.vaadin.data.Container.Filter)
and
removeFilters(Object)
respectively.
Nested Class Summary | |
---|---|
protected static class |
AbstractInMemoryContainer.BaseItemAddEvent
An Event object specifying information about the added
items. |
protected static class |
AbstractInMemoryContainer.BaseItemRemoveEvent
An Event object specifying information about the removed
items. |
Nested classes/interfaces inherited from class com.vaadin.data.util.AbstractContainer |
---|
AbstractContainer.BaseItemSetChangeEvent, AbstractContainer.BasePropertySetChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Container.Indexed |
---|
Container.Indexed.ItemAddEvent, Container.Indexed.ItemRemoveEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
---|
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer |
Constructor Summary | |
---|---|
protected |
AbstractInMemoryContainer()
Constructor for an abstract in-memory container. |
Method Summary | |
---|---|
boolean |
addContainerProperty(java.lang.Object propertyId,
java.lang.Class<?> type,
java.lang.Object defaultValue)
Adds a new Property to all Items in the Container. |
protected void |
addFilter(Container.Filter filter)
Adds a container filter and re-filter the view. |
java.lang.Object |
addItem()
Creates a new Item into the Container, and assign it an automatic ID. |
Item |
addItem(java.lang.Object itemId)
Creates a new Item with the given ID in the Container. |
java.lang.Object |
addItemAfter(java.lang.Object previousItemId)
Adds a new item after the given item. |
Item |
addItemAfter(java.lang.Object previousItemId,
java.lang.Object newItemId)
Adds a new item after the given item. |
java.lang.Object |
addItemAt(int index)
Adds a new item at given index (in the filtered view). |
Item |
addItemAt(int index,
java.lang.Object newItemId)
Adds a new item at given index (in the filtered view). |
void |
addItemSetChangeListener(Container.ItemSetChangeListener listener)
Implementation of the corresponding method in ItemSetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
void |
addListener(Container.ItemSetChangeListener listener)
Deprecated. As of 7.0, replaced by addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener) |
boolean |
containsId(java.lang.Object itemId)
Tests if the Container contains the specified Item. |
protected boolean |
doFilterContainer(boolean hasFilters)
Filters the data in the container and updates internal data structures. |
protected void |
doSort()
Perform the sorting of the data structures in the container. |
protected void |
filterAll()
Filter the view to recreate the visible item list from the unfiltered items, and send a notification if the set of visible items changed in any way. |
protected void |
fireItemAdded(int position,
ITEMIDTYPE itemId,
ITEMCLASS item)
Notify item set change listeners that an item has been added to the container. |
protected void |
fireItemRemoved(int position,
java.lang.Object itemId)
Notify item set change listeners that an item has been removed from the container. |
protected void |
fireItemsAdded(int firstPosition,
ITEMIDTYPE firstItemId,
int numberOfItems)
Notify item set change listeners that items has been added to the container. |
protected void |
fireItemsRemoved(int firstPosition,
java.lang.Object firstItemId,
int numberOfItems)
Notify item set change listeners that items has been removed from the container. |
ITEMIDTYPE |
firstItemId()
Gets the ID of the first Item in the Container. |
protected java.util.List<ITEMIDTYPE> |
getAllItemIds()
Internal helper method to get the internal list of all item identifiers. |
protected java.util.Collection<Container.Filter> |
getContainerFilters()
|
protected java.util.List<ITEMIDTYPE> |
getFilteredItemIds()
Internal helper method to get the internal list of filtered item identifiers. |
protected java.util.Set<Container.Filter> |
getFilters()
Returns the internal collection of filters. |
protected ITEMIDTYPE |
getFirstVisibleItem()
Returns the item id of the first visible item after filtering. |
ITEMIDTYPE |
getIdByIndex(int index)
Get the item id for the item at the position given by index . |
ITEMCLASS |
getItem(java.lang.Object itemId)
Gets the Item with the given Item ID from the Container. |
java.util.List<?> |
getItemIds()
Gets the ID's of all visible (after filtering and sorting) Items stored in the Container. |
java.util.List<ITEMIDTYPE> |
getItemIds(int startIndex,
int numberOfIds)
Get numberOfItems consecutive item ids from the
container, starting with the item id at startIndex . |
protected ItemSorter |
getItemSorter()
Returns the ItemSorter used for comparing items in a sort. |
protected java.util.Collection<?> |
getSortablePropertyIds()
Returns the sortable property identifiers for the container. |
protected abstract ITEMCLASS |
getUnfilteredItem(java.lang.Object itemId)
Get an item even if filtered out. |
protected java.util.List<ITEMIDTYPE> |
getVisibleItemIds()
Returns the internal list of visible item identifiers after filtering. |
protected boolean |
hasContainerFilters()
Returns true if any filters have been applied to the container. |
int |
indexOfId(java.lang.Object itemId)
Gets the index of the Item corresponding to the itemId. |
protected ITEMCLASS |
internalAddItemAfter(ITEMIDTYPE previousItemId,
ITEMIDTYPE newItemId,
ITEMCLASS item,
boolean filter)
Add an item after a given (visible) item, and perform filtering. |
protected ITEMCLASS |
internalAddItemAt(int index,
ITEMIDTYPE newItemId,
ITEMCLASS item,
boolean filter)
Add an item at a given (visible after filtering) item index, and perform filtering. |
protected ITEMCLASS |
internalAddItemAtEnd(ITEMIDTYPE newItemId,
ITEMCLASS item,
boolean filter)
Add an item at the end of the container, and perform filtering if necessary. |
protected void |
internalRemoveAllItems()
Removes all items from the internal data structures of this class. |
protected boolean |
internalRemoveItem(java.lang.Object itemId)
Removes a single item from the internal data structures of this class. |
protected boolean |
isFiltered()
Returns true is the container has active filters. |
boolean |
isFirstId(java.lang.Object itemId)
Tests if the Item corresponding to the given Item ID is the first Item in the Container. |
boolean |
isLastId(java.lang.Object itemId)
Tests if the Item corresponding to the given Item ID is the last Item in the Container. |
protected boolean |
isPropertyFiltered(java.lang.Object propertyId)
Checks if there is a filter that applies to a given property. |
ITEMIDTYPE |
lastItemId()
Gets the ID of the last Item in the Container.. |
ITEMIDTYPE |
nextItemId(java.lang.Object itemId)
Gets the ID of the Item following the Item that corresponds to itemId . |
protected boolean |
passesFilters(java.lang.Object itemId)
Checks if the given itemId passes the filters set for the container. |
ITEMIDTYPE |
prevItemId(java.lang.Object itemId)
Gets the ID of the Item preceding the Item that corresponds to itemId . |
protected void |
registerNewItem(int position,
ITEMIDTYPE itemId,
ITEMCLASS item)
Registers a new item as having been added to the container. |
protected void |
removeAllFilters()
Remove all container filters for all properties and re-filter the view. |
boolean |
removeAllItems()
Removes all Items from the Container. |
boolean |
removeContainerProperty(java.lang.Object propertyId)
Removes a Property specified by the given Property ID from the Container. |
protected void |
removeFilter(Container.Filter filter)
Remove a specific container filter and re-filter the view (if necessary). |
protected java.util.Collection<Container.Filter> |
removeFilters(java.lang.Object propertyId)
Remove all container filters for a given property identifier and re-filter the view. |
boolean |
removeItem(java.lang.Object itemId)
Removes the Item identified by ItemId from the Container. |
void |
removeItemSetChangeListener(Container.ItemSetChangeListener listener)
Implementation of the corresponding method in ItemSetChangeNotifier , override with the corresponding public
method and implement the interface to use this. |
void |
removeListener(Container.ItemSetChangeListener listener)
Deprecated. As of 7.0, replaced by removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener) |
protected void |
setAllItemIds(java.util.List<ITEMIDTYPE> allItemIds)
Deprecated. |
protected void |
setFilteredItemIds(java.util.List<ITEMIDTYPE> filteredItemIds)
Deprecated. |
protected void |
setFilters(java.util.Set<Container.Filter> filters)
Set the internal collection of filters without performing filtering. |
protected void |
setItemSorter(ItemSorter itemSorter)
Sets the ItemSorter used for comparing items in a sort. |
int |
size()
Gets the number of visible Items in the Container. |
protected void |
sortContainer(java.lang.Object[] propertyId,
boolean[] ascending)
Sort base implementation to be used to implement Sortable . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.data.Container |
---|
getContainerProperty, getContainerPropertyIds, getType |
Constructor Detail |
---|
protected AbstractInMemoryContainer()
Method Detail |
---|
public ITEMCLASS getItem(java.lang.Object itemId)
Container
Item
with the given Item ID from the Container. If the
Container does not contain the requested Item, null
is
returned.
Containers should not return Items that are filtered out.
getItem
in interface Container
itemId
- ID of the Item
to retrieve
Item
with the given ID or null
if the
Item is not found in the Containerprotected abstract ITEMCLASS getUnfilteredItem(java.lang.Object itemId)
itemId
-
public int size()
Container
Filtering can hide items so that they will not be visible through the container API.
size
in interface Container
public boolean containsId(java.lang.Object itemId)
Container
Filtering can hide items so that they will not be visible through the container API, and this method should respect visibility of items (i.e. only indicate visible items as being in the container) if feasible for the container.
containsId
in interface Container
itemId
- ID the of Item to be tested
public java.util.List<?> getItemIds()
Container
If the container is Container.Ordered
, the collection returned by this
method should follow that order. If the container is Container.Sortable
,
the items should be in the sorted order.
Calling this method for large lazy containers can be an expensive operation and should be avoided when practical.
getItemIds
in interface Container
public ITEMIDTYPE nextItemId(java.lang.Object itemId)
Container.Ordered
itemId
. If the given Item is the last or not found in
the Container, null
is returned.
nextItemId
in interface Container.Ordered
itemId
- ID of a visible Item in the Container
null
public ITEMIDTYPE prevItemId(java.lang.Object itemId)
Container.Ordered
itemId
. If the given Item is the first or not found in
the Container, null
is returned.
prevItemId
in interface Container.Ordered
itemId
- ID of a visible Item in the Container
null
public ITEMIDTYPE firstItemId()
Container.Ordered
firstItemId
in interface Container.Ordered
public ITEMIDTYPE lastItemId()
Container.Ordered
lastItemId
in interface Container.Ordered
public boolean isFirstId(java.lang.Object itemId)
Container.Ordered
isFirstId
in interface Container.Ordered
itemId
- ID of an Item in the Container
true
if the Item is first visible item in the
Container, false
if notpublic boolean isLastId(java.lang.Object itemId)
Container.Ordered
isLastId
in interface Container.Ordered
true
if the Item is last visible item in the
Container, false
if notpublic ITEMIDTYPE getIdByIndex(int index)
Container.Indexed
index
.
getIdByIndex
in interface Container.Indexed
index
- the index of the requested item id
public java.util.List<ITEMIDTYPE> getItemIds(int startIndex, int numberOfIds)
Container.Indexed
numberOfItems
consecutive item ids from the
container, starting with the item id at startIndex
.
Implementations should return at most numberOfItems
item
ids, but can contain less if the container has less items than
required to fulfill the request. The returned list must hence contain
all of the item ids from the range:
startIndex
to
max(startIndex + (numberOfItems-1), container.size()-1)
.
For quick migration to new API see:
ContainerHelpers#getItemIdsUsingGetIdByIndex(int, int, Indexed)
getItemIds
in interface Container.Indexed
startIndex
- the index for the first item which id to includenumberOfIds
- the number of consecutive item ids to get from the given
start index, must be >= 0
numberOfItems
== 0; not nullpublic int indexOfId(java.lang.Object itemId)
Container.Indexed
true
for the returned index: 0 <= index < size(), or
index = -1 if there is no visible item with that id in the container.
indexOfId
in interface Container.Indexed
itemId
- ID of an Item in the Container
public java.lang.Object addItemAt(int index) throws java.lang.UnsupportedOperationException
Container.Indexed
The indices of the item currently in the given position and all the following items are incremented.
This method should apply filters to the added item after inserting
it, possibly hiding it immediately. If the container is being sorted,
the item may be added at the correct sorted position instead of the
given position. See Container.Indexed
, Container.Ordered
,
Container.SimpleFilterable
and Container.Sortable
for more information.
addItemAt
in interface Container.Indexed
index
- Index (in the filtered and sorted view) to add the new
item.
java.lang.UnsupportedOperationException
- if the operation is not supported by the containerpublic Item addItemAt(int index, java.lang.Object newItemId) throws java.lang.UnsupportedOperationException
Container.Indexed
The indexes of the item currently in the given position and all the following items are incremented.
This method should apply filters to the added item after inserting
it, possibly hiding it immediately. If the container is being sorted,
the item may be added at the correct sorted position instead of the
given position. See Container.Indexed
, Container.SimpleFilterable
and
Container.Sortable
for more information.
addItemAt
in interface Container.Indexed
index
- Index (in the filtered and sorted view) at which to add
the new item.newItemId
- Id of the new item to be added.
Item
or null if the operation fails.
java.lang.UnsupportedOperationException
- if the operation is not supported by the containerpublic java.lang.Object addItemAfter(java.lang.Object previousItemId) throws java.lang.UnsupportedOperationException
Container.Ordered
Adding an item after null item adds the item as first item of the ordered container.
addItemAfter
in interface Container.Ordered
previousItemId
- Id of the visible item in ordered container after which to
insert the new item.
java.lang.UnsupportedOperationException
- if the operation is not supported by the containerOrdered: adding items in filtered or sorted containers
public Item addItemAfter(java.lang.Object previousItemId, java.lang.Object newItemId) throws java.lang.UnsupportedOperationException
Container.Ordered
Adding an item after null item adds the item as first item of the ordered container.
addItemAfter
in interface Container.Ordered
previousItemId
- Id of the visible item in ordered container after which to
insert the new item.newItemId
- Id of the new item to be added.
java.lang.UnsupportedOperationException
- if the operation is not supported by the containerOrdered: adding items in filtered or sorted containers
public Item addItem(java.lang.Object itemId) throws java.lang.UnsupportedOperationException
Container
The new Item is returned, and it is ready to have its Properties
modified. Returns null
if the operation fails or the
Container already contains a Item with the given ID.
This functionality is optional.
addItem
in interface Container
itemId
- ID of the Item to be created
null
in case of a failure
java.lang.UnsupportedOperationException
- if adding an item with an explicit item ID is not supported
by the containerpublic java.lang.Object addItem() throws java.lang.UnsupportedOperationException
Container
The new ID is returned, or null
if the operation fails.
After a successful call you can use the
method to fetch the Item.
getItem
This functionality is optional.
addItem
in interface Container
null
in case of a
failure
java.lang.UnsupportedOperationException
- if adding an item without an explicit item ID is not
supported by the containerpublic boolean removeItem(java.lang.Object itemId) throws java.lang.UnsupportedOperationException
Container
ItemId
from the Container.
Containers that support filtering should also allow removing an item that is currently filtered out.
This functionality is optional.
removeItem
in interface Container
itemId
- ID of the Item to remove
true
if the operation succeeded, false
if not
java.lang.UnsupportedOperationException
- if the container does not support removing individual itemspublic boolean removeAllItems() throws java.lang.UnsupportedOperationException
Container
Note that Property ID and type information is preserved. This functionality is optional.
removeAllItems
in interface Container
true
if the operation succeeded, false
if not
java.lang.UnsupportedOperationException
- if the container does not support removing all itemspublic boolean addContainerProperty(java.lang.Object propertyId, java.lang.Class<?> type, java.lang.Object defaultValue) throws java.lang.UnsupportedOperationException
Container
This functionality is optional.
addContainerProperty
in interface Container
propertyId
- ID of the Propertytype
- Data type of the new PropertydefaultValue
- The value all created Properties are initialized to
true
if the operation succeeded, false
if not
java.lang.UnsupportedOperationException
- if the container does not support explicitly adding container
propertiespublic boolean removeContainerProperty(java.lang.Object propertyId) throws java.lang.UnsupportedOperationException
Container
This functionality is optional.
removeContainerProperty
in interface Container
propertyId
- ID of the Property to remove
true
if the operation succeeded, false
if not
java.lang.UnsupportedOperationException
- if the container does not support removing container
properties@Deprecated public void addListener(Container.ItemSetChangeListener listener)
addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)
addListener
in interface Container.ItemSetChangeNotifier
addListener
in class AbstractContainer
public void addItemSetChangeListener(Container.ItemSetChangeListener listener)
AbstractContainer
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
addItemSetChangeListener
in interface Container.ItemSetChangeNotifier
addItemSetChangeListener
in class AbstractContainer
listener
- listener to be addedItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
public void removeItemSetChangeListener(Container.ItemSetChangeListener listener)
AbstractContainer
ItemSetChangeNotifier
, override with the corresponding public
method and implement the interface to use this.
removeItemSetChangeListener
in interface Container.ItemSetChangeNotifier
removeItemSetChangeListener
in class AbstractContainer
listener
- listener to be removedItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
@Deprecated public void removeListener(Container.ItemSetChangeListener listener)
removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)
removeListener
in interface Container.ItemSetChangeNotifier
removeListener
in class AbstractContainer
protected void filterAll()
protected boolean doFilterContainer(boolean hasFilters)
getItemIds()
and other methods only return the filtered
items.
hasFilters
- true if filters has been set for the container, false
otherwise
protected boolean passesFilters(java.lang.Object itemId)
itemId
- An itemId that exists in the container.
protected void addFilter(Container.Filter filter) throws UnsupportedFilterException
Filterable#addContainerFilter(com.vaadin.data.Container.Filter)
and optionally also
SimpleFilterable#addContainerFilter(Object, String, boolean, boolean)
(with SimpleStringFilter
).
Note that in some cases, incompatible filters cannot be detected when
added and an UnsupportedFilterException
may occur when performing
filtering.
UnsupportedFilterException
- if the filter is detected as not supported by the containerprotected boolean hasContainerFilters()
protected java.util.Collection<Container.Filter> getContainerFilters()
protected void removeFilter(Container.Filter filter)
Filterable#removeContainerFilter(com.vaadin.data.Container.Filter)
.
protected void removeAllFilters()
Filterable#removeAllContainerFilters()
.
protected boolean isPropertyFiltered(java.lang.Object propertyId)
propertyId
-
protected java.util.Collection<Container.Filter> removeFilters(java.lang.Object propertyId)
Filterable#removeContainerFilters(Object)
.
propertyId
-
protected ItemSorter getItemSorter()
setItemSorter(ItemSorter)
for more information.
protected void setItemSorter(ItemSorter itemSorter)
ItemSorter.compare(Object, Object)
method is called with item ids
to perform the sorting. A default ItemSorter is used if this is not
explicitly set.
itemSorter
- The ItemSorter used for comparing two items in a sort (not
null).protected void sortContainer(java.lang.Object[] propertyId, boolean[] ascending)
Sortable
.
Subclasses should call this from a public
#sort(Object[], boolean[])
method when implementing Sortable.
Container.Sortable.sort(java.lang.Object[],
boolean[])
protected void doSort()
itemSorter
has been prepared for the sort
operation. Typically this method calls
Collections.sort(aCollection, getItemSorter())
on all arrays
(containing item ids) that need to be sorted.
protected java.util.Collection<?> getSortablePropertyIds()
Sortable#getSortableContainerPropertyIds()
.
protected void internalRemoveAllItems()
removeAllItems()
in subclasses.
No notification is sent, the caller has to fire a suitable item set
change notification.
protected boolean internalRemoveItem(java.lang.Object itemId)
removeItem(Object)
in subclasses.
No notification is sent, the caller has to fire a suitable item set
change notification.
itemId
- the identifier of the item to remove
protected ITEMCLASS internalAddItemAtEnd(ITEMIDTYPE newItemId, ITEMCLASS item, boolean filter)
newItemId
- item
- new item to addfilter
- true to perform filtering and send event after adding the
item, false to skip these operations for batch inserts - if
false, caller needs to make sure these operations are
performed at the end of the batch
protected ITEMCLASS internalAddItemAfter(ITEMIDTYPE previousItemId, ITEMIDTYPE newItemId, ITEMCLASS item, boolean filter)
previousItemId
- item id of a visible item after which to add the new item, or
null to add at the beginningnewItemId
- item
- new item to addfilter
- true to perform filtering and send event after adding the
item, false to skip these operations for batch inserts - if
false, caller needs to make sure these operations are
performed at the end of the batch
protected ITEMCLASS internalAddItemAt(int index, ITEMIDTYPE newItemId, ITEMCLASS item, boolean filter)
index
- position where to add the item (visible/view index)newItemId
- item
- new item to addfilter
- true to perform filtering and send event after adding the
item, false to skip these operations for batch inserts - if
false, caller needs to make sure these operations are
performed at the end of the batch
protected void registerNewItem(int position, ITEMIDTYPE itemId, ITEMCLASS item)
AbstractInMemoryContainer
has already
been updated to reflect the new item when this method is called.
position
- itemId
- item
- protected void fireItemAdded(int position, ITEMIDTYPE itemId, ITEMCLASS item)
position
- position of the added item in the viewitemId
- id of the added itemitem
- the added itemprotected void fireItemsAdded(int firstPosition, ITEMIDTYPE firstItemId, int numberOfItems)
firstPosition
- position of the first visible added item in the viewfirstItemId
- id of the first visible added itemnumberOfItems
- the number of visible added itemsprotected void fireItemRemoved(int position, java.lang.Object itemId)
position
- position of the removed item in the view prior to removal (if
was visible)itemId
- id of the removed item, of type Object
to satisfy
Container.removeItem(Object)
APIprotected void fireItemsRemoved(int firstPosition, java.lang.Object firstItemId, int numberOfItems)
firstPosition
- position of the first visible removed item in the view prior
to removalfirstItemId
- id of the first visible removed item, of type Object
to satisfy Container.removeItem(Object)
APInumberOfItems
- the number of removed visible itemsprotected java.util.List<ITEMIDTYPE> getVisibleItemIds()
protected ITEMIDTYPE getFirstVisibleItem()
For internal use only.
protected boolean isFiltered()
@Deprecated protected void setFilteredItemIds(java.util.List<ITEMIDTYPE> filteredItemIds)
filteredItemIds
- protected java.util.List<ITEMIDTYPE> getFilteredItemIds()
getVisibleItemIds()
in other contexts.
@Deprecated protected void setAllItemIds(java.util.List<ITEMIDTYPE> allItemIds)
allItemIds
- protected java.util.List<ITEMIDTYPE> getAllItemIds()
protected void setFilters(java.util.Set<Container.Filter> filters)
addFilter(com.vaadin.data.Container.Filter)
and
remove*Filter*
(which also re-filter the container) instead
when possible.
filters
- protected java.util.Set<Container.Filter> getFilters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |