T - Item data typeP - Item property typepublic interface ItemListing<T,P> extends ItemSet, Selectable<T>, com.vaadin.ui.Component
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ItemListing.CellStyleGenerator<T,P>
Generator to provide the style names for a cell.
|
static class |
ItemListing.ColumnAlignment
Enumeration of column content alignment options
|
static interface |
ItemListing.ItemClickListener<T,P>
Listener for user click events on an item (a listing row).
|
static interface |
ItemListing.ItemDescriptionGenerator<T>
Item descriptions generator.
|
static interface |
ItemListing.ItemDetailsGenerator<T>
Generator for item (row) details components.
|
static interface |
ItemListing.PropertyReorderListener<P>
Listener for column reordering events.
|
static interface |
ItemListing.PropertyResizeListener<P>
Listener for column resizing events.
|
static interface |
ItemListing.PropertyVisibilityListener<P>
Listener for column visibility change events.
|
static interface |
ItemListing.RowStyleGenerator<T>
Generator to provide the style names for an item row.
|
ItemSet.ItemCaptionGenerator<ITEM>, ItemSet.ItemIconGenerator<ITEM>Selectable.SelectionEvent<T>, Selectable.SelectionListener<T>, Selectable.SelectionModecom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener| Modifier and Type | Method and Description |
|---|---|
Object |
addItem(T item)
Adds an item to the data source.
|
void |
clear()
Clear items in data source and listing rows.
|
void |
commit()
Updates all changes since the previous commit.
|
void |
discard()
Discards all changes since last commit.
|
Optional<T> |
getItem(Object itemId)
Get the item identified by given
itemId. |
List<P> |
getPropertyColumns()
Gets the current displayed item properties as listing columns
|
boolean |
isBuffered()
Get whether the listing is in buffered mode.
|
boolean |
isFooterVisible()
Returns whether the listing footer is visible.
|
boolean |
isItemDetailsVisible(T item)
Gets whether the row details component for given
item is visible. |
void |
refreshItem(T item)
Refresh given item in data source
|
boolean |
removeItem(T item)
Removes given item from the data source.
|
void |
scrollToItem(T item)
Scrolls listing viewport to show the given item , if present.
|
void |
scrollToTop()
Scrolls listing rows to top (i.e. to the first row, if any)
|
void |
selectAll()
Select all available items.
|
void |
setFooterVisible(boolean visible)
Sets whether the listing footer is visible.
|
void |
setItemDetailsVisible(T item,
boolean visible)
Set whether to show the row details component for given
item. |
void |
setPropertyColumnVisible(P property,
boolean visible)
Show or hide the column bound to given
property. |
void |
setSelectionMode(Selectable.SelectionMode selectionMode)
Set the listing selection mode
|
void |
sort(ItemDataSource.ItemSort<P>... sorts)
Sort the listing using given
ItemDataSource.ItemSort directives. |
addSelectionListener, deselect, deselectAll, getFirstSelectedItem, getSelectedItems, getSelectionMode, isSelected, selectaddListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesignaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerList<P> getPropertyColumns()
void setPropertyColumnVisible(P property, boolean visible)
property.property - Property to show or hide (not null)visible - true to show the column bound to given property, false to
hide itIllegalArgumentException - If specified property is not bound to any columnboolean isFooterVisible()
true if footer is visible, false otherwisevoid setFooterVisible(boolean visible)
visible - true to set the footer visible, false otherwiseboolean isItemDetailsVisible(T item)
item is visible.item - Item to check whether the row details component is visible (not null)true if row details component is visible for given item, false otherwisevoid setItemDetailsVisible(T item, boolean visible) throws UnsupportedOperationException
item.item - Item for which to show or hide the row details (not null)visible - true to show the row details component, false to hide itUnsupportedOperationException - If the concrete listing component does not support a row details componentvoid scrollToTop()
void scrollToItem(T item)
item - Item to scroll to (not null)void sort(ItemDataSource.ItemSort<P>... sorts)
ItemDataSource.ItemSort directives.sorts - Item sorts to applyvoid clear()
void setSelectionMode(Selectable.SelectionMode selectionMode)
selectionMode - The selection mode to set (not null)void selectAll()
Optional<T> getItem(Object itemId)
itemId.itemId - Item id (not null)itemId, empty if not foundObject addItem(T item)
item - The item to add (not null)boolean removeItem(T item)
item - Item to remove (not null)true if the item was successfully removed from data sourcevoid refreshItem(T item)
item - Item to refresh (not null)UnsupportedOperationException - If the refresh operation is not supported by concrete data storevoid commit()
void discard()
boolean isBuffered()
Copyright © 2019 The Holon Platform. All rights reserved.