Package com.vaadin.featurepack.data
Interface Container.Ordered
- All Superinterfaces:
Container,Serializable
- All Known Subinterfaces:
Container.Indexed,Container.Sortable,EntityContainer<T>,HierarchicalEntityContainer<T>
- All Known Implementing Classes:
AbstractBeanContainer,AbstractInMemoryContainer,BeanContainer,BeanItemContainer,ContainerOrderedWrapper,IndexedContainer,JPAContainer
- Enclosing interface:
Container
Interface for Container classes whose
Items can be traversed in
order.
If the container is filtered or sorted, the traversal applies to the filtered and sorted view.
The addItemAfter() methods should apply filters to the added
item after inserting it, possibly hiding it immediately. If the container
is being sorted, they may add items at the correct sorted position
instead of the given position. See also Container.Filterable and
Container.Sortable for more information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.featurepack.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 -
Method Summary
Modifier and TypeMethodDescriptionaddItemAfter(Object previousItemId) Adds a new item after the given item.addItemAfter(Object previousItemId, Object newItemId) Adds a new item after the given item.Gets the ID of the first Item in the Container.booleanTests if the Item corresponding to the given Item ID is the first Item in the Container.booleanTests if the Item corresponding to the given Item ID is the last Item in the Container.Gets the ID of the last Item in the Container..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.Methods inherited from interface com.vaadin.featurepack.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size
-
Method Details
-
nextItemId
Gets the ID of the Item following the Item that corresponds toitemId. If the given Item is the last or not found in the Container,nullis returned.- Parameters:
itemId- ID of a visible Item in the Container- Returns:
- ID of the next visible Item or
null
-
prevItemId
Gets the ID of the Item preceding the Item that corresponds toitemId. If the given Item is the first or not found in the Container,nullis returned.- Parameters:
itemId- ID of a visible Item in the Container- Returns:
- ID of the previous visible Item or
null
-
firstItemId
Object firstItemId()Gets the ID of the first Item in the Container.- Returns:
- ID of the first visible Item in the Container
-
lastItemId
Object lastItemId()Gets the ID of the last Item in the Container..- Returns:
- ID of the last visible Item in the Container
-
isFirstId
Tests if the Item corresponding to the given Item ID is the first Item in the Container.- Parameters:
itemId- ID of an Item in the Container- Returns:
trueif the Item is first visible item in the Container,falseif not
-
isLastId
Tests if the Item corresponding to the given Item ID is the last Item in the Container.- Returns:
trueif the Item is last visible item in the Container,falseif not
-
addItemAfter
Adds a new item after the given item.Adding an item after null item adds the item as first item of the ordered container.
- Parameters:
previousItemId- Id of the visible item in ordered container after which to insert the new item.- Returns:
- item id the the created new item or null if the operation fails.
- Throws:
UnsupportedOperationException- if the operation is not supported by the container- See Also:
-
addItemAfter
Adds a new item after the given item.Adding an item after null item adds the item as first item of the ordered container.
- Parameters:
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.- Returns:
- new item or null if the operation fails.
- Throws:
UnsupportedOperationException- if the operation is not supported by the container- See Also:
-