com.holonplatform.vaadin.components.builders

## Interface VirtualPropertyColumnBuilder<T,I,P,C extends ItemListing<I,P>,B extends ItemListingBuilder<I,P,C,B,?>>

- Type Parameters:
    `T` - Virtual property type
    `I` - Item type
    `P` - Item property type
    `C` - Item listing type
    `B` - Parent build type

      public interface VirtualPropertyColumnBuilder<T,I,P,C extends ItemListing<I,P>,B extends ItemListingBuilder<I,P,C,B,?>>

  Builder to configure and add a `VirtualProperty` column to a `PropertyListing` component.
  Since:
    5.1.4

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `B` | `add()` Add this virtual property column to the `PropertyListing`.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `alignment(ItemListing.ColumnAlignment alignment)` Set the text alignment for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayAfter(P property)` Configure this virtual property column to be displayed after the listing column bound to given `property` by default.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayAfterColumnId(String columnId)` Configure this virtual property column to be displayed after the given listing column id by default.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayAsFirst()` Configure this virtual property column to be displayed before any other standard listing column by default.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayAsLast()` Configure this virtual property column to be displayed after any other standard listing column by default.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayBefore(P property)` Configure this virtual property column to be displayed before the listing column bound to given `property` by default.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `displayBeforeColumnId(String columnId)` Configure this virtual property column to be displayed before the given listing column id by default.
    `<E extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> VirtualPropertyColumnBuilder<T,I,P,C,B>` | `editor(E editor)` Set the field to use for this virtual property in edit mode.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `expandRatio(int expandRatio)` Set the expandRatio for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `header(com.holonplatform.core.i18n.Localizable header)` Set the column header to show for this virtual property.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `header(String header)` Set the column header to show for this virtual property.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `header(String defaultHeader, String headerMessageCode)` Set the column header to show for this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `headerHTML(com.holonplatform.core.i18n.Localizable header)` Set the column header for given this virtual, displaying it as HTML.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `headerHTML(String header)` Set the column header for given this virtual property, displaying it as HTML.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `headerHTML(String defaultHeader, String headerMessageCode)` Set the column header for this virtual property, displaying it as HTML.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `headerMode(ItemListingBuilder.ColumnHeaderMode headerMode)` Set the column header display mode for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `hidable(boolean hidable)` Sets whether the column which corresponds to this virtual property can be hidden by the user.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `hidden(boolean hidden)` Sets whether the column which corresponds to this virtual property is hidden.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `hidingToggleCaption(com.holonplatform.core.i18n.Localizable hidingToggleCaption)` Sets the caption of the hiding toggle for the column which corresponds to this virtual property.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `hidingToggleCaption(String hidingToggleCaption)` Sets the caption of the hiding toggle for the column which corresponds to this virtual property.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `hidingToggleCaption(String hidingToggleCaption, String messageCode)` Sets the caption of the hiding toggle for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `maxWidth(int widthInPixels)` Set the maximum width in pixels for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `minimumWidthFromContent(boolean minimumWidthFromContent)` Sets whether the width of the contents in the column which corresponds to this virtual property should be considered minimum width for this column.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `minWidth(int widthInPixels)` Set the minimum width in pixels for the column which corresponds to this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `render(com.vaadin.ui.renderers.Renderer<? super T> renderer)` Set a custom `Renderer` for this virtual property.
    `<D> VirtualPropertyColumnBuilder<T,I,P,C,B>` | `render(com.vaadin.data.ValueProvider<T,D> presentationProvider, com.vaadin.ui.renderers.Renderer<? super D> renderer)` Set a custom `Renderer` and presentation provider for this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `resizable(boolean resizable)` Sets whether the column which corresponds to this virtual property is resizable by the user.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `sortGenerator(ItemDataSource.PropertySortGenerator<P> generator)` Set a `ItemDataSource.PropertySortGenerator` to generate `QuerySort`s for this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `sortUsing(com.holonplatform.core.Path<?> sortPath)` Declares to use specified `Path` to generate query sorts for this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `style(ItemListing.CellStyleGenerator<I,P> cellStyleGenerator)` Set the `ItemListing.CellStyleGenerator` to call for this virtual property to generate column cell style.
    `default VirtualPropertyColumnBuilder<T,I,P,C,B>` | `style(String styleName)` Set the column cell style name for this virtual property.
    `VirtualPropertyColumnBuilder<T,I,P,C,B>` | `width(int widthInPixels)` Set the width in pixels for the column which corresponds to this virtual property.

- - ### Method Detail

    - #### header

          VirtualPropertyColumnBuilder<T,I,P,C,B> header(com.holonplatform.core.i18n.Localizable header)

      Set the column header to show for this virtual property.
      Parameters:
        `header` - Localizable column header (not null)
      Returns:
        this

    - #### header

          default VirtualPropertyColumnBuilder<T,I,P,C,B> header(String header)

      Set the column header to show for this virtual property.
      Parameters:
        `header` - Column header
      Returns:
        this

    - #### header

          default VirtualPropertyColumnBuilder<T,I,P,C,B> header(String defaultHeader,
                                                                 String headerMessageCode)

      Set the column header to show for this virtual property.
      Parameters:
        `defaultHeader` - Default column header
        `headerMessageCode` - Column header translation message code
      Returns:
        this

    - #### alignment

          VirtualPropertyColumnBuilder<T,I,P,C,B> alignment(ItemListing.ColumnAlignment alignment)

      Set the text alignment for the column which corresponds to this virtual property.
      Parameters:
        `alignment` - Alignment
      Returns:
        this

    - #### width

          VirtualPropertyColumnBuilder<T,I,P,C,B> width(int widthInPixels)

      Set the width in pixels for the column which corresponds to this virtual property.
      Parameters:
        `widthInPixels` - Width in pixel
      Returns:
        this

    - #### hidable

          VirtualPropertyColumnBuilder<T,I,P,C,B> hidable(boolean hidable)

      Sets whether the column which corresponds to this virtual property can be hidden by the user.
      Parameters:
        `hidable` - `true` if the column which corresponds to this property can be hidden by the user
      Returns:
        this

    - #### hidden

          VirtualPropertyColumnBuilder<T,I,P,C,B> hidden(boolean hidden)

      Sets whether the column which corresponds to this virtual property is hidden.
      Parameters:
        `hidden` - `true` if column is hidden
      Returns:
        this

    - #### style

          VirtualPropertyColumnBuilder<T,I,P,C,B> style(ItemListing.CellStyleGenerator<I,P> cellStyleGenerator)

      Set the `ItemListing.CellStyleGenerator` to call for this virtual property to generate column cell style.
      Parameters:
        `cellStyleGenerator` - Cell style generator (not null)
      Returns:
        this

    - #### style

          default VirtualPropertyColumnBuilder<T,I,P,C,B> style(String styleName)

      Set the column cell style name for this virtual property.
      Parameters:
        `styleName` - The property column style name
      Returns:
        this

    - #### minWidth

          VirtualPropertyColumnBuilder<T,I,P,C,B> minWidth(int widthInPixels)

      Set the minimum width in pixels for the column which corresponds to this virtual property.
      Parameters:
        `widthInPixels` - Minimum width in pixel
      Returns:
        this

    - #### maxWidth

          VirtualPropertyColumnBuilder<T,I,P,C,B> maxWidth(int widthInPixels)

      Set the maximum width in pixels for the column which corresponds to this virtual property.
      Parameters:
        `widthInPixels` - Maximum width in pixel
      Returns:
        this

    - #### expandRatio

          VirtualPropertyColumnBuilder<T,I,P,C,B> expandRatio(int expandRatio)

      Set the expandRatio for the column which corresponds to this virtual 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.

      Parameters:
        `expandRatio` - Column expand ratio. `0` to not have it expand at all
      Returns:
        this

    - #### minimumWidthFromContent

          VirtualPropertyColumnBuilder<T,I,P,C,B> minimumWidthFromContent(boolean minimumWidthFromContent)

      Sets whether the width of the contents in the column which corresponds to this virtual property should be considered minimum width for this column.

      If this is set to `true` (default), then a column will not shrink to smaller than the width required to show the contents available when calculating the widths (only the widths of the initially rendered rows are considered).

      If this is set to `false` and the column has been set to expand using `expandRatio(...)`, then the contents of the column will be ignored when calculating the width, and the column will thus shrink down to the minimum width if necessary.

      Parameters:
        `minimumWidthFromContent` - `true` to reserve space for all contents, `false` to allow the column to shrink smaller than the contents
      Returns:
        this

    - #### hidingToggleCaption

          VirtualPropertyColumnBuilder<T,I,P,C,B> hidingToggleCaption(com.holonplatform.core.i18n.Localizable hidingToggleCaption)

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

    - #### hidingToggleCaption

          default VirtualPropertyColumnBuilder<T,I,P,C,B> hidingToggleCaption(String hidingToggleCaption)

      Sets the caption of the hiding toggle for the column which corresponds to this virtual property. Shown in the toggle for this column in the grid's sidebar when the column is hidable.
      Parameters:
        `hidingToggleCaption` - Hiding toggle caption
      Returns:
        this

    - #### hidingToggleCaption

          default VirtualPropertyColumnBuilder<T,I,P,C,B> hidingToggleCaption(String hidingToggleCaption,
                                                                              String messageCode)

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

    - #### headerMode

          VirtualPropertyColumnBuilder<T,I,P,C,B> headerMode(ItemListingBuilder.ColumnHeaderMode headerMode)

      Set the column header display mode for the column which corresponds to this virtual property.
      Parameters:
        `headerMode` - Column header mode
      Returns:
        this

    - #### headerHTML

          VirtualPropertyColumnBuilder<T,I,P,C,B> headerHTML(com.holonplatform.core.i18n.Localizable header)

      Set the column header for given this virtual, displaying it as HTML. The property/column `ItemListingBuilder.ColumnHeaderMode` will be configured as `ItemListingBuilder.ColumnHeaderMode.HTML`.
      Parameters:
        `header` - Localizable column header (not null)
      Returns:
        this

    - #### headerHTML

          default VirtualPropertyColumnBuilder<T,I,P,C,B> headerHTML(String header)

      Set the column header for given this virtual property, displaying it as HTML. The property/column `ItemListingBuilder.ColumnHeaderMode` will be configured as `ItemListingBuilder.ColumnHeaderMode.HTML`.
      Parameters:
        `header` - Column header
      Returns:
        this

    - #### headerHTML

          default VirtualPropertyColumnBuilder<T,I,P,C,B> headerHTML(String defaultHeader,
                                                                     String headerMessageCode)

      Set the column header for this virtual property, displaying it as HTML. The property/column `ItemListingBuilder.ColumnHeaderMode` will be configured as `ItemListingBuilder.ColumnHeaderMode.HTML`.
      Parameters:
        `defaultHeader` - Default column header
        `headerMessageCode` - Column header translation message code
      Returns:
        this

    - #### resizable

          VirtualPropertyColumnBuilder<T,I,P,C,B> resizable(boolean resizable)

      Sets whether the column which corresponds to this virtual property is resizable by the user.
      Parameters:
        `resizable` - `true` if the column which corresponds to this property is resizable by the user
      Returns:
        this

    - #### sortUsing

          VirtualPropertyColumnBuilder<T,I,P,C,B> sortUsing(com.holonplatform.core.Path<?> sortPath)

      Declares to use specified `Path` to generate query sorts for this virtual property.
      Parameters:
        `sortPath` - Sort path to use (not null)
      Returns:
        this

    - #### sortGenerator

          VirtualPropertyColumnBuilder<T,I,P,C,B> sortGenerator(ItemDataSource.PropertySortGenerator<P> generator)

      Set a `ItemDataSource.PropertySortGenerator` to generate `QuerySort`s for this virtual property.
      Parameters:
        `generator` - PropertySortGenerator (not null)
      Returns:
        this

    - #### render

          VirtualPropertyColumnBuilder<T,I,P,C,B> render(com.vaadin.ui.renderers.Renderer<? super T> renderer)

      Set a custom `Renderer` for this virtual property.
      Parameters:
        `renderer` - Renderer to use
      Returns:
        this

    - #### render

          <D> VirtualPropertyColumnBuilder<T,I,P,C,B> render(com.vaadin.data.ValueProvider<T,D> presentationProvider,
                                                             com.vaadin.ui.renderers.Renderer<? super D> renderer)

      Set a custom `Renderer` and presentation provider for this virtual property.
      Type Parameters:
        `D` - Presentation value type
      Parameters:
        `presentationProvider` - Presentation provider
        `renderer` - Renderer to use
      Returns:
        this

    - #### editor

          <E extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> VirtualPropertyColumnBuilder<T,I,P,C,B> editor(E editor)

      Set the field to use for this virtual property in edit mode.
      Type Parameters:
        `E` - Editor field type
      Parameters:
        `editor` - Editor field (not null)
      Returns:
        this

    - #### displayAsFirst

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayAsFirst()

      Configure this virtual property column to be displayed before any other standard listing column by default.
      Returns:
        this

    - #### displayAsLast

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayAsLast()

      Configure this virtual property column to be displayed after any other standard listing column by default.
      Returns:
        this

    - #### displayBefore

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayBefore(P property)

      Configure this virtual property column to be displayed before the listing column bound to given `property` by default.
      Parameters:
        `property` - Property to which the position is relative
      Returns:
        this

    - #### displayAfter

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayAfter(P property)

      Configure this virtual property column to be displayed after the listing column bound to given `property` by default.
      Parameters:
        `property` - Property to which the position is relative
      Returns:
        this

    - #### displayBeforeColumnId

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayBeforeColumnId(String columnId)

      Configure this virtual property column to be displayed before the given listing column id by default.
      Parameters:
        `columnId` - Column id to which the position is relative
      Returns:
        this

    - #### displayAfterColumnId

          VirtualPropertyColumnBuilder<T,I,P,C,B> displayAfterColumnId(String columnId)

      Configure this virtual property column to be displayed after the given listing column id by default.
      Parameters:
        `columnId` - Column id to which the position is relative
      Returns:
        this

    - #### add

          B add()

      Add this virtual property column to the `PropertyListing`.

      The column will be displayed after any other listing column by default, or according to the position configured using either `displayAsFirst()`, `displayAsLast()`, `displayBefore(Object)` or `displayAfter(Object)`.

      Returns:
        The parent `PropertyListing` builder

Copyright © 2019 The Holon Platform. All rights reserved.