Package com.smartgwt.client.widgets.grid
Interface DefaultFieldWidthCustomizer
public interface DefaultFieldWidthCustomizer
-
Method Summary
Modifier and TypeMethodDescriptionintgetWidth(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 fitbehavior. Note that this method returns a size for content, so will not be consulted ifautoFitWidthApproachis set to"title".If
ListGridField.defaultWidthis specified, this will be returned.Otherwise, the default implementation varies by
field type. For fields of type"icon", or fields which show only avalueIconas 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.imageWidthbeing 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.
-