Packagecom.flexicious.nestedtreedatagrid.cells
Classpublic class CellUtils
InheritanceCellUtils Inheritance Object

A set of utility functions that are shared by FlexDataGridDataCell, FlexDataGridDataCell2 and FlexDataGridDataCell3



Public Methods
 MethodDefined By
  
capitalizeFirstLetterIfPrefix(prefix:String, val:String):String
[static] If there is a value for the prefix parameter, capitalizes the first word of the val parameter and returns it
CellUtils
  
doCap(val:String):String
[static] Capitalizes the first character of the passed in string.
CellUtils
  
[static] Draws the background as well as calls drawBorder on the given cell Each cell in Ultimate will draw its own background and border.
CellUtils
  
[static] Draws the borders of the given cell.
CellUtils
  
[static] Draws the right border for this cell.
CellUtils
  
[static] If a value is defined for grid.cellBackgroundColorFunction, returns the result of that function else returns null.
CellUtils
  
[static] The getBackgroundColors method is responsible for evaluating the background color of the cell.
CellUtils
  
[static] If the cell.backgroundColors is an array, returns a string join using a comma.
CellUtils
  
getRolloverColor(cell:IFlexDataGridCell, prop:String):*
[static] If this is a fillRow, returns the value of the color property.
CellUtils
  
getStyleValue(cell:IFlexDataGridCell, styleProp:String):*
[static] Returns the value of the given style property based on the following logic: If there is a column associated with this cell, and there is a property in the styleOverrides collection of the column with styleProp name, returns the value of that property from styleOverrides If there is a column, calls the getStyleValue method on that column (which checkes to see if a there is a value for this style property in the column, return that, else if in the level, return that, else if in the grid, return that).
CellUtils
  
[static] If a value is defined for grid.cellTextColorFunction, returns the result of that function else returns null.
CellUtils
  
[static] The getTextColors method is responsible for evaluating the text color of the cell.
CellUtils
  
[static] This method is responsible for initializing the checkbox renderer for both the header and data cells.
CellUtils
  
[static]
CellUtils
  
setRendererSize(cellRenderer:DisplayObject, w:Number, h:Number):void
[static] Given a renderer, sets the size on basis of whether or not there are vertical and horizotnal gridlines .
CellUtils
Method Detail
capitalizeFirstLetterIfPrefix()method
public static function capitalizeFirstLetterIfPrefix(prefix:String, val:String):String

If there is a value for the prefix parameter, capitalizes the first word of the val parameter and returns it

Parameters

prefix:String
 
val:String

Returns
String
doCap()method 
public static function doCap(val:String):String

Capitalizes the first character of the passed in string.

Parameters

val:String

Returns
String
drawBackground()method 
public static function drawBackground(cell:IFlexDataGridCell):void

Draws the background as well as calls drawBorder on the given cell Each cell in Ultimate will draw its own background and border. This method will use the evaluated results of a number of properties on the cell object to calculate the color, width, and visibility of the background associated with this cell.

Parameters

cell:IFlexDataGridCell

drawBorders()method 
public static function drawBorders(cell:IFlexDataGridCell):void

Draws the borders of the given cell. Each cell in Ultimate will draw its own background and border. This method will use the evaluated results of a number of properties on the cell object to calculate the color, width, and visibility of the border associated with this cell.

Parameters

cell:IFlexDataGridCell

drawRightBorder()method 
public static function drawRightBorder(cell:IFlexDataGridCell):void

Draws the right border for this cell. There are a few rules on basis of which a right (or a left) border is drawn on a cell.

Parameters

cell:IFlexDataGridCell

getBackgroundColorFromGrid()method 
public static function getBackgroundColorFromGrid(cell:IFlexDataGridCell):*

If a value is defined for grid.cellBackgroundColorFunction, returns the result of that function else returns null.

Parameters

cell:IFlexDataGridCell

Returns
*
getBackgroundColors()method 
public static function getBackgroundColors(cell:IFlexDataGridCell):*

The getBackgroundColors method is responsible for evaluating the background color of the cell.

Parameters

cell:IFlexDataGridCell

Returns
*
getBackGroundColorString()method 
public static function getBackGroundColorString(cell:IFlexDataGridCell):String

If the cell.backgroundColors is an array, returns a string join using a comma. Else, returns the result of ExtendedUIUtils.getColorName on it.

Parameters

cell:IFlexDataGridCell

Returns
String
getRolloverColor()method 
public static function getRolloverColor(cell:IFlexDataGridCell, prop:String):*

If this is a fillRow, returns the value of the color property. Else, returns the value of the "prop" property which is the value of one of the following style properties:

Parameters

cell:IFlexDataGridCell
 
prop:String

Returns
*
getStyleValue()method 
public static function getStyleValue(cell:IFlexDataGridCell, styleProp:String):*

Returns the value of the given style property based on the following logic:

Parameters

cell:IFlexDataGridCell
 
styleProp:String

Returns
*
getTextColorFromGrid()method 
public static function getTextColorFromGrid(cell:IFlexDataGridCell):*

If a value is defined for grid.cellTextColorFunction, returns the result of that function else returns null.

Parameters

cell:IFlexDataGridCell

Returns
*
getTextColors()method 
public static function getTextColors(cell:IFlexDataGridCell):*

The getTextColors method is responsible for evaluating the text color of the cell.

Parameters

cell:IFlexDataGridCell

Returns
*
initializeCheckBoxRenderer()method 
public static function initializeCheckBoxRenderer(cell:IFlexDataGridCell, level:FlexDataGridColumnLevel):void

This method is responsible for initializing the checkbox renderer for both the header and data cells. It performns the following tasks

Parameters

cell:IFlexDataGridCell
 
level:FlexDataGridColumnLevel

refreshCell()method 
public static function refreshCell(cell:IFlexDataGridCell):void

Parameters

cell:IFlexDataGridCell

setRendererSize()method 
public static function setRendererSize(cellRenderer:DisplayObject, w:Number, h:Number):void

Given a renderer, sets the size on basis of whether or not there are vertical and horizotnal gridlines . If there are vertical gridlines, sets the width to width minus verticalGridLineThickness If there are vertical gridlines, sets the height to width minus horizontalGridLineThickness

Parameters

cellRenderer:DisplayObject
 
w:Number
 
h:Number