T - Item data typeC - Component typeP - Item property typeB - Concrete builder typeX - Concrete backing component typepublic interface ItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder<T,P,C,B,X>,X extends com.vaadin.ui.Component> extends ItemDataSourceComponentBuilder<T,C,B>, ComponentPostProcessorSupport<X,B>
ItemListing builder.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>>
Base builder to create an
ItemListing with a Grid as backing component. |
static interface |
ItemListingBuilder.BaseTableItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseTableItemListingBuilder<T,P,C,B>>
Base builder to create an
ItemListing with a Table as backing component. |
static interface |
ItemListingBuilder.FooterBuilder
Builder to create and manage Footer rows.
|
static interface |
ItemListingBuilder.GridFooterGenerator<T,P>
Generator for footer contents.
|
static interface |
ItemListingBuilder.GridItemListingBuilder<T>
Builder to create an
ItemListing with a Grid as backing component. |
static interface |
ItemListingBuilder.GridSection<ROWTYPE extends com.vaadin.ui.Grid.StaticSection.StaticRow<?>> |
static interface |
ItemListingBuilder.HeaderBuilder
Builder to create and manage Header rows.
|
static interface |
ItemListingBuilder.TableFooterGenerator<T,P>
Generator for footer contents.
|
static interface |
ItemListingBuilder.TableItemListingBuilder<T>
Builder to create an
ItemListing with a Table as backing component. |
ComponentConfigurator.BaseComponentConfigurator| Modifier and Type | Method and Description |
|---|---|
B |
alignment(P property,
ItemListing.ColumnAlignment alignment)
Set the text alignment for the column which corresponds to given property.
|
B |
buffered(boolean buffered)
Set whether the editor mode is buffered or not.
|
C |
build(Iterable<P> visibleColumns)
Build the
ItemListing instance, setting given properties as visible columns. |
default C |
build(P... visibleColumns)
Build the
ItemListing instance, setting given properties as visible columns. |
B |
columnHidingAllowed(boolean columnHidingAllowed)
Sets whether column hiding by user is allowed or not.
|
B |
columnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether column reordering is allowed or not.
|
B |
commitHandler(ItemDataSource.CommitHandler<T> commitHandler)
Set the handler to use to persist item set modifications.
|
B |
defaultValue(P property,
Object defaultValue)
Set a default value to initialize the given
property. |
B |
editable(boolean editable)
Set whether the listing is editable.
|
B |
editable(P property,
boolean editable)
Set whether the column which corresponds to given property is editable when listing is in edit mode
(
true by default). |
B |
editor(P property,
com.vaadin.ui.Field<?> editor)
Set the editor
Field to use for given property in edit mode to obtain the field to use as property
editor. |
B |
footerVisible(boolean footerVisible)
Set whether the listing footer is visible.
|
B |
header(P property,
com.holonplatform.core.i18n.Localizable header)
Set the column header to show for given
property. |
default B |
header(P property,
String header)
Set the column header to show for given
property. |
default B |
header(P property,
String defaultHeader,
String headerMessageCode)
Set the column header to show for given
property. |
B |
hidable(P property,
boolean hidable)
Sets whether the column which corresponds to given property can be hidden by the user.
|
B |
hidden(P property,
boolean hidden)
Sets whether this column which corresponds to given property is hidden.
|
B |
hideHeaders()
Hides the table/grid column headers
|
B |
itemDescriptionGenerator(ItemListing.ItemDescriptionGenerator<T> rowDescriptionGenerator)
Set the
ItemListing.ItemDescriptionGenerator to use to generate item descriptions (tooltips). |
B |
readOnly(P property,
boolean readOnly)
Set whether given property is read-only.
|
B |
selectionMode(Selectable.SelectionMode selectionMode)
Set the listing selection mode.
|
B |
sortable(P property,
boolean sortable)
Set whether given property is sortable.
|
B |
sortGenerator(P property,
ItemDataSource.PropertySortGenerator<P> generator)
|
B |
sortUsing(P property,
com.holonplatform.core.Path<?> sortPath)
Declares to use specified
Path to generate query sorts for given property. |
B |
style(P property,
ItemListing.CellStyleGenerator<T,P> cellStyleGenerator)
Set the
ItemListing.CellStyleGenerator to call for given property to generate column cell style. |
default B |
style(P property,
String styleName)
Set the column cell style name for given
property |
B |
width(P property,
int widthInPixels)
Set the width in pixels for the column which corresponds to given property.
|
B |
withItemClickListener(ItemListing.ItemClickListener<T,P> listener)
Adds a
ItemListing.ItemClickListener that gets notified when an item is clicked by the user. |
B |
withPropertyReorderListener(ItemListing.PropertyReorderListener<P> listener)
Adds a
ItemListing.PropertyReorderListener that gets notified when property columns order changes. |
B |
withPropertyResizeListener(ItemListing.PropertyResizeListener<P> listener)
Adds a
ItemListing.PropertyResizeListener that gets notified when a property column is resized. |
B |
withPropertyVisibilityListener(ItemListing.PropertyVisibilityListener<P> listener)
Adds a
ItemListing.PropertyVisibilityListener that gets notified when a property column is hidden or shown. |
B |
withRowStyle(ItemListing.RowStyleGenerator<T> rowStyleGenerator)
Add a
ItemListing.RowStyleGenerator to generate row style names. |
B |
withSelectionListener(Selectable.SelectionListener<T> selectionListener)
Add a
Selectable.SelectionListener to listen to items selection changes. |
dataSource, dataSource, itemAdapterautoRefresh, batchSize, defaultSort, fixedFilter, fixedSort, maxCacheSize, queryParameter, withQueryConfigurationProviderbuild, deferLocalizationcaption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, immediate, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListenerwithPostProcessorB sortable(P property, boolean sortable)
property - Property (not null)sortable - Whether given property id is sortableB readOnly(P property, boolean readOnly)
property - Property (not null)readOnly - Whether given property id is read-onlyB defaultValue(P property, Object defaultValue)
property.property - Property (not null)defaultValue - Default valueB sortUsing(P property, com.holonplatform.core.Path<?> sortPath)
Path to generate query sorts for given property.property - Property for which to declare the sort path (not null)sortPath - Sort path to use (not null)B sortGenerator(P property, ItemDataSource.PropertySortGenerator<P> generator)
property - Property to sort (not null)generator - PropertySortGenerator (not null)B commitHandler(ItemDataSource.CommitHandler<T> commitHandler)
commitHandler - Handler to set (not null)B hideHeaders()
B withRowStyle(ItemListing.RowStyleGenerator<T> rowStyleGenerator)
ItemListing.RowStyleGenerator to generate row style names.rowStyleGenerator - Row style generatorB header(P property, com.holonplatform.core.i18n.Localizable header)
property.
By default, if the property is Localizable, the Localizable.getMessage() (and
Localizable.getMessageCode() if a LocalizationContext is available) is used as column header.
property - Item property to set the header for (not null)header - Localizable column header (not null)default B header(P property, String header)
property.property - Item property to set the header for (not null)header - Column headerdefault B header(P property, String defaultHeader, String headerMessageCode)
property.property - Item property to set the header for (not null)defaultHeader - Default column headerheaderMessageCode - Column header translation message codeB alignment(P property, ItemListing.ColumnAlignment alignment)
property - Item property to set the alignment for (not null)alignment - AlignmentB width(P property, int widthInPixels)
property - Item property to set the width for (not null)widthInPixels - Width in pixelB editable(P property, boolean editable)
true by default).property - Item property to set editable or not (not null)editable - true to set the column editable, false otherwiseB editor(P property, com.vaadin.ui.Field<?> editor)
Field to use for given property in edit mode to obtain the field to use as property
editor.property - Item property to set the editor for (not null)editor - Editor field to set (not null)B hidable(P property, boolean hidable)
property - Item property to set hidable or not (not null)hidable - true if the column which corresponds to given property can be hidden by the userB hidden(P property, boolean hidden)
property - Item property to set hidden or not (not null)hidden - true if column is hiddenB style(P property, ItemListing.CellStyleGenerator<T,P> cellStyleGenerator)
ItemListing.CellStyleGenerator to call for given property to generate column cell style.property - Item property to set the style generator for (not null)cellStyleGenerator - Cell style generator (not null)default B style(P property, String styleName)
propertyproperty - Item property to set the style for (not null)styleName - The property column style nameB buffered(boolean buffered)
true.
When buffered, the listing component requires a specific action to commit item modifications to persistence
store, using ItemListing.commit(). A listing using a Grid as backing component provides Save and
Cancel editor buttonsto commit or discard item changes.
buffered - Buffered mode to setB selectionMode(Selectable.SelectionMode selectionMode)
selectionMode - Selection mode to set (not null). Use Selectable.SelectionMode.NONE to disable selection.B withSelectionListener(Selectable.SelectionListener<T> selectionListener)
Selectable.SelectionListener to listen to items selection changes.
Selectable.SelectionListeners are triggred only when listing is selectable, i.e. (i.e. Selectable.SelectionMode is not
Selectable.SelectionMode.NONE).
selectionListener - Selection listener to add (not null)B editable(boolean editable)
editable - true to set the listing editable, false otherwiseB withItemClickListener(ItemListing.ItemClickListener<T,P> listener)
ItemListing.ItemClickListener that gets notified when an item is clicked by the user.listener - ItemClickListener to add (not null)B withPropertyReorderListener(ItemListing.PropertyReorderListener<P> listener)
ItemListing.PropertyReorderListener that gets notified when property columns order changes.listener - Listener to add (not null)B withPropertyResizeListener(ItemListing.PropertyResizeListener<P> listener)
ItemListing.PropertyResizeListener that gets notified when a property column is resized.listener - Listener to add (not null)B withPropertyVisibilityListener(ItemListing.PropertyVisibilityListener<P> listener)
ItemListing.PropertyVisibilityListener that gets notified when a property column is hidden or shown.listener - Listener to add (not null)B itemDescriptionGenerator(ItemListing.ItemDescriptionGenerator<T> rowDescriptionGenerator)
ItemListing.ItemDescriptionGenerator to use to generate item descriptions (tooltips).rowDescriptionGenerator - Generator to set (not null)B columnHidingAllowed(boolean columnHidingAllowed)
columnHidingAllowed - true if column hiding is allowedB columnReorderingAllowed(boolean columnReorderingAllowed)
columnReorderingAllowed - true if column reordering is allowedB footerVisible(boolean footerVisible)
footerVisible - whether the listing footer is visibledefault C build(P... visibleColumns)
ItemListing instance, setting given properties as visible columns.
Use ComponentBuilder.build() to build an ItemListing using all data source properties as visible columns.
visibleColumns - Visible column properties (not null)ItemListing componentC build(Iterable<P> visibleColumns)
ItemListing instance, setting given properties as visible columns.
Use ComponentBuilder.build() to build an ItemListing using all data source properties as visible columns.
visibleColumns - Visible column properties (not null)ItemListing componentCopyright © 2019 The Holon Platform. All rights reserved.