Package com.smartgwt.client.data

# Class Hilite

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.data.Hilite

All Implemented Interfaces:
  `HasHandlers`

public class Hilite extends RefDataClass
An object representing a user-created and user-modifiable hilite, which can be created and edited with a `HiliteEditor` either directly or via the `ListGrid.canEditHilites` behavior.

See `Hiliting` for an overview.

See Also:
  - `Hiliting`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.RefDataClass

  `id`

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Hilite()`
  `Hilite(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getBackgroundColor()`
  When edited via a `HiliteEditor`, the value for the background color of this hilite.
  `Boolean`
  `getCanEdit()`
  Can highlight be edited from header context menu? Setting attribute to `false` prevents editing.
  `Criteria`
  `getCriteria()`
  Criteria defining what records this hilite should apply to.
  `String`
  `getCssText()`
  CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"
  `Boolean`
  `getDisabled()`
  Whether this hilite is currently disabled.
  `String`
  `getFieldName()`
  Name of the field, or array of fieldNames, this hilite should be applied to.
  `String[]`
  `getFieldNameAsStringArray()`
  Name of the field, or array of fieldNames, this hilite should be applied to.
  `String`
  `getHtmlAfter()`
  HTML to append to the end of cell values where this hilite is applied.
  `String`
  `getHtmlBefore()`
  HTML to pre-pend to cell values where this hilite is applied.
  `String`
  `getHtmlValue()`
  Deprecated.
  `htmlValue` is deprecated in favor of `replacementValue`.
  `String`
  `getIcon()`
  URL of an icon to show when this hilite is applied to a cell.
  `String`
  `getId()`
  Unique ID for this hilite definition.
  `static Hilite`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `getReplacementValue()`
  HTML which replaces the cell's textual value where this hilite is applied.
  `String`
  `getTextColor()`
  When edited via a `HiliteEditor`, the value for the foreground color of this hilite.
  `String`
  `getTitle()`
  User-visible title for this hilite.
  `Hilite`
  `setBackgroundColor(String backgroundColor)`
  When edited via a `HiliteEditor`, the value for the background color of this hilite.
  `Hilite`
  `setCanEdit(Boolean canEdit)`
  Can highlight be edited from header context menu? Setting attribute to `false` prevents editing.
  `void`
  `setCriteria(Criteria criteria)`
  Criteria defining what records this hilite should apply to.
  `Hilite`
  `setCssText(String cssText)`
  CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"
  `Hilite`
  `setDisabled(Boolean disabled)`
  Whether this hilite is currently disabled.
  `Hilite`
  `setFieldName(String fieldName)`
  Name of the field, or array of fieldNames, this hilite should be applied to.
  `Hilite`
  `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.
  `Hilite`
  `setHtmlAfter(String htmlAfter)`
  HTML to append to the end of cell values where this hilite is applied.
  `Hilite`
  `setHtmlBefore(String htmlBefore)`
  HTML to pre-pend to cell values where this hilite is applied.
  `Hilite`
  `setHtmlValue(String htmlValue)`
  Deprecated.
  `htmlValue` is deprecated in favor of `replacementValue`.
  `Hilite`
  `setIcon(String icon)`
  URL of an icon to show when this hilite is applied to a cell.
  `Hilite`
  `setId(String id)`
  Unique ID for this hilite definition.
  `Hilite`
  `setReplacementValue(String replacementValue)`
  HTML which replaces the cell's textual value where this hilite is applied.
  `Hilite`
  `setTextColor(String textColor)`
  When edited via a `HiliteEditor`, the value for the foreground color of this hilite.
  `Hilite`
  `setTitle(String title)`
  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`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Hilite

    public Hilite()

  - ### Hilite

    public Hilite(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static Hilite getOrCreateRef(JavaScriptObject jsObj)

  - ### setBackgroundColor

    public Hilite setBackgroundColor(String backgroundColor)
    When edited via a `HiliteEditor`, the value for the background color of this hilite. If this is omitted, it will be automatically derived from the backgroundColor attribute of `cssText`. When a hilite is saved in a HiliteEditor, both attributes are set automatically.
    Parameters:
      `backgroundColor` - New backgroundColor value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getBackgroundColor

    public String getBackgroundColor()
    When edited via a `HiliteEditor`, the value for the background color of this hilite. If this is omitted, it will be automatically derived from the backgroundColor attribute of `cssText`. When a hilite is saved in a HiliteEditor, both attributes are set automatically.
    Returns:
      Current backgroundColor value. Default value is null
    See Also:
      - `Hiliting`

  - ### setCanEdit

    public Hilite setCanEdit(Boolean canEdit)
    Can highlight be edited from header context menu? Setting attribute to `false` prevents editing. A `null` or `true` value allows editing.
    Parameters:
      `canEdit` - New canEdit value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getCanEdit

    public Boolean getCanEdit()
    Can highlight be edited from header context menu? Setting attribute to `false` prevents editing. A `null` or `true` value allows editing.
    Returns:
      Current canEdit value. Default value is null
    See Also:
      - `Hiliting`

  - ### setCssText

    public Hilite setCssText(String cssText)
    CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"
    Parameters:
      `cssText` - New cssText value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `CSSText`
      - `Hiliting`

  - ### getCssText

    public String getCssText()
    CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"
    Returns:
      Current cssText value. Default value is null
    See Also:
      - `CSSText`
      - `Hiliting`

  - ### setDisabled

    public Hilite setDisabled(Boolean disabled)
    Whether this hilite is currently disabled.

    Hilites can be programmatically enabled and disabled via `DataBoundComponent.enableHilite()`.

    Parameters:
      `disabled` - New disabled value. Default value is false
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getDisabled

    public Boolean 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:
      - `Hiliting`

  - ### setFieldName

    public Hilite setFieldName(String fieldName)
    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.

    Parameters:
      `fieldName` - New fieldName value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `FieldName`
      - `Hiliting`

  - ### getFieldName

    public String 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.

    Returns:
      Current fieldName value. Default value is null
    See Also:
      - `FieldName`
      - `Hiliting`

  - ### setFieldName

    public Hilite setFieldName(String... fieldName)
    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.

    Parameters:
      `fieldName` - New fieldName value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `FieldName`
      - `FieldName`
      - `Hiliting`

  - ### getFieldNameAsStringArray

    public String[] 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.

    Returns:
      Current fieldName value. Default value is null
    See Also:
      - `FieldName`
      - `FieldName`
      - `Hiliting`

  - ### setHtmlAfter

    public Hilite setHtmlAfter(String htmlAfter)
    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:
      - `HTMLString`
      - `Hiliting`

  - ### getHtmlAfter

    public String 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:
      - `HTMLString`
      - `Hiliting`

  - ### setHtmlBefore

    public Hilite setHtmlBefore(String htmlBefore)
    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:
      - `HTMLString`
      - `Hiliting`

  - ### getHtmlBefore

    public String getHtmlBefore()
    HTML to pre-pend to cell values where this hilite is applied.
    Returns:
      Current htmlBefore value. Default value is null
    See Also:
      - `HTMLString`
      - `Hiliting`

  - ### setHtmlValue

    public Hilite setHtmlValue(String htmlValue)
    Deprecated.
    `htmlValue` is deprecated in favor of `replacementValue`. Note that unlike `replacementValue`, this property does not respect `disabled`, and will be applied even if `disabled` is set to `true`
    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.

    Parameters:
      `htmlValue` - New htmlValue value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getHtmlValue

    public String getHtmlValue()
    Deprecated.
    `htmlValue` is deprecated in favor of `replacementValue`. Note that unlike `replacementValue`, this property does not respect `disabled`, and will be applied even if `disabled` is set to `true`
    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:
      - `Hiliting`

  - ### setIcon

    public Hilite setIcon(String icon)
    URL of an icon to show when this hilite is applied to a cell. Position of the icon is controlled by `DataBoundComponent.hiliteIconPosition` or `ListGridField.hiliteIconPosition`.
    Parameters:
      `icon` - New icon value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `SCImgURL`
      - `Hiliting`

  - ### getIcon

    public String getIcon()
    URL of an icon to show when this hilite is applied to a cell. Position of the icon is controlled by `DataBoundComponent.hiliteIconPosition` or `ListGridField.hiliteIconPosition`.
    Returns:
      Current icon value. Default value is null
    See Also:
      - `SCImgURL`
      - `Hiliting`

  - ### setId

    public Hilite setId(String id)
    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:
      - `Identifier`
      - `Hiliting`

  - ### getId

    public String 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:
      - `Identifier`
      - `Hiliting`

  - ### setReplacementValue

    public Hilite setReplacementValue(String replacementValue)
    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:
      - `HTMLString`
      - `Hiliting`

  - ### getReplacementValue

    public String 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:
      - `HTMLString`
      - `Hiliting`

  - ### setTextColor

    public Hilite setTextColor(String textColor)
    When edited via a `HiliteEditor`, the value for the foreground color of this hilite. If this is omitted, it will be automatically derived from the textColor attribute of `cssText`. When a hilite is saved in a HiliteEditor, both attributes are set automatically.
    Parameters:
      `textColor` - New textColor value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getTextColor

    public String getTextColor()
    When edited via a `HiliteEditor`, the value for the foreground color of this hilite. If this is omitted, it will be automatically derived from the textColor attribute of `cssText`. When a hilite is saved in a HiliteEditor, both attributes are set automatically.
    Returns:
      Current textColor value. Default value is null
    See Also:
      - `Hiliting`

  - ### setTitle

    public Hilite setTitle(String title)
    User-visible title for this hilite. Used for interfaces such as menus that can enable or disable hilites.
    Parameters:
      `title` - New title value. Default value is null
    Returns:
      `Hilite` instance, for chaining setter calls
    See Also:
      - `Hiliting`

  - ### getTitle

    public String 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:
      - `Hiliting`

  - ### setFieldNames

    public void setFieldNames(String... fieldNames)
    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

    public void setCriteria(Criteria criteria)
    Criteria defining what records this hilite should apply to.
    Parameters:
      `criteria` - criteria Default value is null

  - ### getCriteria

    public Criteria getCriteria()
    Criteria defining what records this hilite should apply to.
    Returns:
      Criteria