com.smartgwt.client.data
Class Hilite

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

public class Hilite
extends RefDataClass

Definition of a hilite style.

See Hiliting for an overview.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
Hilite()
           
Hilite(JavaScriptObject jsObj)
           
 
Method Summary
static Hilite[] convertToHiliteArray(JavaScriptObject nativeArray)
          Convert the native Javascript Hilite array representation into a Hilite array.
 String getBackgroundColor()
          When edited via a HiliteEditor, the value for the background color of this hilite.
 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 getHtmlAfter()
          HTML to append to the end of cell values where this hilite is applied.
 String getHtmlBefore()
          HTML to prepend to cell values where this hilite is applied.
 String getHtmlValue()
          Value to show in place of the actual value from the record, for a record that matches this hilite.
 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 getTextColor()
          When edited via a HiliteEditor, the value for the foreground color of this hilite.
 String getTitle()
          User-visible title for this hilite.
 void setBackgroundColor(String backgroundColor)
          When edited via a HiliteEditor, the value for the background color of this hilite.
 void setCriteria(Criteria criteria)
          Criteria defining what records this hilite should apply to.
 void setCssText(String cssText)
          CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"
 void setDisabled(Boolean disabled)
          Whether this hilite is currently disabled.
 void 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.
 void setHtmlAfter(String htmlAfter)
          HTML to append to the end of cell values where this hilite is applied.
 void setHtmlBefore(String htmlBefore)
          HTML to prepend to cell values where this hilite is applied.
 void setHtmlValue(String htmlValue)
          Value to show in place of the actual value from the record, for a record that matches this hilite.
 void setIcon(String icon)
          URL of an icon to show when this hilite is applied to a cell.
 void setId(String id)
          Unique id for this hilite definition.
 void setJavaScriptObject(JavaScriptObject jsObj)
           
 void setTextColor(String textColor)
          When edited via a HiliteEditor, the value for the foreground color of this hilite.
 void setTitle(String title)
          User-visible title for this hilite.
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
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
 

Constructor Detail

Hilite

public Hilite()

Hilite

public Hilite(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static Hilite getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)

setBackgroundColor

public void 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 - . See String. Default value is null

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:
. See String

setCssText

public void setCssText(String cssText)
CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"

Parameters:
cssText - . See CSSText. Default value is null

getCssText

public String getCssText()
CSS text to be applied to cells where this hilite is applied, for example, "background-color:#FF0000"

Returns:
. See CSSText

setDisabled

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

Hilites can be programmatically enabled and disabled via DataBoundComponent.enableHilite.

Parameters:
disabled - disabled Default value is false

getDisabled

public Boolean getDisabled()
Whether this hilite is currently disabled.

Hilites can be programmatically enabled and disabled via DataBoundComponent.enableHilite.

Returns:
Boolean

setFieldName

public void 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 - . See String. Default value is null

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:
. See String

setHtmlAfter

public void setHtmlAfter(String htmlAfter)
HTML to append to the end of cell values where this hilite is applied.

Parameters:
htmlAfter - . See String. Default value is null

getHtmlAfter

public String getHtmlAfter()
HTML to append to the end of cell values where this hilite is applied.

Returns:
. See String

setHtmlBefore

public void setHtmlBefore(String htmlBefore)
HTML to prepend to cell values where this hilite is applied.

Parameters:
htmlBefore - . See String. Default value is null

getHtmlBefore

public String getHtmlBefore()
HTML to prepend to cell values where this hilite is applied.

Returns:
. See String

setHtmlValue

public void setHtmlValue(String htmlValue)
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 - . See String. Default value is null

getHtmlValue

public String getHtmlValue()
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:
. See String

setIcon

public void setIcon(String icon)
URL of an icon to show when this hilite is applied to a cell. Position of the icon is controlled by hiliteIconPosition or hiliteIconPosition.

Parameters:
icon - . See SCImgURL. Default value is null

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 hiliteIconPosition or hiliteIconPosition.

Returns:
. See SCImgURL

setId

public void 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 hiliteProperty on the record to this id.

Parameters:
id - . See String. Default value is null

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 hiliteProperty on the record to this id.

Returns:
. See String

setTextColor

public void 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 - . See String. Default value is null

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:
. See String

setTitle

public void setTitle(String title)
User-visible title for this hilite. Used for interfaces such as menus that can enable or disable hilites.

Parameters:
title - . See String. Default value is null

getTitle

public String getTitle()
User-visible title for this hilite. Used for interfaces such as menus that can enable or disable hilites.

Returns:
. See String

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

convertToHiliteArray

public static Hilite[] convertToHiliteArray(JavaScriptObject nativeArray)
Convert the native Javascript Hilite array representation into a Hilite array.

Parameters:
nativeArray - native hilite array
Returns:
hilite array