Packagecom.lightstreamer.as_client.item_renderers
Classpublic class HighlightCellItemRenderer
InheritanceHighlightCellItemRenderer Inheritance mx.controls.Label
Implements mx.core.IFactory

ItemRenderer class to be used to highlight cells on value changes. Some configuration is needed to have a visual effect. The provided visual effect consists of the following sequence:



Public Properties
 PropertyDefined By
  alphas : Array
An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1.
HighlightCellItemRenderer
  bgAlpha : Number
The alpha value corresponding to the max alpha value within the alphas array. Modifiying this value results in a change in all the values contained in the alphas array: the value is assigned to the higher value in the array while other values are modified maintaining the ratio between them.
HighlightCellItemRenderer
  coldStyles : *
Styles to be applied whenever a cell passes from a "hot" state to an "cold" state.
HighlightCellItemRenderer
  colors : Array = null
An array of RGB hexadecimal color values to be applied in the hot state.
HighlightCellItemRenderer
  fadeTime : uint
The duration of the fade effect (in milliseconds) that is applied to pass from "hot" to "cold" state.
HighlightCellItemRenderer
  gradientType : String = linear
A value from the GradientType class that specifies which gradient type to use: GradientType.LINEAR or GradientType.RADIAL.
HighlightCellItemRenderer
  hotStyles : *
Styles to be applied whenever a cell passes from a "cold" state to a "hot" state.
HighlightCellItemRenderer
  hotTime : uint = 0
The duration of the "hot" state (in milliseconds) after an update has been received.
HighlightCellItemRenderer
  ratios : Array = null
An array of color distribution ratios; valid values are from 0 to 255.
HighlightCellItemRenderer
  text : String
[override] Inherited from mx.controls.Label.
HighlightCellItemRenderer
Protected Properties
 PropertyDefined By
  fadeEffect : AnimateProperty = null
The effect that is applied to pass from "hot" to "cold" state.
HighlightCellItemRenderer
Public Methods
 MethodDefined By
  
clear():void
Move the cell to its cold state.
HighlightCellItemRenderer
  
Creates a clone of the object.
HighlightCellItemRenderer
Protected Methods
 MethodDefined By
  
decorateNewInstance(instance:*):void
Copies to the given instance the public parameters of the HighlightCellItemRenderer class from the current instance.
HighlightCellItemRenderer
  
fillCell():void
The method that is responsible of the colouring of the cell.
HighlightCellItemRenderer
  
formatValue(newVal:String, oldVal:String):String
A formatting method that could be overridden to change the value contained in the cell.
HighlightCellItemRenderer
Property Detail
alphasproperty
alphas:Array

An array of alpha values for the corresponding colors in the colors array; valid values are 0 to 1. If the value is lower than 0, the default is 0. If the value is greater than 1, the default is 1.


Implementation
    public function get alphas():Array
    public function set alphas(value:Array):void
bgAlphaproperty 
bgAlpha:Number

The alpha value corresponding to the max alpha value within the alphas array.

Modifiying this value results in a change in all the values contained in the alphas array: the value is assigned to the higher value in the array while other values are modified maintaining the ratio between them. Also the background of the item is repainted accordingly with the new alpha values.


Implementation
    public function get bgAlpha():Number
    public function set bgAlpha(value:Number):void

See also

coldStylesproperty 
public var coldStyles:*

Styles to be applied whenever a cell passes from a "hot" state to an "cold" state. Each name in this object should correspond to the name of an HTML stylesheet attribute; the DOM attribute name should be used, not the CSS name (e.g. "fontWeight" is accepted, while "font-weight" is not). The value should be a valid value for the attribute name.

colorsproperty 
public var colors:Array = null

An array of RGB hexadecimal color values to be applied in the hot state. You can specify up to 15 colors. For each color, be sure you specify a corresponding value in the alphas and ratios properties.

See also

fadeEffectproperty 
protected var fadeEffect:AnimateProperty = null

The effect that is applied to pass from "hot" to "cold" state.

fadeTimeproperty 
fadeTime:uint

The duration of the fade effect (in milliseconds) that is applied to pass from "hot" to "cold" state.


Implementation
    public function get fadeTime():uint
    public function set fadeTime(value:uint):void
gradientTypeproperty 
public var gradientType:String = linear

A value from the GradientType class that specifies which gradient type to use: GradientType.LINEAR or GradientType.RADIAL.

hotStylesproperty 
public var hotStyles:*

Styles to be applied whenever a cell passes from a "cold" state to a "hot" state. Each name in this object should correspond to the name of an HTML stylesheet attribute; the DOM attribute name should be used, not the CSS name (e.g. "fontWeight" is accepted, while "font-weight" is not). The value should be a valid value for the attribute name.

hotTimeproperty 
public var hotTime:uint = 0

The duration of the "hot" state (in milliseconds) after an update has been received. (Default: 0).

ratiosproperty 
public var ratios:Array = null

An array of color distribution ratios; valid values are from 0 to 255. This value defines the percentage of the width where the color is sampled at 100%. The value 0 represents the left-hand position in the gradient box, and 255 represents the right-hand position in the gradient box.

textproperty 
text:String[override]

Inherited from mx.controls.Label.


Implementation
    public function get text():String
    public function set text(value:String):void

See also

Method Detail
clear()method
public function clear():void

Move the cell to its cold state.

decorateNewInstance()method 
protected function decorateNewInstance(instance:*):void

Copies to the given instance the public parameters of the HighlightCellItemRenderer class from the current instance. Is it possible to exploit this method to easily implement the newInstance method of an extended class.

Parameters

instance:* — the instance to be decorated with the values of this instance

fillCell()method 
protected function fillCell():void

The method that is responsible of the colouring of the cell.

formatValue()method 
protected function formatValue(newVal:String, oldVal:String):String

A formatting method that could be overridden to change the value contained in the cell. Default implementation does nothing.

Parameters

newVal:String
 
oldVal:String

Returns
String
newInstance()method 
public function newInstance():*

Creates a clone of the object. This method is used internally by the Flash player to obtaina new instance of this Item Renderer per each field.

Returns
*