Interface DefaultFieldWidthCustomizer


public interface DefaultFieldWidthCustomizer
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Method to calculate and return the default width of a field.
  • Method Details

    • getWidth

      int getWidth(ListGridField field)
      Method to calculate and return the default width of a field. This method is called to calculate the size of each field's content as part of the field auto fit behavior. Note that this method returns a size for content, so will not be consulted if autoFitWidthApproach is set to "title".

      If ListGridField.defaultWidth is specified, this will be returned.

      Otherwise, the default implementation varies by field type. For fields of type "icon", or fields which show only a valueIcon as a value, and for boolean fields which show a checkbox value, the width will be calculated based on the icon size and iconPadding. For other fields the getFieldContentWidth() method will be used to calculate a width based on the rendered width of content. Note that for "image" type fields, this method will rely on the ListGridField.imageWidth being specified.

      Note that this width is the default width of "content" - it does not take into account the rendered size of the field title.

      Parameters:
      field - Field for which the size should be determined
      Returns:
      default size required for the field's content.