com.holonplatform.vaadin7.components.builders

## Interface ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>>

- Type Parameters:
    `T` - Item data type
    `P` - Item property type
    `C` - Component type
    `B` - Concrete builder type
  All Superinterfaces:
    BaseItemDataSourceComponentBuilder<B>, ComponentBuilder<C,B>, ComponentConfigurator<B>, ComponentPostProcessorSupport<com.vaadin.ui.Grid,B>, ItemDataSourceComponentBuilder<T,C,B>, ItemListingBuilder<T,P,C,B,com.vaadin.ui.Grid>
  All Known Subinterfaces:
    ItemListingBuilder.GridItemListingBuilder<T>, PropertyListingBuilder.GridPropertyListingBuilder
  Enclosing interface:
    ItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder<T,P,C,B,X>,X extends com.vaadin.ui.Component>

      public static interface ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>>
      extends ItemListingBuilder<T,P,C,B,com.vaadin.ui.Grid>

  Base builder to create an `ItemListing` with a `Grid` as backing component.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin7.components.builders.ItemListingBuilder

      `ItemListingBuilder.BaseGridItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>>, ItemListingBuilder.BaseTableItemListingBuilder<T,P,C extends ItemListing<T,P>,B extends ItemListingBuilder.BaseTableItemListingBuilder<T,P,C,B>>, ItemListingBuilder.FooterBuilder, ItemListingBuilder.GridFooterGenerator<T,P>, ItemListingBuilder.GridItemListingBuilder<T>, ItemListingBuilder.GridSection<ROWTYPE extends com.vaadin.ui.Grid.StaticSection.StaticRow<?>>, ItemListingBuilder.HeaderBuilder, ItemListingBuilder.TableFooterGenerator<T,P>, ItemListingBuilder.TableItemListingBuilder<T>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin7.components.builders.ComponentConfigurator

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `commitOnRemove()` Sets to call `ItemListing.commit()` to confirm item modifications in data source when an item is removed using `ItemListing.removeItem(Object)`.
    `B` | `commitOnSave()` Sets to call `ItemListing.commit()` to confirm item modifications in data source when the editor Save action is triggered.
    `B` | `detailsGenerator(ItemListing.ItemDetailsGenerator<T> detailsGenerator)` Set the `ItemListing.ItemDetailsGenerator` to generate row details component
    `B` | `editorCancelCaption(com.holonplatform.core.i18n.Localizable caption)` Set the caption for the editor Cancel button.
    `default B` | `editorCancelCaption(String caption)` Set the caption for the editor Cancel button
    `default B` | `editorCancelCaption(String caption, String messageCode)` Set the caption for the editor Cancel button
    `B` | `editorSaveCaption(com.holonplatform.core.i18n.Localizable caption)` Set the caption for the editor Save button.
    `default B` | `editorSaveCaption(String caption)` Set the caption for the editor Save button.
    `default B` | `editorSaveCaption(String caption, String messageCode)` Set the caption for the editor Save button.
    `B` | `expandRatio(P property, int expandRatio)` Set the expandRatio for the column which corresponds to given property.
    `B` | `footer(ItemListingBuilder.FooterBuilder builder)` Set the listing footer builder to create and manage footer rows
    `B` | `footerGenerator(ItemListingBuilder.GridFooterGenerator<T,P> footerGenerator)` Set a `ItemListingBuilder.GridFooterGenerator` to update footer contents when item set changes.
    `B` | `frozenColumns(int frozenColumnsCount)` Sets the number of frozen columns in this listing.
    `B` | `header(ItemListingBuilder.HeaderBuilder builder)` Set the listing header builder to create and manage header rows.
    `B` | `heightByContents()` Set the height of the listing defined by its contents.
    `B` | `heightByRows(double rows)` Set the height of the listing by defined by a number of rows.
    `B` | `hidingToggleCaption(P property, com.holonplatform.core.i18n.Localizable hidingToggleCaption)` Sets the caption of the hiding toggle for the column which corresponds to given property.
    `default B` | `hidingToggleCaption(P property, String hidingToggleCaption)` Sets the caption of the hiding toggle for the column which corresponds to given property.
    `default B` | `hidingToggleCaption(P property, String hidingToggleCaption, String messageCode)` Sets the caption of the hiding toggle for the column which corresponds to given property.
    `B` | `maxWidth(P property, int widthInPixels)` Set the maximum width in pixels for the column which corresponds to given property.
    `B` | `minWidth(P property, int widthInPixels)` Set the minimum width in pixels for the column which corresponds to given property.
    `B` | `resizable(P property, boolean resizable)` Sets whether the column which corresponds to given property is resizable by the user.

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ItemListingBuilder

      `alignment, buffered, build, build, columnHidingAllowed, columnReorderingAllowed, commitHandler, defaultValue, editable, editable, editor, footerVisible, header, header, header, hidable, hidden, hideHeaders, itemDescriptionGenerator, readOnly, selectionMode, sortable, sortGenerator, sortUsing, style, style, width, withItemClickListener, withPropertyReorderListener, withPropertyResizeListener, withPropertyVisibilityListener, withRowStyle, withSelectionListener`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ItemDataSourceComponentBuilder

      `dataSource, dataSource, itemAdapter`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.BaseItemDataSourceComponentBuilder

      `autoRefresh, batchSize, defaultSort, fixedFilter, fixedSort, maxCacheSize, queryParameter, withQueryConfigurationProvider`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ComponentBuilder

      `build, deferLocalization`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ComponentConfigurator

      `caption, 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, withShortcutListener`

    - ### Methods inherited from interface com.holonplatform.vaadin7.components.builders.ComponentPostProcessorSupport

      `withPostProcessor`

- - ### Method Detail

    - #### heightByContents

          B heightByContents()

      Set the height of the listing defined by its contents.
      Returns:
        this

    - #### heightByRows

          B heightByRows(double rows)

      Set the height of the listing by defined by a number of rows.
      Parameters:
        `rows` - Number of rows that should be visible in grid's body
      Returns:
        this

    - #### minWidth

          B minWidth(P property,
                     int widthInPixels)

      Set the minimum width in pixels for the column which corresponds to given property.
      Parameters:
        `property` - Item property to set the width for (not null)
        `widthInPixels` - Minimum width in pixel
      Returns:
        this

    - #### maxWidth

          B maxWidth(P property,
                     int widthInPixels)

      Set the maximum width in pixels for the column which corresponds to given property.
      Parameters:
        `property` - Item property to set the width for (not null)
        `widthInPixels` - Maximum width in pixel
      Returns:
        this

    - #### expandRatio

          B expandRatio(P property,
                        int expandRatio)

      Set the expandRatio for the column which corresponds to given property.

      By default, all columns expand equally (treated as if all of them had an expand ratio of 1). Once at least one column gets a defined expand ratio, the implicit expand ratio is removed, and only the defined expand ratios are taken into account.

      If a column has a defined width, it overrides this method's effects.

      Example: A grid with three columns, with expand ratios 0, 1 and 2, respectively. The column with a ratio of 0 is exactly as wide as its contents requires. The column with a ratio of 1 is as wide as it needs, plus a third of any excess space, because we have 3 parts total, and this column reserves only one of those. The column with a ratio of 2, is as wide as it needs to be, plus two thirds of the excess width.

      Parameters:
        `property` - Item property to set the expand ratio for (not null)
        `expandRatio` - Column expand ratio. `0` to not have it expand at all
      Returns:
        this

    - #### hidingToggleCaption

          B hidingToggleCaption(P property,
                                com.holonplatform.core.i18n.Localizable hidingToggleCaption)

      Sets the caption of the hiding toggle for the column which corresponds to given property. Shown in the toggle for this column in the grid's sidebar when the column is hidable.
      Parameters:
        `property` - Item property to set the caption for (not null)
        `hidingToggleCaption` - Localizable hiding toggle caption (not null)
      Returns:
        this

    - #### hidingToggleCaption

          default B hidingToggleCaption(P property,
                                        String hidingToggleCaption)

      Sets the caption of the hiding toggle for the column which corresponds to given property. Shown in the toggle for this column in the grid's sidebar when the column is hidable.
      Parameters:
        `property` - Item property to set the caption for (not null)
        `hidingToggleCaption` - Hiding toggle caption
      Returns:
        this

    - #### hidingToggleCaption

          default B hidingToggleCaption(P property,
                                        String hidingToggleCaption,
                                        String messageCode)

      Sets the caption of the hiding toggle for the column which corresponds to given property. Shown in the toggle for this column in the grid's sidebar when the column is hidable.
      Parameters:
        `property` - Item property to set the caption for (not null)
        `hidingToggleCaption` - Hiding toggle caption default message
        `messageCode` - Hiding toggle caption localization message code
      Returns:
        this

    - #### resizable

          B resizable(P property,
                      boolean resizable)

      Sets whether the column which corresponds to given property is resizable by the user.
      Parameters:
        `property` - Item property to set resizable or not (not null)
        `resizable` - `true` if the column which corresponds to given property is resizable by the user
      Returns:
        this

    - #### frozenColumns

          B frozenColumns(int frozenColumnsCount)

      Sets the number of frozen columns in this listing. Setting the count to 0 means that no data columns will be frozen, but the built-in selection checkbox column will still be frozen if it's in use. Setting the count to -1 will also disable the selection column.
      Parameters:
        `frozenColumnsCount` - The number of columns that should be frozen
      Returns:
        this

    - #### editorSaveCaption

          B editorSaveCaption(com.holonplatform.core.i18n.Localizable caption)

      Set the caption for the editor Save button.
      Parameters:
        `caption` - Localizable caption (not null)
      Returns:
        this

    - #### editorSaveCaption

          default B editorSaveCaption(String caption)

      Set the caption for the editor Save button.
      Parameters:
        `caption` - Button caption
      Returns:
        this

    - #### editorSaveCaption

          default B editorSaveCaption(String caption,
                                      String messageCode)

      Set the caption for the editor Save button.
      Parameters:
        `caption` - Button caption
        `messageCode` - Caption translation message code
      Returns:
        this

    - #### editorCancelCaption

          B editorCancelCaption(com.holonplatform.core.i18n.Localizable caption)

      Set the caption for the editor Cancel button.
      Parameters:
        `caption` - Localizable caption (not null)
      Returns:
        this

    - #### editorCancelCaption

          default B editorCancelCaption(String caption)

      Set the caption for the editor Cancel button
      Parameters:
        `caption` - Button caption
      Returns:
        this

    - #### editorCancelCaption

          default B editorCancelCaption(String caption,
                                        String messageCode)

      Set the caption for the editor Cancel button
      Parameters:
        `caption` - Button caption
        `messageCode` - Optional caption translation message code
      Returns:
        this

    - #### commitOnSave

          B commitOnSave()

      Sets to call `ItemListing.commit()` to confirm item modifications in data source when the editor Save action is triggered.
      Returns:
        this

    - #### commitOnRemove

          B commitOnRemove()

      Sets to call `ItemListing.commit()` to confirm item modifications in data source when an item is removed using `ItemListing.removeItem(Object)`.
      Returns:
        this

    - #### header

          B header(ItemListingBuilder.HeaderBuilder builder)

      Set the listing header builder to create and manage header rows.
      Parameters:
        `builder` - Header builder (not null)
      Returns:
        this

    - #### footer

          B footer(ItemListingBuilder.FooterBuilder builder)

      Set the listing footer builder to create and manage footer rows
      Parameters:
        `builder` - Footer builder (not null)
      Returns:
        this

    - #### footerGenerator

          B footerGenerator(ItemListingBuilder.GridFooterGenerator<T,P> footerGenerator)

      Set a `ItemListingBuilder.GridFooterGenerator` to update footer contents when item set changes.
      Parameters:
        `footerGenerator` - Footer generator
      Returns:
        this

    - #### detailsGenerator

          B detailsGenerator(ItemListing.ItemDetailsGenerator<T> detailsGenerator)

      Set the `ItemListing.ItemDetailsGenerator` to generate row details component
      Parameters:
        `detailsGenerator` - Item details generator (not null)
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.