THIS - Self-referential generic THISITEM - the item object type in the listingpublic interface FluentGrid<THIS extends FluentGrid<THIS,ITEM>,ITEM> extends FluentAbstractListing<THIS,ITEM>, FluentHasComponents<THIS>, FluentHasDataProvider<THIS,ITEM>, FluentSortNotifier<THIS,com.vaadin.data.provider.GridSortOrder<ITEM>>
GridGridFluentHasComponents.FluentComponentAttachDetachNotifier<THIS extends FluentHasComponents<THIS>>com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenercom.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 |
|---|---|
default THIS |
withColumnOrder(com.vaadin.ui.Grid.Column<ITEM,?>... columns)
Sets a new column order for the grid.
|
default THIS |
withColumnOrder(String... columnIds)
Sets a new column order for the grid based on their column ids.
|
default THIS |
withColumnReorderingAllowed(boolean columnReorderingAllowed)
Sets whether or not column reordering is allowed.
|
default THIS |
withColumnResizeMode(com.vaadin.shared.ui.grid.ColumnResizeMode mode)
Sets the column resize mode to use.
|
default THIS |
withColumns(String... columnIds)
Sets the columns and their order based on their column ids.
|
default THIS |
withDataProvider(com.vaadin.ui.Grid.FetchItemsCallback<ITEM> fetchItems,
com.vaadin.server.SerializableSupplier<Integer> sizeCallback)
Sets a CallbackDataProvider using the given fetch items callback and a
size callback.
|
default THIS |
withDefaultHeaderRow(com.vaadin.ui.components.grid.HeaderRow row)
Sets the default row of the header.
|
default THIS |
withDescriptionGenerator(com.vaadin.ui.components.grid.DescriptionGenerator<ITEM> descriptionGenerator)
Sets the description generator that is used for generating descriptions
for rows.
|
default THIS |
withDetailsGenerator(com.vaadin.ui.components.grid.DetailsGenerator<ITEM> generator)
Sets the details component generator.
|
default THIS |
withFooterVisible(boolean footerVisible)
Sets the visibility of the Footer in this Grid.
|
default THIS |
withFrozenColumnCount(int numberOfColumns)
Sets the number of frozen columns in this grid.
|
default THIS |
withHeaderVisible(boolean headerVisible)
Sets the visibility of the Header in this Grid.
|
default THIS |
withHeightByRows(double rows)
Sets the number of rows that should be visible in Grid's body.
|
default THIS |
withItemClickListener(com.vaadin.ui.components.grid.ItemClickListener<? super ITEM> listener)
Adds an item click listener.
|
default THIS |
withRowHeight(double rowHeight)
Sets the height of a row.
|
default THIS |
withSelectionListener(com.vaadin.event.selection.SelectionListener<ITEM> listener)
Adds a selection listener to the current selection model.
|
default THIS |
withSelectionMode(com.vaadin.ui.Grid.SelectionMode selectionMode)
Sets the grid's selection mode.
|
default THIS |
withSort(com.vaadin.ui.Grid.Column<ITEM,?> column)
Sort this Grid in ascending order by a specified column.
|
default THIS |
withSort(com.vaadin.ui.Grid.Column<ITEM,?> column,
com.vaadin.shared.data.sort.SortDirection direction)
Sort this Grid in user-specified direction by a column.
|
default THIS |
withSort(String columnId)
Sort this Grid in ascending order by a specified column defined by id.
|
default THIS |
withSort(String columnId,
com.vaadin.shared.data.sort.SortDirection direction)
Sort this Grid in a user-specified direction by a column defined by id.
|
default THIS |
withSortOrder(com.vaadin.data.provider.GridSortOrderBuilder<ITEM> builder)
Sets the sort order to use, given a
GridSortOrderBuilder. |
default THIS |
withSortOrder(List<com.vaadin.data.provider.GridSortOrder<ITEM>> order)
Sets the sort order to use.
|
default THIS |
withStyleGenerator(com.vaadin.ui.StyleGenerator<ITEM> styleGenerator)
Sets the style generator that is used for generating class names for rows
in this grid.
|
withCaption, withCaptionAsHtml, withComponentError, withData, withDescription, withDescription, withLocale, withResponsive, withShortcutListener, withStyleNamewithAttachListener, withDetachListenerwithContextClickListeneraddContextClickListener, removeContextClickListenerwithTabIndexforEach, spliteratorwithDataProvider, withItemswithItems, withItemsaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesignaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedwithSortListenerdefault THIS withItemClickListener(com.vaadin.ui.components.grid.ItemClickListener<? super ITEM> listener)
Grid is clicked.listener - the item click listener, not nullGrid.addItemClickListener(ItemClickListener)default THIS withSelectionListener(com.vaadin.event.selection.SelectionListener<ITEM> listener) throws UnsupportedOperationException
NOTE: If selection mode is switched with
Grid.setSelectionMode(SelectionMode), then this listener is not
triggered anymore when selection changes!
This is a shorthand for
grid.getSelectionModel().addSelectionListener(). To get more
detailed selection events, use Grid.getSelectionModel() and either
SingleSelectionModel.addSingleSelectionListener(SingleSelectionListener)
or
MultiSelectionModel.addMultiSelectionListener(MultiSelectionListener)
depending on the used selection mode.
listener - the listener to addUnsupportedOperationException - if selection has been disabled with Grid.SelectionMode.NONEGrid.addSelectionListener(SelectionListener)default THIS withColumnOrder(com.vaadin.ui.Grid.Column<ITEM,?>... columns)
columns - the columns in the order they should beGrid.setColumnOrder(Column...)default THIS withColumnOrder(String... columnIds)
columnIds - the column ids in the order they should beGrid.setColumnOrder(String...)default THIS withColumnReorderingAllowed(boolean columnReorderingAllowed)
false.columnReorderingAllowed - specifies whether column reordering is allowedGrid.setColumnReorderingAllowed(boolean)default THIS withColumnResizeMode(com.vaadin.shared.ui.grid.ColumnResizeMode mode)
ColumnResizeMode.ANIMATED.mode - a ColumnResizeMode valueGrid.setColumnResizeMode(ColumnResizeMode)default THIS withColumns(String... columnIds)
Grid created using Grid.Grid(Class) or
Grid.withPropertySet(PropertySet).columnIds - the column ids to setGrid.setColumns(String...)default THIS withDataProvider(com.vaadin.ui.Grid.FetchItemsCallback<ITEM> fetchItems, com.vaadin.server.SerializableSupplier<Integer> sizeCallback)
This method is a shorthand for making a CallbackDataProvider that
handles a partial Query object.
fetchItems - a callback for fetching itemssizeCallback - a callback for getting the count of itemsGrid.setDataProvider(FetchItemsCallback, SerializableSupplier),
CallbackDataProviderdefault THIS withDefaultHeaderRow(com.vaadin.ui.components.grid.HeaderRow row)
row - the new default row, or null for no default rowIllegalArgumentException - if the header does not contain the rowGrid.setDefaultHeaderRow(HeaderRow)default THIS withDescriptionGenerator(com.vaadin.ui.components.grid.DescriptionGenerator<ITEM> descriptionGenerator)
descriptionGenerator - the row description generator to set, or null to
remove a previously set generatorGrid.setDescriptionGenerator(DescriptionGenerator)default THIS withDetailsGenerator(com.vaadin.ui.components.grid.DetailsGenerator<ITEM> generator)
generator - the generator for details componentsGrid.setDetailsGenerator(DetailsGenerator)default THIS withFooterVisible(boolean footerVisible)
footerVisible - true if visible; false if notGrid.setFooterVisible(boolean)default THIS withHeaderVisible(boolean headerVisible)
headerVisible - true if visible; false if notGrid.setHeaderVisible(boolean)default THIS withFrozenColumnCount(int numberOfColumns)
NOTE: this count includes hidden
columns in the count.
The default value is 0.
numberOfColumns - the number of columns that should be frozenIllegalArgumentException - if the column count is less than -1 or greater than the
number of visible columnsGrid.setFrozenColumnCount(int)default THIS withHeightByRows(double rows)
HeightMode.ROW.rows - The height in terms of number of rows displayed in Grid's
body. If Grid doesn't contain enough rows, white space is
displayed instead. If null is given, then Grid's
height is undefinedIllegalArgumentException - if rows is zero or lessIllegalArgumentException - if rows is infiniteIllegalArgumentException - if rows is NaNGrid.setHeightByRows(double)default THIS withRowHeight(double rowHeight)
Note that all header, body and footer rows get the same height if explicitly set. In automatic mode, each section is calculated separately based on an empty row of that type.
rowHeight - The height of a row in pixels or -1 for automatic calculationGrid.setRowHeight(double)default THIS withSelectionMode(com.vaadin.ui.Grid.SelectionMode selectionMode)
The built-in selection models are:
Grid.SelectionMode.SINGLE -< SingleSelectionModelImpl,
the default modelGrid.SelectionMode.MULTI -< MultiSelectionModelImpl, with
checkboxes in the first column for selectionGrid.SelectionMode.NONE -< NoSelectionModel, preventing
selection
To use your custom selection model, you can use
Grid.setSelectionModel(GridSelectionModel), see existing selection
model implementations for example.
selectionMode - the selection mode to switch to, not nullGrid.setSelectionMode(SelectionMode)default THIS withSortOrder(com.vaadin.data.provider.GridSortOrderBuilder<ITEM> builder)
GridSortOrderBuilder.
Shorthand for setSortOrder(builder.build()).builder - the sort builder to retrieve the sort order fromNullPointerException - if builder is nullGridSortOrderBuilder,
Grid.setSortOrder(GridSortOrderBuilder)default THIS withSortOrder(List<com.vaadin.data.provider.GridSortOrder<ITEM>> order)
order - a sort order list.IllegalArgumentException - if order is nullGrid.setSortOrder(List)default THIS withStyleGenerator(com.vaadin.ui.StyleGenerator<ITEM> styleGenerator)
styleGenerator - the row style generator to set, not nullNullPointerException - if styleGenerator is nullStyleGenerator,
Grid.setStyleGenerator(StyleGenerator)default THIS withSort(com.vaadin.ui.Grid.Column<ITEM,?> column)
column - a column to sort againstGrid.sort(Column)default THIS withSort(com.vaadin.ui.Grid.Column<ITEM,?> column, com.vaadin.shared.data.sort.SortDirection direction)
column - a column to sort againstdirection - a sort order value (ascending/descending)Grid.sort(Column, SortDirection)default THIS withSort(String columnId)
columnId - the id of the column to sort againstGrid.sort(String)default THIS withSort(String columnId, com.vaadin.shared.data.sort.SortDirection direction)
columnId - the id of the column to sort againstdirection - a sort order value (ascending/descending)Grid.sort(String, SortDirection)Copyright © 2017 Jean-Christophe Fortier. All rights reserved.