|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.grid.ListGridField
public class ListGridField
An ordinary JavaScript object containing properties that configures the display of
and interaction with the columns of a ListGrid
.
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
ListGridField()
|
|
ListGridField(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
ListGridField(java.lang.String name)
|
|
ListGridField(java.lang.String name,
int width)
|
|
ListGridField(java.lang.String name,
java.lang.String title)
|
|
ListGridField(java.lang.String name,
java.lang.String title,
int width)
|
Method Summary | |
---|---|
HandlerRegistration |
addCellSavedHandler(CellSavedHandler handler)
Add a cellSaved handler. |
HandlerRegistration |
addChangedHandler(ChangedHandler handler)
Add a changed handler. |
HandlerRegistration |
addChangeHandler(ChangeHandler handler)
Add a change handler. |
HandlerRegistration |
addEditorEnterHandler(EditorEnterHandler handler)
Add a editorEnter handler. |
HandlerRegistration |
addEditorExitHandler(EditorExitHandler handler)
Add a editorExit handler. |
HandlerRegistration |
addRecordClickHandler(RecordClickHandler handler)
Add a recordClick handler. |
Alignment |
getAlign()
Horizontal alignment for field's column header: "left", "right" or "center". |
java.lang.Boolean |
getAutoFetchDisplayMap()
If true, automatically fetches a valueMap if an optionDataSource is set
for this field.
|
java.lang.String |
getBaseStyle()
Custom base style to apply to all cells in this field instead of baseStyle
To override the baseStyle at the row level, use
recordBaseStyleProperty
instead. |
java.lang.Boolean |
getCanEdit()
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level |
java.lang.Boolean |
getCanFilter()
If showing a filter row for this ListGrid, should the filter criteria for this field be editable |
java.lang.Boolean |
getCanFreeze()
Whether this field should display freezing/unfreezing options in its header context menu. |
java.lang.Boolean |
getCanGroupBy()
Determines whether this field will be groupable in the header context menu. |
java.lang.Boolean |
getCanHide()
Whether this field can be hidden via the header context menu. |
java.lang.Boolean |
getCanSort()
Enables or disables sorting by this column. |
java.lang.Boolean |
getCanSortClientOnly()
When true, this field can only be used for sorting if the data is entirely client-side. |
java.lang.Boolean |
getCanToggle()
Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into
edit mode. |
Alignment |
getCellAlign()
Horizontal alignment for cells in this field's column: "left", "right" or "center". If null, alignment is derived from align . |
java.lang.String |
getCellIcon()
For a field of type:"icon" only, set the icon that appears in body cells. |
DateDisplayFormat |
getDateFormatter()
Display format to use for fields specified as type 'date'. |
java.lang.String |
getDefaultGroupingMode()
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and groupingMode is unset.
See groupingModes . |
java.lang.String |
getDefaultIconSrc()
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc . |
java.lang.String |
getDisplayField()
Specifies the optionDataSource field used to retrieve the display
values that are to be mapped from the internal values specified by valueField .If no optionDataSource is defined for the field, the cell will display
the displayField value for the current record instead of the underlying value for
this field. |
java.lang.Integer |
getEditorIconHeight()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
java.lang.Integer |
getEditorIconWidth()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
java.lang.String |
getEditorImageURLPrefix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. |
java.lang.String |
getEditorImageURLSuffix()
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. |
java.lang.Integer |
getEditorValueIconHeight()
When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor. |
java.lang.Integer |
getEditorValueIconWidth()
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor. |
java.lang.String |
getEmptyCellValue()
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
EnterKeyEditAction |
getEnterKeyEditAction()
What to do when a user hits enter while editing this field? Overrides the enterKeyEditAction as specified at the listGrid level while
focus is in this field. |
EscapeKeyEditAction |
getEscapeKeyEditAction()
What to do when a user hits escape while editing this field? Overrides the escapeKeyEditAction as specified at the listGrid level while
focus is in this field. |
void |
getFieldTitle(ListGrid viewer,
int fieldNum)
If your derivation of the field title is more complex than specifying a static string, you can specify a getFieldTitle() method on your field to return the title string. Otherwise you can use the title attribute on the field to specify the title.
|
java.lang.Boolean |
getFilterOnKeypress()
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field. |
java.lang.Boolean |
getFrozen()
Whether this field should be "frozen" for the purposes of horizontal scrolling. |
java.lang.Integer |
getGroupGranularity()
Granularity of grouping for numeric fields. |
java.lang.String |
getGroupingMode()
For a field that allows multiple groupingModes ,
the current grouping mode.
|
java.util.Map |
getGroupingModes()
If set, provides several possible styles of grouping that are valid for this field. |
java.lang.Integer |
getGroupPrecision()
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping. |
java.lang.String |
getHeaderBaseStyle()
Custom base style to apply to this field's header button instead of headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
java.lang.String |
getHeaderTitleStyle()
Custom titleStyle to apply to this field's header button instead of headerTitleStyle .Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass
thereof. |
java.lang.String |
getIcon()
Optional icon to show next to the title for this field. |
java.lang.Integer |
getIconHeight()
If icon is specified, this property can be used to specify the
height of the icon to be displayed in the ListGrid header button. |
java.lang.String |
getIconOrientation()
If this field is showing an icon, should it appear to the left or right of the title? Valid options are "left" or "right" |
java.lang.Integer |
getIconSize()
If icon is specified, this property can be used to specify the
size of the icon to be displayed in the ListGrid header button. |
int |
getIconSpacing()
Pixels between icon and title text. |
java.lang.String |
getIconVAlign()
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign . |
java.lang.Integer |
getIconWidth()
If icon is specified, this property can be used to specify the
width of the icon to be displayed in the ListGrid header button. |
int |
getImageHeight()
Height of image shown for fieldTypes image and imageFile in this field. |
int |
getImageSize()
Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default imageSize .
|
java.lang.String |
getImageURLPrefix()
If this field has type [ ListGridFieldType ] set to "image"
and the URL for the image displayed is not absolute, the path of the URL will be relative
to this stringAlternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the
URL for the image. |
java.lang.String |
getImageURLSuffix()
If any cells in this field are showing a value icon (see: valueIcons )
or this is has ListGridFieldType set to "image" , this the value
of this property will be appended to the end of the URL for the icon displayed.Typical usage might be to append a file type such as ".gif" to the
filename of the image.For editable fields, this property will also be passed through to any editors as imageURLSuffix . |
int |
getImageWidth()
Width of images shown for fieldTypes image and imageFile in this field. |
java.lang.Boolean |
getIsRemoveField()
If set to true and canRemoveRecords is true, this field will be rendered
as the remove-field for this grid. |
java.lang.String |
getLinkText()
The HTML to display in cells of this field if the fieldType is set to link. |
java.lang.String |
getName()
Name of this field. |
static ListGridField |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.Boolean |
getRequired()
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass. Note: for databound listGrids, this property may be specified on the DataSourceField , enabling both client and server side validation. |
java.lang.Boolean |
getShowDisabledIcon()
If using an icon for this button, whether to switch the icon image if the button becomes disabled. |
java.lang.Boolean |
getShowDownIcon()
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button. |
java.lang.Boolean |
getShowFocusedIcon()
If using an icon for this button, whether to switch the icon image when the button recieves focus. |
java.lang.Boolean |
getShowHover()
Whether to show hovers for this field. |
java.lang.Boolean |
getShowRollOverIcon()
If using an icon for this button, whether to switch the icon image on mouse rollover. |
java.lang.Boolean |
getShowSelectedIcon()
If using an icon for this button, whether to switch the icon image when the button becomes selected. |
java.lang.Boolean |
getShowValueIconOnly()
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field. |
SortDirection |
getSortDirection()
Specifies the default sorting direction for this column. |
java.lang.String |
getSummaryTitle()
Optional long summary title for this field, provided in addition to title . |
java.lang.Boolean |
getSuppressValueIcon()
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells. |
java.lang.String |
getTarget()
By default, clicking a link rendered by this item opens it in a new browser window. |
java.lang.String |
getTitle()
A title for this field, to display in the header of the listGrid object. |
ListGridFieldType |
getType()
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. |
java.lang.Boolean |
getValidateOnChange()
If set to true, any validators for this field will be run whenever
the value of the field is changed.
|
java.lang.String |
getValueField()
Specifies the optionDataSource field used to retrieve the stored
values that are to be mapped to the display values (specified by
displayField ). |
java.lang.Integer |
getValueIconHeight()
Height for value icons for this listGrid field. Overrides valueIconSize , valueIconHeight , and
valueIconSize . |
java.lang.Integer |
getValueIconLeftPadding()
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding |
java.lang.String |
getValueIconOrientation()
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text. Has no effect if showValueIconOnly is true |
java.lang.Integer |
getValueIconRightPadding()
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding |
java.lang.Integer |
getValueIconSize()
Default width and height of value icons in this field. Takes precidence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight} |
java.lang.Integer |
getValueIconWidth()
Width for value icons for this listGrid field. Overrides valueIconSize , valueIconWidth , and
valueIconSize . |
java.lang.String |
getWidth()
Return the width of the field. |
void |
setAlign(Alignment align)
Horizontal alignment for field's column header: "left", "right" or "center". |
void |
setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
If true, automatically fetches a valueMap if an optionDataSource is set
for this field.
|
void |
setBaseStyle(java.lang.String baseStyle)
Custom base style to apply to all cells in this field instead of baseStyle
To override the baseStyle at the row level, use
recordBaseStyleProperty
instead. |
void |
setCanEdit(java.lang.Boolean canEdit)
Can this field be edited? May be overridden by setting the 'canEdit' property at the listGrid level |
void |
setCanFilter(java.lang.Boolean canFilter)
If showing a filter row for this ListGrid, should the filter criteria for this field be editable |
void |
setCanFreeze(java.lang.Boolean canFreeze)
Whether this field should display freezing/unfreezing options in its header context menu. |
void |
setCanGroupBy(java.lang.Boolean canGroupBy)
Determines whether this field will be groupable in the header context menu. |
void |
setCanHide(java.lang.Boolean canHide)
Whether this field can be hidden via the header context menu. |
void |
setCanSort(java.lang.Boolean canSort)
Enables or disables sorting by this column. |
void |
setCanSortClientOnly(java.lang.Boolean canSortClientOnly)
When true, this field can only be used for sorting if the data is entirely client-side. |
void |
setCanToggle(java.lang.Boolean canToggle)
Allows a boolean or com.smartgwt.client..ValueMap field to be edited without going into
edit mode. |
void |
setCellAlign(Alignment cellAlign)
Horizontal alignment for cells in this field's column: "left", "right" or "center". If null, alignment is derived from align . |
void |
setCellFormatter(CellFormatter formatter)
* Return the HTML to display in cells of this field. |
void |
setCellIcon(java.lang.String cellIcon)
For a field of type:"icon" only, set the icon that appears in body cells. |
void |
setDateFormatter(DateDisplayFormat dateFormatter)
Display format to use for fields specified as type 'date'. |
void |
setDefaultFilterValue(java.lang.Boolean defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field. |
void |
setDefaultFilterValue(java.util.Date defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field. |
void |
setDefaultFilterValue(java.lang.Float defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field. |
void |
setDefaultFilterValue(java.lang.Integer defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field. |
void |
setDefaultFilterValue(java.lang.String defaultFilterValue)
If this ListGrid is showing a filter row, this property can be used to apply a default value to show in the filter editor for this field. |
void |
setDefaultGroupingMode(java.lang.String defaultGroupingMode)
Default groupingMode used when the user does not specify a mode or grouping is triggered programmatically and groupingMode is unset.
See groupingModes . |
void |
setDefaultIconSrc(java.lang.String defaultIconSrc)
If this field is editable, this property will be passed to editors displayed for cells within this field as defaultIconSrc . |
void |
setDefaultValue(java.lang.Boolean defaultValue)
|
void |
setDefaultValue(java.util.Date defaultValue)
|
void |
setDefaultValue(java.lang.Float defaultValue)
|
void |
setDefaultValue(java.lang.Integer defaultValue)
|
void |
setDefaultValue(java.lang.String defaultValue)
|
void |
setDisplayField(java.lang.String displayField)
Specifies the optionDataSource field used to retrieve the display
values that are to be mapped from the internal values specified by valueField .If no optionDataSource is defined for the field, the cell will display
the displayField value for the current record instead of the underlying value for
this field. |
void |
setEditorIconHeight(java.lang.Integer editorIconHeight)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconHeight .If this property unset, the iconHeight property from the editor can be picked up from iconHeight instead. |
void |
setEditorIconWidth(java.lang.Integer editorIconWidth)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconWidth .If this property unset, the iconWidth property from the editor can be picked up from iconWidth instead. |
void |
setEditorImageURLPrefix(java.lang.String editorImageURLPrefix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLPrefix to the editor in question. |
void |
setEditorImageURLSuffix(java.lang.String editorImageURLSuffix)
When some cell in this field is being edited, this property can be used to apply an explicit imageURLSuffix to the editor in question. |
void |
setEditorType(FormItem editorType)
Name of form item type to use for the form item created to edit this field. |
void |
setEditorValueIconHeight(java.lang.Integer editorValueIconHeight)
When some cell in this field is being edited, setting this property will specify the height for value icons in the cell's editor. |
void |
setEditorValueIcons(java.util.Map<java.lang.String,java.lang.String> editorValueIcons)
When some cell in this field is being edited, setting this property will specify the value icons to display in the cell's editor. |
void |
setEditorValueIconWidth(java.lang.Integer editorValueIconWidth)
When some cell in this field is being edited, setting this property will specify the width for value icons in the cell's editor. |
void |
setEditorValueMap(java.util.Map editorValueMap)
A valueMap to use for editors shown for this field. |
void |
setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
This function method will be called from ListGrid.getEditorValueMap() and the resulting valueMap will be used instead of any static specified valueMap for the field. |
void |
setEmptyCellValue(java.lang.String emptyCellValue)
The value to display for a cell whose value is null or the empty string after applying formatCellValue and valueMap (if any). |
void |
setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
What to do when a user hits enter while editing this field? Overrides the enterKeyEditAction as specified at the listGrid level while
focus is in this field. |
void |
setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
What to do when a user hits escape while editing this field? Overrides the escapeKeyEditAction as specified at the listGrid level while
focus is in this field. |
void |
setFilterEditorType(FormItem filterEditorType)
If this ListGrid is showing a filter row, this property can be used to specify the form item class to use for the filter form item associated with this field (Only used if this field is not canFilter:false). |
void |
setFilterEditorValueMap(java.util.Map filterEditorValueMap)
If this listGrid is showing a filter row, this property can be used to specify a mapping of internal data to/from display values to be in the appropriate filter row form item. |
void |
setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
If we're showing the filterEditor (listGrid.showFilterEditor is true), this property determines whether this list should be filtered every time the user edits the value of the filter editor for this field. |
void |
setFrozen(java.lang.Boolean frozen)
Whether this field should be "frozen" for the purposes of horizontal scrolling. |
void |
setGroupGranularity(java.lang.Integer groupGranularity)
Granularity of grouping for numeric fields. |
void |
setGroupingMode(java.lang.String groupingMode)
For a field that allows multiple groupingModes ,
the current grouping mode.
|
void |
setGroupingModes(java.util.Map groupingModes)
If set, provides several possible styles of grouping that are valid for this field. |
void |
setGroupPrecision(java.lang.Integer groupPrecision)
For fields of type:"float" or derived from float, number of digits after the decimal point to consider when grouping. |
void |
setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
Renderer that returns the title that should be shown to the user for the group with the groupValue passed as a parameter. |
void |
setGroupValueFunction(GroupValueFunction groupValueFunction)
Function that returns the value which records should be grouped by. |
void |
setHeaderBaseStyle(java.lang.String headerBaseStyle)
Custom base style to apply to this field's header button instead of headerBaseStyle .Note that depending on the header button constructor, you may have to override headerTitleStyle as well. |
void |
setHeaderTitleStyle(java.lang.String headerTitleStyle)
Custom titleStyle to apply to this field's header button instead of headerTitleStyle .Note that this will typically only have an effect if headerButtonConstructor is set to StretchImgButton or a subclass
thereof. |
void |
setHidden(boolean hidden)
|
void |
setHoverCustomizer(HoverCustomizer hoverCustomizer)
* HTML to be shown in hovers over cells in the column described by this field. |
void |
setIcon(java.lang.String icon)
Optional icon to show next to the title for this field. |
void |
setIconHeight(java.lang.Integer iconHeight)
If icon is specified, this property can be used to specify the
height of the icon to be displayed in the ListGrid header button. |
void |
setIconOrientation(java.lang.String iconOrientation)
If this field is showing an icon, should it appear to the left or right of the title? Valid options are "left" or "right" |
void |
setIcons(FormItemIcon... icons)
If this field is editable, this property can be used to specify icons to be displayed in the editors displayed for this field |
void |
setIconSize(java.lang.Integer iconSize)
If icon is specified, this property can be used to specify the
size of the icon to be displayed in the ListGrid header button. |
void |
setIconSpacing(int iconSpacing)
Pixels between icon and title text. |
void |
setIconVAlign(java.lang.String iconVAlign)
If this field is editable, this property will be passed to editors displayed for cells within this field as iconVAlign . |
void |
setIconWidth(java.lang.Integer iconWidth)
If icon is specified, this property can be used to specify the
width of the icon to be displayed in the ListGrid header button. |
void |
setImageHeight(int imageHeight)
Height of image shown for fieldTypes image and imageFile in this field. |
void |
setImageSize(int imageSize)
Size of images shown for fieldTypes image and imageFile in this field. This setting overrides the global ListGrid default imageSize .
|
void |
setImageURLPrefix(java.lang.String imageURLPrefix)
If this field has type [ ListGridFieldType ] set to "image"
and the URL for the image displayed is not absolute, the path of the URL will be relative
to this stringAlternatively, if this field displays any valueIcons, this prefix will be applied to the beginning of any valueIcons when determining the
URL for the image. |
void |
setImageURLSuffix(java.lang.String imageURLSuffix)
If any cells in this field are showing a value icon (see: valueIcons )
or this is has ListGridFieldType set to "image" , this the value
of this property will be appended to the end of the URL for the icon displayed.Typical usage might be to append a file type such as ".gif" to the
filename of the image.For editable fields, this property will also be passed through to any editors as imageURLSuffix . |
void |
setImageWidth(int imageWidth)
Width of images shown for fieldTypes image and imageFile in this field. |
void |
setImgDir(java.lang.String imgDir)
|
void |
setIsRemoveField(java.lang.Boolean isRemoveField)
If set to true and canRemoveRecords is true, this field will be rendered
as the remove-field for this grid. |
void |
setLinkText(java.lang.String linkText)
The HTML to display in cells of this field if the fieldType is set to link. |
void |
setMultiple(boolean multiple)
When using a valueMap, set multiple to true if a select list box is desired instead of a combobox when editing the cell. |
void |
setName(java.lang.String name)
Name of this field. |
void |
setOptionDataSource(DataSource optionDataSource)
Derive a ValueMap by fetching records from another DataSource and extracting the valueField and
displayField in the loaded records,
to derive one valueMap entry per record loaded from the optionDataSource. |
void |
setPrompt(java.lang.String prompt)
|
void |
setRequired(java.lang.Boolean required)
When the user edits cells in this field, is this value required to be non-empty in order for validation to pass. Note: for databound listGrids, this property may be specified on the DataSourceField , enabling both client and server side validation. |
void |
setShowDisabledIcon(java.lang.Boolean showDisabledIcon)
If using an icon for this button, whether to switch the icon image if the button becomes disabled. |
void |
setShowDownIcon(java.lang.Boolean showDownIcon)
If using an icon for this button, whether to switch the icon image when the mouse goes down on the button. |
void |
setShowFocusedIcon(java.lang.Boolean showFocusedIcon)
If using an icon for this button, whether to switch the icon image when the button recieves focus. |
void |
setShowHover(java.lang.Boolean showHover)
Whether to show hovers for this field. |
void |
setShowIfCondition(ListGridFieldIfFunction showIf)
A function, if provided, is evaluated to conditionally determine whether this field should be displayed. |
void |
setShowRollOverIcon(java.lang.Boolean showRollOverIcon)
If using an icon for this button, whether to switch the icon image on mouse rollover. |
void |
setShowSelectedIcon(java.lang.Boolean showSelectedIcon)
If using an icon for this button, whether to switch the icon image when the button becomes selected. |
void |
setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
If this field has a valueIcons property specified, setting this property causes the valueIcon for each value to be displayed in the cell without also showing the record's value for the field. |
void |
setSortDirection(SortDirection sortDirection)
Specifies the default sorting direction for this column. |
void |
setSortNormalizer(SortNormalizer normalizer)
Optional function to return the value that should be used when sorting this field. |
void |
setSummaryTitle(java.lang.String summaryTitle)
Optional long summary title for this field, provided in addition to title . |
void |
setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
If this field has a valueIcons property specified, setting this property to true will prevent the valueIcon being written out into this field's cells. |
void |
setTarget(java.lang.String target)
By default, clicking a link rendered by this item opens it in a new browser window. |
void |
setTitle(java.lang.String title)
A title for this field, to display in the header of the listGrid object. |
void |
setType(ListGridFieldType type)
ListGrids picks a renderer for the view and edit mode of a field based on this attribute. |
void |
setValidateOnChange(java.lang.Boolean validateOnChange)
If set to true, any validators for this field will be run whenever
the value of the field is changed.
|
void |
setValidators(Validator... validators)
Array of Validator objects for this field. |
void |
setValueField(java.lang.String valueField)
Specifies the optionDataSource field used to retrieve the stored
values that are to be mapped to the display values (specified by
displayField ). |
void |
setValueIconHeight(java.lang.Integer valueIconHeight)
Height for value icons for this listGrid field. Overrides valueIconSize , valueIconHeight , and
valueIconSize . |
void |
setValueIconLeftPadding(java.lang.Integer valueIconLeftPadding)
How much padding should there be on the left of valueIcons for this field Overrides valueIconLeftPadding |
void |
setValueIconOrientation(java.lang.String valueIconOrientation)
If we're showing a valueIcon for this field should it appear to the left or the right of the text? By default the icon will appear to the left of the textual value - set this to "right" to show the icon on the right of the text. Has no effect if showValueIconOnly is true |
void |
setValueIconRightPadding(java.lang.Integer valueIconRightPadding)
How much padding should there be on the right of valueIcons for this field Overrides valueIconRightPadding |
void |
setValueIcons(java.util.Map<java.lang.String,java.lang.String> valueIcons)
This property is a mapping between data values and URLs of icons to display. |
void |
setValueIconSize(java.lang.Integer valueIconSize)
Default width and height of value icons in this field. Takes precidence over valueIconWidth, valueIconHeight and valueIconSize specified at the ListGrid level. Can be overridden via valueIconWidth and {ListGridField.valueIconHeight} |
void |
setValueIconWidth(java.lang.Integer valueIconWidth)
Width for value icons for this listGrid field. Overrides valueIconSize , valueIconWidth , and
valueIconSize . |
void |
setValueMap(java.util.Map valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value. Note that if this field is editable (see canEdit , canEdit ), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap . |
void |
setValueMap(java.lang.String... valueMap)
Array of legal values for this field, or an Object where each property maps a stored value to a user-displayable value. Note that if this field is editable (see canEdit , canEdit ), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap . |
void |
setWidth(int width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space. |
void |
setWidth(java.lang.String width)
The width of this field, specified as either an absolute number of pixels, a percentage of the remaining space, or "*" to allocate an equal portion of the remaining space. |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public ListGridField()
public ListGridField(com.google.gwt.core.client.JavaScriptObject jsObj)
public ListGridField(java.lang.String name)
public ListGridField(java.lang.String name, int width)
public ListGridField(java.lang.String name, java.lang.String title)
public ListGridField(java.lang.String name, java.lang.String title, int width)
Method Detail |
---|
public static ListGridField getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setGroupingMode(java.lang.String groupingMode)
groupingModes
,
the current grouping mode.
This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.
groupingMode
- groupingMode Default value is nullpublic java.lang.String getGroupingMode()
groupingModes
,
the current grouping mode.
This property is set when a user chooses a particular grouping mode, and may be set on ListGrid creation to affect the initial grouping.
public void setDefaultGroupingMode(java.lang.String defaultGroupingMode)
groupingMode
is unset.
See groupingModes
.
defaultGroupingMode
- defaultGroupingMode Default value is nullpublic java.lang.String getDefaultGroupingMode()
groupingMode
is unset.
See groupingModes
.
public void setGroupPrecision(java.lang.Integer groupPrecision)
For example, groupPrecision:2
indicates that 45.238 and 45.231 group together,
but 45.22 and 45.27 are separate.
See also groupGranularity
for grouping by broader
ranges.
groupPrecision
- groupPrecision Default value is nullpublic java.lang.Integer getGroupPrecision()
For example, groupPrecision:2
indicates that 45.238 and 45.231 group together,
but 45.22 and 45.27 are separate.
See also groupGranularity
for grouping by broader
ranges.
public void setGroupGranularity(java.lang.Integer groupGranularity)
Groups will be formed based on ranges of values of size groupGranularity
. For
example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.
groupGranularity
- groupGranularity Default value is nullpublic java.lang.Integer getGroupGranularity()
Groups will be formed based on ranges of values of size groupGranularity
. For
example, if groupGranularity were 1000, groups would be 0-1000, 1000-2000, etc.
public void setCanGroupBy(java.lang.Boolean canGroupBy)
canGroupBy
- canGroupBy Default value is truepublic java.lang.Boolean getCanGroupBy()
public void setCanSortClientOnly(java.lang.Boolean canSortClientOnly)
canSortClientOnly
- canSortClientOnly Default value is falsepublic java.lang.Boolean getCanSortClientOnly()
public void setValueIconSize(java.lang.Integer valueIconSize)
valueIconWidth
and {ListGridField.valueIconHeight}
valueIconSize
- valueIconSize Default value is nullpublic java.lang.Integer getValueIconSize()
valueIconWidth
and {ListGridField.valueIconHeight}
public void setValueIconWidth(java.lang.Integer valueIconWidth)
valueIconSize
, valueIconWidth
, and
valueIconSize
.
valueIconWidth
- valueIconWidth Default value is nullpublic java.lang.Integer getValueIconWidth()
valueIconSize
, valueIconWidth
, and
valueIconSize
.
public void setValueIconHeight(java.lang.Integer valueIconHeight)
valueIconSize
, valueIconHeight
, and
valueIconSize
.
valueIconHeight
- valueIconHeight Default value is nullpublic java.lang.Integer getValueIconHeight()
valueIconSize
, valueIconHeight
, and
valueIconSize
.
public void setValueIconLeftPadding(java.lang.Integer valueIconLeftPadding)
valueIconLeftPadding
valueIconLeftPadding
- valueIconLeftPadding Default value is nullpublic java.lang.Integer getValueIconLeftPadding()
valueIconLeftPadding
public void setValueIconRightPadding(java.lang.Integer valueIconRightPadding)
valueIconRightPadding
valueIconRightPadding
- valueIconRightPadding Default value is nullpublic java.lang.Integer getValueIconRightPadding()
valueIconRightPadding
public void setEditorValueIconWidth(java.lang.Integer editorValueIconWidth)
editorValueIconWidth
- editorValueIconWidth Default value is nullpublic java.lang.Integer getEditorValueIconWidth()
public void setEditorValueIconHeight(java.lang.Integer editorValueIconHeight)
editorValueIconHeight
- editorValueIconHeight Default value is nullpublic java.lang.Integer getEditorValueIconHeight()
public void setShowValueIconOnly(java.lang.Boolean showValueIconOnly)
If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.
Note that if this field is editable showValueIconOnly
will be passed
through to editors displayed in this field.
showValueIconOnly
- showValueIconOnly Default value is nullpublic java.lang.Boolean getShowValueIconOnly()
If unset the default behavior is to show the icon only if an explicit valueMap is specified as well in addition to a valueIcons map, otherwise show both the valueIcon and value for the cell.
Note that if this field is editable showValueIconOnly
will be passed
through to editors displayed in this field.
public void setSuppressValueIcon(java.lang.Boolean suppressValueIcon)
suppressValueIcon
- suppressValueIcon Default value is nullpublic java.lang.Boolean getSuppressValueIcon()
public void setValueIconOrientation(java.lang.String valueIconOrientation)
showValueIconOnly
is true
valueIconOrientation
- valueIconOrientation Default value is nullpublic java.lang.String getValueIconOrientation()
showValueIconOnly
is true
public void setImageURLPrefix(java.lang.String imageURLPrefix)
ListGridFieldType
] set to "image"
and the URL for the image displayed is not absolute, the path of the URL will be relative
to this stringvalueIcons
when determining the
URL for the image.
Note : This is an advanced setting
imageURLPrefix
- imageURLPrefix Default value is nullpublic java.lang.String getImageURLPrefix()
ListGridFieldType
] set to "image"
and the URL for the image displayed is not absolute, the path of the URL will be relative
to this stringvalueIcons
when determining the
URL for the image.
public void setImageURLSuffix(java.lang.String imageURLSuffix)
valueIcons
)
or this is has ListGridFieldType
set to "image"
, this the value
of this property will be appended to the end of the URL for the icon displayed.".gif"
to the
filename of the image.imageURLSuffix
.
Note : This is an advanced setting
imageURLSuffix
- imageURLSuffix Default value is nullpublic java.lang.String getImageURLSuffix()
valueIcons
)
or this is has ListGridFieldType
set to "image"
, this the value
of this property will be appended to the end of the URL for the icon displayed.".gif"
to the
filename of the image.imageURLSuffix
.
public void setEditorImageURLPrefix(java.lang.String editorImageURLPrefix)
imageURLPrefix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
Note : This is an advanced setting
editorImageURLPrefix
- editorImageURLPrefix Default value is nullpublic java.lang.String getEditorImageURLPrefix()
imageURLPrefix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
public void setEditorImageURLSuffix(java.lang.String editorImageURLSuffix)
imageURLSuffix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
Note : This is an advanced setting
editorImageURLSuffix
- editorImageURLSuffix Default value is nullpublic java.lang.String getEditorImageURLSuffix()
imageURLSuffix
to the editor in question.
This can be used to modify the valueIcons within the editor.imageURLPrefix
is specified, that will be used
instead.
public void setImageSize(int imageSize)
imageSize
.
If set to a String, assumed to be a property on each record that specifies the image
height. For example, if field.imageSize
is "logoSize",
record.logoSize
will control the size of the image.
imageSize
- imageSize Default value is 16public int getImageSize()
imageSize
.
If set to a String, assumed to be a property on each record that specifies the image
height. For example, if field.imageSize
is "logoSize",
record.logoSize
will control the size of the image.
public void setImageWidth(int imageWidth)
If set to a String, assumed to be a property on each record that specifies the image
width. For example, if field.imageWidth
is "logoWidth",
record.logoWidth
will control the width of the image.
imageWidth
- imageWidth Default value is 16public int getImageWidth()
If set to a String, assumed to be a property on each record that specifies the image
width. For example, if field.imageWidth
is "logoWidth",
record.logoWidth
will control the width of the image.
public void setImageHeight(int imageHeight)
If set to a String, assumed to be a property on each record that specifies the image
height. For example, if field.imageHeight
is "logoHeight",
record.logoHeight
will control the heigt of the image.
imageHeight
- imageHeight Default value is 16public int getImageHeight()
If set to a String, assumed to be a property on each record that specifies the image
height. For example, if field.imageHeight
is "logoHeight",
record.logoHeight
will control the heigt of the image.
public void setType(ListGridFieldType type)
type
- type Default value is "text"public ListGridFieldType getType()
public void setName(java.lang.String name)
The name of field is also the property in each record which holds the value for that field.
If a dataSource
is specified and the DataSource has a field with the
same name, the ListGridField and DataSourceField are merged so that properties on the
ListGridField
name
- name Default value is nullpublic java.lang.String getName()
The name of field is also the property in each record which holds the value for that field.
If a dataSource
is specified and the DataSource has a field with the
same name, the ListGridField and DataSourceField are merged so that properties on the
ListGridField
public void setTitle(java.lang.String title)
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int)
method on the field to return the HTML for the field title.
title
- title Default value is nullpublic java.lang.String getTitle()
getFieldTitle(com.smartgwt.client.widgets.grid.ListGrid, int)
method on the field to return the HTML for the field title.
public void setTarget(java.lang.String target)
target
attribute of the anchor tag used to render
the link.
If you set listGridField.target to "javascript", the default behaviour is to catch and
consume mouse-clicks that would result in the link being followed. Instead, the
ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler)
event is fired for the containing cell.
target
- target Default value is "_blank"public java.lang.String getTarget()
target
attribute of the anchor tag used to render
the link.
If you set listGridField.target to "javascript", the default behaviour is to catch and
consume mouse-clicks that would result in the link being followed. Instead, the
ListGrid.addCellClickHandler(com.smartgwt.client.widgets.grid.events.CellClickHandler)
event is fired for the containing cell.
public void setFrozen(java.lang.Boolean frozen)
FrozenFields
.
frozen
- frozen Default value is nullpublic java.lang.Boolean getFrozen()
FrozenFields
.
public void setCanFreeze(java.lang.Boolean canFreeze)
FrozenFields
.
canFreeze
- canFreeze Default value is nullpublic java.lang.Boolean getCanFreeze()
FrozenFields
.
public void setCanHide(java.lang.Boolean canHide)
canHide
- canHide Default value is nullpublic java.lang.Boolean getCanHide()
public void setIcon(java.lang.String icon)
If type
is set to "icon", this icon will also be shown
in every cell of this field - see also cellIcon
.
icon
- icon Default value is nullpublic java.lang.String getIcon()
If type
is set to "icon", this icon will also be shown
in every cell of this field - see also cellIcon
.
public void setIconSize(java.lang.Integer iconSize)
icon
is specified, this property can be used to specify the
size of the icon to be displayed in the ListGrid header button.
(See iconSize
)
iconSize
- iconSize Default value is nullpublic java.lang.Integer getIconSize()
icon
is specified, this property can be used to specify the
size of the icon to be displayed in the ListGrid header button.
(See iconSize
)
public void setIconWidth(java.lang.Integer iconWidth)
icon
is specified, this property can be used to specify the
width of the icon to be displayed in the ListGrid header button.
(See iconWidth
)editorIconWidth
is unset, this
property will be passed onto the editors for this field as iconWidth
,
which will effect the default size for icons
displayed
in the editor.
iconWidth
- iconWidth Default value is nullpublic java.lang.Integer getIconWidth()
icon
is specified, this property can be used to specify the
width of the icon to be displayed in the ListGrid header button.
(See iconWidth
)editorIconWidth
is unset, this
property will be passed onto the editors for this field as iconWidth
,
which will effect the default size for icons
displayed
in the editor.
public void setIconHeight(java.lang.Integer iconHeight)
icon
is specified, this property can be used to specify the
height of the icon to be displayed in the ListGrid header button.
(See iconHeight
)editorIconHeight
is unset, this
property will be passed onto the editors for this field as iconWidth
,
which will effect the default size for icons
displayed
in the editor.
iconHeight
- iconHeight Default value is nullpublic java.lang.Integer getIconHeight()
icon
is specified, this property can be used to specify the
height of the icon to be displayed in the ListGrid header button.
(See iconHeight
)editorIconHeight
is unset, this
property will be passed onto the editors for this field as iconWidth
,
which will effect the default size for icons
displayed
in the editor.
public void setIconOrientation(java.lang.String iconOrientation)
"left"
or "right"
iconOrientation
- iconOrientation Default value is "left"public java.lang.String getIconOrientation()
"left"
or "right"
public void setIconSpacing(int iconSpacing)
iconSpacing
- iconSpacing Default value is 6public int getIconSpacing()
public void setShowDisabledIcon(java.lang.Boolean showDisabledIcon)
showDisabledIcon
- showDisabledIcon Default value is truepublic java.lang.Boolean getShowDisabledIcon()
public void setShowRollOverIcon(java.lang.Boolean showRollOverIcon)
showRollOverIcon
- showRollOverIcon Default value is falsepublic java.lang.Boolean getShowRollOverIcon()
public void setShowFocusedIcon(java.lang.Boolean showFocusedIcon)
If showFocusedAsOver
is true, the "Over"
icon will be
displayed when the canvas has focus, otherwise a seperate "Focused"
icon
will be displayed
showFocusedIcon
- showFocusedIcon Default value is falsepublic java.lang.Boolean getShowFocusedIcon()
If showFocusedAsOver
is true, the "Over"
icon will be
displayed when the canvas has focus, otherwise a seperate "Focused"
icon
will be displayed
public void setShowDownIcon(java.lang.Boolean showDownIcon)
showDownIcon
- showDownIcon Default value is falsepublic java.lang.Boolean getShowDownIcon()
public void setShowSelectedIcon(java.lang.Boolean showSelectedIcon)
showSelectedIcon
- showSelectedIcon Default value is falsepublic java.lang.Boolean getShowSelectedIcon()
public void setCellIcon(java.lang.String cellIcon)
icon
, setting field.cellIcon will not show an
icon in the header.
cellIcon
- cellIcon Default value is nullpublic java.lang.String getCellIcon()
icon
, setting field.cellIcon will not show an
icon in the header.
public void setEditorIconWidth(java.lang.Integer editorIconWidth)
iconWidth
.iconWidth
instead.
Note : This is an advanced setting
editorIconWidth
- editorIconWidth Default value is nullpublic java.lang.Integer getEditorIconWidth()
iconWidth
.iconWidth
instead.
public void setEditorIconHeight(java.lang.Integer editorIconHeight)
iconHeight
.iconHeight
instead.
Note : This is an advanced setting
editorIconHeight
- editorIconHeight Default value is nullpublic java.lang.Integer getEditorIconHeight()
iconHeight
.iconHeight
instead.
public void setDefaultIconSrc(java.lang.String defaultIconSrc)
defaultIconSrc
.
Note : This is an advanced setting
defaultIconSrc
- defaultIconSrc Default value is nullpublic java.lang.String getDefaultIconSrc()
defaultIconSrc
.
public void setIconVAlign(java.lang.String iconVAlign)
iconVAlign
.
Note : This is an advanced setting
iconVAlign
- iconVAlign Default value is nullpublic java.lang.String getIconVAlign()
iconVAlign
.
public void setSummaryTitle(java.lang.String summaryTitle)
title
. This gives the developer an option to use a very short,
or empty title for the ListGrid column (where space may be a factor), but have a longer
value available to be used elsewhere.Note : This is an advanced setting
summaryTitle
- summaryTitle Default value is nullpublic java.lang.String getSummaryTitle()
title
. This gives the developer an option to use a very short,
or empty title for the ListGrid column (where space may be a factor), but have a longer
value available to be used elsewhere.
public void setHeaderBaseStyle(java.lang.String headerBaseStyle)
headerBaseStyle
.headerTitleStyle
as well.
headerBaseStyle
- headerBaseStyle Default value is nullpublic java.lang.String getHeaderBaseStyle()
headerBaseStyle
.headerTitleStyle
as well.
public void setHeaderTitleStyle(java.lang.String headerTitleStyle)
headerTitleStyle
.headerButtonConstructor
is set to StretchImgButton
or a subclass
thereof.
headerTitleStyle
- headerTitleStyle Default value is nullpublic java.lang.String getHeaderTitleStyle()
headerTitleStyle
.headerButtonConstructor
is set to StretchImgButton
or a subclass
thereof.
public void setCellAlign(Alignment cellAlign)
align
. If this field is editable,
the alignment of cells in the body will also be reflected in any editors for the field.
cellAlign
- cellAlign Default value is nullpublic Alignment getCellAlign()
align
. If this field is editable,
the alignment of cells in the body will also be reflected in any editors for the field.
public void setBaseStyle(java.lang.String baseStyle)
baseStyle
To override the baseStyle at the row level, use
recordBaseStyleProperty
instead.
baseStyle
- baseStyle Default value is nullpublic java.lang.String getBaseStyle()
baseStyle
To override the baseStyle at the row level, use
recordBaseStyleProperty
instead.
public void setCanSort(java.lang.Boolean canSort)
canSort
- canSort Default value is truepublic java.lang.Boolean getCanSort()
public void setCanEdit(java.lang.Boolean canEdit)
canEdit
- canEdit Default value is nullpublic java.lang.Boolean getCanEdit()
public void setEnterKeyEditAction(EnterKeyEditAction enterKeyEditAction)
enterKeyEditAction
as specified at the listGrid level while
focus is in this field.
enterKeyEditAction
- enterKeyEditAction Default value is "done"public EnterKeyEditAction getEnterKeyEditAction()
enterKeyEditAction
as specified at the listGrid level while
focus is in this field.
public void setEscapeKeyEditAction(EscapeKeyEditAction escapeKeyEditAction)
escapeKeyEditAction
as specified at the listGrid level while
focus is in this field.
escapeKeyEditAction
- escapeKeyEditAction Default value is "cancel"public EscapeKeyEditAction getEscapeKeyEditAction()
escapeKeyEditAction
as specified at the listGrid level while
focus is in this field.
public void setValidateOnChange(java.lang.Boolean validateOnChange)
validators
for this field will be run whenever
the value of the field is changed.
Analgous to the validateOnChange
property.
validateOnChange
- validateOnChange Default value is nullpublic java.lang.Boolean getValidateOnChange()
validators
for this field will be run whenever
the value of the field is changed.
Analgous to the validateOnChange
property.
public void setRequired(java.lang.Boolean required)
DataSourceField
, enabling both client and server side validation.
required
- required Default value is nullpublic java.lang.Boolean getRequired()
DataSourceField
, enabling both client and server side validation.
public void setIsRemoveField(java.lang.Boolean isRemoveField)
canRemoveRecords
is true, this field will be rendered
as the remove-field for this grid. In most common usage scenarios this field will essentially
be a placeholder indicating where the remove field should be rendered, meaning properties
other than isRemoveField
, such as name
or title
, may
be left unset.
Note : This is an advanced setting
isRemoveField
- isRemoveField Default value is nullpublic java.lang.Boolean getIsRemoveField()
canRemoveRecords
is true, this field will be rendered
as the remove-field for this grid. In most common usage scenarios this field will essentially
be a placeholder indicating where the remove field should be rendered, meaning properties
other than isRemoveField
, such as name
or title
, may
be left unset.
public void setCanFilter(java.lang.Boolean canFilter)
canFilter
- canFilter Default value is nullpublic java.lang.Boolean getCanFilter()
public void setFilterOnKeypress(java.lang.Boolean filterOnKeypress)
Note : This is an advanced setting
filterOnKeypress
- filterOnKeypress Default value is nullpublic java.lang.Boolean getFilterOnKeypress()
public void setLinkText(java.lang.String linkText)
linkText
.
linkText
- linkText Default value is nullpublic java.lang.String getLinkText()
linkText
.
public void setEmptyCellValue(java.lang.String emptyCellValue)
This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.
emptyCellValue
- emptyCellValue Default value is " "public java.lang.String getEmptyCellValue()
This is the field-specific attribute. You may also set the emptyCellValue at the grid level to define the emptyCellValue for all empty fields in the grid.
public void setAutoFetchDisplayMap(java.lang.Boolean autoFetchDisplayMap)
optionDataSource
is set
for this field.
Same as autoFetchDisplayMap
, but defined on a per-field basis.
autoFetchDisplayMap
- autoFetchDisplayMap Default value is nullpublic java.lang.Boolean getAutoFetchDisplayMap()
optionDataSource
is set
for this field.
Same as autoFetchDisplayMap
, but defined on a per-field basis.
public void setValueField(java.lang.String valueField)
optionDataSource
field used to retrieve the stored
values that are to be mapped to the display values (specified by
displayField
). Note that if this field is editable this will also
be applied to this field's editors.
valueField
- valueField Default value is nullpublic java.lang.String getValueField()
optionDataSource
field used to retrieve the stored
values that are to be mapped to the display values (specified by
displayField
). Note that if this field is editable this will also
be applied to this field's editors.
public void setDisplayField(java.lang.String displayField)
optionDataSource
field used to retrieve the display
values that are to be mapped from the internal values specified by valueField
.optionDataSource
is defined for the field, the cell will display
the displayField value for the current record instead of the underlying value for
this field. Note that if this field is editable this will also
be applied to this field's editors.
displayField
- displayField Default value is nullpublic java.lang.String getDisplayField()
optionDataSource
field used to retrieve the display
values that are to be mapped from the internal values specified by valueField
.optionDataSource
is defined for the field, the cell will display
the displayField value for the current record instead of the underlying value for
this field. Note that if this field is editable this will also
be applied to this field's editors.
public void setShowHover(java.lang.Boolean showHover)
com.smartgwt.client.widgets.grid.ListGridField#hoverHTML
.
canHover
can be set to true to cause hovers to be shown for all fields
by default. In this case, field.showHover
can be set to false to suppress
hovers for an individual field.
All hovers can be disabled, regardless of other settings, by setting
showHover
to false.
showHover
- showHover Default value is nullpublic java.lang.Boolean getShowHover()
com.smartgwt.client.widgets.grid.ListGridField#hoverHTML
.
canHover
can be set to true to cause hovers to be shown for all fields
by default. In this case, field.showHover
can be set to false to suppress
hovers for an individual field.
All hovers can be disabled, regardless of other settings, by setting
showHover
to false.
public void setCanToggle(java.lang.Boolean canToggle)
com.smartgwt.client..ValueMap
field to be edited without going into
edit mode. When this attribute is set, if clicking on the field will change the value - for
boolean fields toggling between true
and false
, and for valueMapped
fields, advancing the value to the next option in the valueMap.
To enable this feature, canEdit
must be set to true. Note that you can
enable toggling only (without allowing the user to edit other fields) by just setting
editEvent
.
If editEvent
is set to "click", when the user clicks on the field,
the value will be toggled, and inline editing will be triggered as usual.
Otherwise the toggled value will be saved immediately to the server, or if
autoSaveEdits
has been set to false, will be stored as an edit value
for the record.
Note : This is an advanced setting
canToggle
- canToggle Default value is nullpublic java.lang.Boolean getCanToggle()
com.smartgwt.client..ValueMap
field to be edited without going into
edit mode. When this attribute is set, if clicking on the field will change the value - for
boolean fields toggling between true
and false
, and for valueMapped
fields, advancing the value to the next option in the valueMap.
To enable this feature, canEdit
must be set to true. Note that you can
enable toggling only (without allowing the user to edit other fields) by just setting
editEvent
.
If editEvent
is set to "click", when the user clicks on the field,
the value will be toggled, and inline editing will be triggered as usual.
Otherwise the toggled value will be saved immediately to the server, or if
autoSaveEdits
has been set to false, will be stored as an edit value
for the record.
public void getFieldTitle(ListGrid viewer, int fieldNum)
title
attribute on the field to specify the title.
You can use com.smartgwt.client.widgets.grid.ListGrid#setFieldProperties
to dynamically
update the title.
viewer
- pointer back to the ListGridfieldNum
- index of this field in the grid's fields array.public HandlerRegistration addEditorEnterHandler(EditorEnterHandler handler)
Callback fired when the user first starts editing a cell.
This callback is typically used to establish dynamic default values via
ListGrid.setEditValue(int, int, java.lang.String)
or ListGrid.setEditValues(int, java.util.Map)
.
addEditorEnterHandler
in interface HasEditorEnterHandlers
handler
- the editorEnter handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addEditorExitHandler(EditorExitHandler handler)
Callback fired when the user attempts to navigate away from the current edit cell,
or complete the current edit.
Return false from this method to cancel the default behavior (Saving / cancelling the
current edit / moving to the next edit cell)
addEditorExitHandler
in interface HasEditorExitHandlers
handler
- the editorExit handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addRecordClickHandler(RecordClickHandler handler)
Executed when this field is clicked on. Note that if ListGrid.addRecordClickHandler(com.smartgwt.client.widgets.grid.events.RecordClickHandler)
is
also defined, it will be fired for fields that define a recordClick handler if the
field-level handler returns true. Return false to prevent the grid-level handler from firing.
addRecordClickHandler
in interface HasRecordClickHandlers
handler
- the recordClick handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangeHandler(ChangeHandler handler)
If this field is editable, any FormItem.addChangeHandler(com.smartgwt.client.widgets.form.fields.events.ChangeHandler)
handler specified
on the ListGridField will be passed onto the editors for this field.
addChangeHandler
in interface HasChangeHandlers
handler
- the change handler
HandlerRegistration
used to remove this handlerpublic HandlerRegistration addChangedHandler(ChangedHandler handler)
If this field is editable, any FormItem.addChangedHandler(com.smartgwt.client.widgets.form.fields.events.ChangedHandler)
handler specified
on the ListGridField will be passed onto the editors for this field.
addChangedHandler
in interface HasChangedHandlers
handler
- the changed handler
HandlerRegistration
used to remove this handlerpublic void setDefaultFilterValue(java.lang.String defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Integer defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Float defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.lang.Boolean defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDefaultFilterValue(java.util.Date defaultFilterValue)
defaultFilterValue
- the default filter valuepublic void setDateFormatter(DateDisplayFormat dateFormatter)
com.smartgwt.client..Date#setShortDisplayFormat
. Specify any valid DateDisplayFormat
, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.displayFormat
.displayFormat
. In this case you may also need to set dateInputFormat
.
dateFormatter
- dateFormatter Default value is nullpublic DateDisplayFormat getDateFormatter()
DateUtil.setShortDateDisplayFormatter(com.smartgwt.client.util.DateDisplayFormatter)
. Specify any valid DateDisplayFormat
, or function to change the display format for dates used by this grid. If specified as a function, this function will be executed in the scope of the Date and should return the formatted string.displayFormat
.displayFormat
. In this case you may also need to set dateInputFormat
.
public void setIcons(FormItemIcon... icons)
icons
to be displayed in the editors displayed for this field Note : This is an advanced setting
icons
- icons Default value is nullpublic void setGroupingModes(java.util.Map groupingModes)
If groupingModes
are present and
canGroupBy
, the menu for this field includes a
submenu of possible grouping modes generated from the groupingModes
valueMap.
When the user selects a particular grouping mode,
groupingMode
is set to the user's chosen mode,
and this choice can be detected via the field
parameter to
com.smartgwt.client.widgets.grid.ListGridField#getGroupValue
in order to provide different modes of grouping.
The user may also choose to group records without specifying a grouping mode, in this case,
the defaultGroupingMode
is used.
Note that getGroupValue
, groupingModes
et al can be specified on
SimpleType
declaration, and the different grouping modes that are offered
automatically for various common types are defined this way.
groupingModes
- groupingModes Default value is nullpublic java.util.Map getGroupingModes()
If groupingModes
are present and
canGroupBy
, the menu for this field includes a
submenu of possible grouping modes generated from the groupingModes
valueMap.
When the user selects a particular grouping mode,
groupingMode
is set to the user's chosen mode,
and this choice can be detected via the field
parameter to
com.smartgwt.client.widgets.grid.ListGridField#getGroupValue
in order to provide different modes of grouping.
The user may also choose to group records without specifying a grouping mode, in this case,
the defaultGroupingMode
is used.
Note that getGroupValue
, groupingModes
et al can be specified on
SimpleType
declaration, and the different grouping modes that are offered
automatically for various common types are defined this way.
public void setCellFormatter(CellFormatter formatter)
Given the raw value for this field as taken from the record Formatter to apply to the static values displayed in cells for this field.
Example usage:
formatting a currency value stored in cents (so "100" to "$1.00")
The value passed to this method is the raw
value for the cell.
Takes precedence over formatCellValue
defined at the grid level for cells in
this field.
Note: this formatter will not be applied to the values displayed in cells being edited. The
com.smartgwt.client.widgets.grid.ListGridField#formatEditorValue
is provided for that purpose.
formatter
- the formatterpublic void setSortNormalizer(SortNormalizer normalizer)
Note that, if the dataset
exceeds dataPageSize
and hence paging is
introduced, the grid relies on the server to provide sorting, and the sortNormalizer will no longer be called.
normalizer
- the sort normalizerpublic void setHoverCustomizer(HoverCustomizer hoverCustomizer)
hoverCustomizer
- the hover customizerpublic void setAlign(Alignment align)
cellAlign
.
align
- align Default value is nullpublic Alignment getAlign()
cellAlign
.
public void setWidth(int width)
width
- width Default value is "*"public void setWidth(java.lang.String width)
width
- width Default value is "*"public java.lang.String getWidth()
public void setHidden(boolean hidden)
public void setImgDir(java.lang.String imgDir)
public void setPrompt(java.lang.String prompt)
public void setDefaultValue(java.lang.String defaultValue)
public void setDefaultValue(java.lang.Integer defaultValue)
public void setDefaultValue(java.lang.Boolean defaultValue)
public void setDefaultValue(java.lang.Float defaultValue)
public void setDefaultValue(java.util.Date defaultValue)
public void setEditorType(FormItem editorType)
editorType
- the editor typepublic void setFilterEditorType(FormItem filterEditorType)
filterEditorType
- the filter editor typepublic void setFilterEditorValueMap(java.util.Map filterEditorValueMap)
filterEditorValueMap
- the filter editor value mappublic void setMultiple(boolean multiple)
multiple
- true for select listpublic void setEditorValueMap(java.util.Map editorValueMap)
Dynamic valueMaps can be provided by implementing ListGrid.getEditorValueMap().
editorValueMap
- the editor value mappublic void setValidators(Validator... validators)
Validator
objects for this field. When the user
edits cells in this field, these validators will be applied to the edited value.DataSourceField
, enabling both
client and server side validation.
validators
- validators Default value is nullpublic void setValueMap(java.util.Map valueMap)
canEdit
, canEdit
), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap
. See also valueMap
.
valueMap
- valueMap Default value is nullpublic void setValueMap(java.lang.String... valueMap)
canEdit
, canEdit
), editors displayed for this
field will pick up their valueMap either from this value or from editorValueMap
. See also valueMap
.
valueMap
- valueMap Default value is nullpublic void setValueIcons(java.util.Map<java.lang.String,java.lang.String> valueIcons)
editorValueIcons
.editor_
attributes:valueIconWidth
valueIconHeight
valueIconSize
valueIconLeftPadding
valueIconRightPadding
imageURLPrefix
imageURLSuffix
valueIcons
- valueIcons Default value is nullpublic void setEditorValueIcons(java.util.Map<java.lang.String,java.lang.String> editorValueIcons)
editorValueIcons
- editorValueIcons Default value is nullpublic void setOptionDataSource(DataSource optionDataSource)
valueField
and
displayField
in the loaded records,
to derive one valueMap entry per record loaded from the optionDataSource. Unlike the similar use of
optionDataSource
for
pickLists used during editing or filtering, listGridField.optionDataSource
causes the entire set of
records from the optionDataSource to be fetched, without paging. Hence listGridField.optionDataSource is
appropriate only for smaller valueMaps. For very large valueMap situations, such as an accountId field that should be
displayed as an accountName where there are thousands of accounts, the recommended approach is:
displayField
attribute on the data field to the
name of the display field. Note that it is key that the server
return both the underlying stored value and the display value, as suggested above, because this approach allows the
optionDataSource
property to be used to provide paged valueMaps during inline
editing and showFilterEditor
. Note that pickList.optionDataSource
is a distinct setting from listGridField.optionDataSource, settable via editorProperties
(for editing) and filterEditorProperties
(for filtering).
optionDataSource
- optionDataSource Default value is nullpublic void setShowIfCondition(ListGridFieldIfFunction showIf)
Use 'showIf:"false"' to set a ListGrid field to initially hidden.
Note that explicit calls to grid.showField() or hideField() will wipe out the showIf expression, as will the end user showing and hiding columns via the header contextMenu.
Also note that fields marked as detail:true will be hidden by default even if ListGrid.showDetailFields is true. To show detail fields inherited from a DataSource, include an explicit field definition for the field and set this property to return true.
showIf
- showIf criteriapublic void setSortDirection(SortDirection sortDirection)
sortField
for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort()
without specifying an explicit sort direction. Overrides ListGrid.sortDirection
sortDirection
- sortDirection Default value is nullpublic SortDirection getSortDirection()
sortField
for the listGrid, sorting occurs automatically, otherwise this will be the default direction when the user clicks the field header, or calls ListGrid.sort()
without specifying an explicit sort direction. Overrides ListGrid.sortDirection
public HandlerRegistration addCellSavedHandler(CellSavedHandler handler)
Callback fired when field changes value as the result of a cell edit. Fired only on
successful save of edit, when the new value doesn't match the value before editing.
Same signature as com.smartgwt.client.widgets.grid.ListGrid#addCellChangedHandler
, but defined on a per-field basis.
addCellSavedHandler
in interface HasCellSavedHandlers
handler
- the cellSaved handler
HandlerRegistration
used to remove this handlerpublic void setGroupTitleRenderer(GroupTitleRenderer groupTitleRenderer)
groupTitleRenderer
- the group title rendererpublic void setGroupValueFunction(GroupValueFunction groupValueFunction)
All records that for which getGroupValue() returns the same value appear in the same group. Default is the result of ListGrid.getCellValue().
While any type of value may be returned, avoiding the use of string values may result in improved performance.
In this case, GroupTitleRenderer.getGroupTitle(Object, GroupNode, ListGridField, String, ListGrid)
may be implemented to map a numeric group value into a
legible string.
groupValueFunction
- the group value functionpublic void setEditorValueMapFunction(EditorValueMapFunction editorValueMapFunction)
editorValueMapFunction
- the editor value map function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |