public interface DefaultFieldWidthCustomizer
Modifier and Type | Method and Description |
---|---|
int |
getWidth(ListGridField field)
Method to calculate and return the default width of a field.
|
int getWidth(ListGridField field)
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.
field
- Field for which the size should be determined