Class Hilite
- All Implemented Interfaces:
HasHandlers
HiliteEditor
either directly or via the ListGrid.canEditHilites
behavior. See Hiliting
for an overview.
- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.RefDataClass
id
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionWhen edited via aHiliteEditor
, the value for the background color of this hilite.Can highlight be edited from header context menu? Setting attribute tofalse
prevents editing.Criteria defining what records this hilite should apply to.CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"Whether this hilite is currently disabled.Name of the field, or array of fieldNames, this hilite should be applied to.String[]
Name of the field, or array of fieldNames, this hilite should be applied to.HTML to append to the end of cell values where this hilite is applied.HTML to pre-pend to cell values where this hilite is applied.Deprecated.getIcon()
URL of an icon to show when this hilite is applied to a cell.getId()
Unique ID for this hilite definition.static Hilite
getOrCreateRef
(JavaScriptObject jsObj) HTML which replaces the cell's textual value where this hilite is applied.When edited via aHiliteEditor
, the value for the foreground color of this hilite.getTitle()
User-visible title for this hilite.setBackgroundColor
(String backgroundColor) When edited via aHiliteEditor
, the value for the background color of this hilite.setCanEdit
(Boolean canEdit) Can highlight be edited from header context menu? Setting attribute tofalse
prevents editing.void
setCriteria
(Criteria criteria) Criteria defining what records this hilite should apply to.setCssText
(String cssText) CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"setDisabled
(Boolean disabled) Whether this hilite is currently disabled.setFieldName
(String fieldName) Name of the field, or array of fieldNames, this hilite should be applied to.setFieldName
(String... fieldName) Name of the field, or array of fieldNames, this hilite should be applied to.void
setFieldNames
(String... fieldNames) Name of the fields that hilite should be applied to.setHtmlAfter
(String htmlAfter) HTML to append to the end of cell values where this hilite is applied.setHtmlBefore
(String htmlBefore) HTML to pre-pend to cell values where this hilite is applied.setHtmlValue
(String htmlValue) Deprecated.htmlValue
is deprecated in favor ofreplacementValue
.URL of an icon to show when this hilite is applied to a cell.Unique ID for this hilite definition.setReplacementValue
(String replacementValue) HTML which replaces the cell's textual value where this hilite is applied.setTextColor
(String textColor) When edited via aHiliteEditor
, the value for the foreground color of this hilite.User-visible title for this hilite.Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetID
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
Hilite
public Hilite() -
Hilite
-
-
Method Details
-
getOrCreateRef
-
setBackgroundColor
When edited via aHiliteEditor
, the value for the background color of this hilite. If this is omitted, it will be automatically derived from the backgroundColor attribute ofcssText
. When a hilite is saved in a HiliteEditor, both attributes are set automatically. -
getBackgroundColor
When edited via aHiliteEditor
, the value for the background color of this hilite. If this is omitted, it will be automatically derived from the backgroundColor attribute ofcssText
. When a hilite is saved in a HiliteEditor, both attributes are set automatically.- Returns:
- Current backgroundColor value. Default value is null
- See Also:
-
setCanEdit
Can highlight be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing. -
getCanEdit
Can highlight be edited from header context menu? Setting attribute tofalse
prevents editing. Anull
ortrue
value allows editing.- Returns:
- Current canEdit value. Default value is null
- See Also:
-
setCssText
CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000" -
getCssText
CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000" -
setDisabled
Whether this hilite is currently disabled.Hilites can be programmatically enabled and disabled via
DataBoundComponent.enableHilite()
. -
getDisabled
Whether this hilite is currently disabled.Hilites can be programmatically enabled and disabled via
DataBoundComponent.enableHilite()
.- Returns:
- Current disabled value. Default value is false
- See Also:
-
setFieldName
Name of the field, or array of fieldNames, this hilite should be applied to.If unset, hilite is applied to every field of the record.
-
getFieldName
Name of the field, or array of fieldNames, this hilite should be applied to.If unset, hilite is applied to every field of the record.
-
setFieldName
Name of the field, or array of fieldNames, this hilite should be applied to.If unset, hilite is applied to every field of the record.
-
getFieldNameAsStringArray
Name of the field, or array of fieldNames, this hilite should be applied to.If unset, hilite is applied to every field of the record.
-
setHtmlAfter
HTML to append to the end of cell values where this hilite is applied.- Parameters:
htmlAfter
- New htmlAfter value. Default value is null- Returns:
Hilite
instance, for chaining setter calls- See Also:
-
getHtmlAfter
HTML to append to the end of cell values where this hilite is applied.- Returns:
- Current htmlAfter value. Default value is null
- See Also:
-
setHtmlBefore
HTML to pre-pend to cell values where this hilite is applied.- Parameters:
htmlBefore
- New htmlBefore value. Default value is null- Returns:
Hilite
instance, for chaining setter calls- See Also:
-
getHtmlBefore
HTML to pre-pend to cell values where this hilite is applied.- Returns:
- Current htmlBefore value. Default value is null
- See Also:
-
setHtmlValue
Deprecated.htmlValue
is deprecated in favor ofreplacementValue
. Note that unlikereplacementValue
, this property does not respectdisabled
, and will be applied even ifdisabled
is set totrue
Value to show in place of the actual value from the record, for a record that matches this hilite.This can be used to take ranges of numeric values and simplify them to "Low", "Medium", "High" or similar textual values, translate very small or very large values to "Outlier" or "Negligible", and similar use cases.
-
getHtmlValue
Deprecated.htmlValue
is deprecated in favor ofreplacementValue
. Note that unlikereplacementValue
, this property does not respectdisabled
, and will be applied even ifdisabled
is set totrue
Value to show in place of the actual value from the record, for a record that matches this hilite.This can be used to take ranges of numeric values and simplify them to "Low", "Medium", "High" or similar textual values, translate very small or very large values to "Outlier" or "Negligible", and similar use cases.
- Returns:
- Current htmlValue value. Default value is null
- See Also:
-
setIcon
URL of an icon to show when this hilite is applied to a cell. Position of the icon is controlled byDataBoundComponent.hiliteIconPosition
orListGridField.hiliteIconPosition
. -
getIcon
URL of an icon to show when this hilite is applied to a cell. Position of the icon is controlled byDataBoundComponent.hiliteIconPosition
orListGridField.hiliteIconPosition
. -
setId
Unique ID for this hilite definition.For hilites that include
criteria
this is not required.If you are explicitly marking records for hiliting, set
DataBoundComponent.hiliteProperty
on the record to this ID.Note that the ID must be a valid JavaScript identifier, and in particular, setting the ID to a number is not supported.
- Parameters:
id
- New id value. Default value is null- Returns:
Hilite
instance, for chaining setter calls- See Also:
-
getId
Unique ID for this hilite definition.For hilites that include
criteria
this is not required.If you are explicitly marking records for hiliting, set
DataBoundComponent.hiliteProperty
on the record to this ID.Note that the ID must be a valid JavaScript identifier, and in particular, setting the ID to a number is not supported.
- Returns:
- Current id value. Default value is null
- See Also:
-
setReplacementValue
HTML which replaces the cell's textual value where this hilite is applied.Note that sorting, filtering, etc behavior will still operate on the underlying value. For example, if there is a date field with the FilterEditor enabled, the default search interface will still offer date-range based filtering even if hilites have caused values to be displayed as text such as "current" or "past due".
- Parameters:
replacementValue
- New replacementValue value. Default value is null- Returns:
Hilite
instance, for chaining setter calls- See Also:
-
getReplacementValue
HTML which replaces the cell's textual value where this hilite is applied.Note that sorting, filtering, etc behavior will still operate on the underlying value. For example, if there is a date field with the FilterEditor enabled, the default search interface will still offer date-range based filtering even if hilites have caused values to be displayed as text such as "current" or "past due".
- Returns:
- Current replacementValue value. Default value is null
- See Also:
-
setTextColor
When edited via aHiliteEditor
, the value for the foreground color of this hilite. If this is omitted, it will be automatically derived from the textColor attribute ofcssText
. When a hilite is saved in a HiliteEditor, both attributes are set automatically. -
getTextColor
When edited via aHiliteEditor
, the value for the foreground color of this hilite. If this is omitted, it will be automatically derived from the textColor attribute ofcssText
. When a hilite is saved in a HiliteEditor, both attributes are set automatically.- Returns:
- Current textColor value. Default value is null
- See Also:
-
setTitle
User-visible title for this hilite. Used for interfaces such as menus that can enable or disable hilites. -
getTitle
User-visible title for this hilite. Used for interfaces such as menus that can enable or disable hilites.- Returns:
- Current title value. Default value is null
- See Also:
-
setFieldNames
Name of the fields that hilite should be applied to.If unset, hilite is applied to every field of the record.
- Parameters:
fieldNames
- fieldNames Default value is null
-
setCriteria
Criteria defining what records this hilite should apply to.- Parameters:
criteria
- criteria Default value is null
-
getCriteria
Criteria defining what records this hilite should apply to.- Returns:
- Criteria
-
htmlValue
is deprecated in favor ofreplacementValue
.