Package com.smartgwt.client.widgets.grid
Interface DefaultFieldWidthCustomizer
public interface DefaultFieldWidthCustomizer
-
Method Summary
Modifier and TypeMethodDescriptionint
getWidth
(ListGridField field) Method to calculate and return the default width of a field.
-
Method Details
-
getWidth
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 thefield auto fit
behavior. Note that this method returns a size for content, so will not be consulted ifautoFitWidthApproach
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 avalueIcon
as a value, and for boolean fields which show a checkbox value, the width will be calculated based on the icon size andiconPadding
. For other fields thegetFieldContentWidth()
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 theListGridField.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.
-