Packagecom.flexicious.nestedtreedatagrid.interfaces
Interfacepublic interface IFlexDataGridCell extends flash.events.IEventDispatcher, mx.core.IUIComponent
Implementors FlexDataGridCell

This is the interface implemented by all the cells that appear in the Flexicious Ultimate DataGrid. These cells can either inherit from UIComponent (most of them inherit from FlexDataGridCell, which extends UIComponent), or FlexSprite(FlexDataGridDataCell3 inherits from Sprite). This interface defines all the common properties on each of these cells. All the code in the Flexicious DataGrid works against this interface for loose coupling. The IFlexDataGridCell interface defines the basic set of APIs that you must implement to be added as a cell to a row in the Flexicious Ultimate DataGrid.



Public Properties
 PropertyDefined By
  automationName : String
To provide a friendly name for automation.
IFlexDataGridCell
  backgroundDirty : Boolean
A number of operations can cause the cells text and background colors to change.
IFlexDataGridCell
  column : FlexDataGridColumn
The FlexDataGridColumn associated with this cell.
IFlexDataGridCell
  componentInfo : ComponentInfo
The component info that holds this cell in the cells collection of the associated rowInfo object.
IFlexDataGridCell
  currentBackgroundColors : *
This property stores the temporary value of a cells background color when the user hovers over it.
IFlexDataGridCell
  currentTextColors : *
This property stores the temporary value of a cells text color when the user hovers over it.
IFlexDataGridCell
  destroyed : Boolean
Once a grid is rendered, each cell in the grid is shown in the UI.
IFlexDataGridCell
  drawTopBorder : Boolean
[read-only] Calculated property that controls whether or not to draw the top border.
IFlexDataGridCell
  graphics : Graphics
[read-only] The graphics object associated with the given sprite.
IFlexDataGridCell
  horizontalGridLineColor : *
[read-only] What color to use to draw the horizontal grid lines for this cell.
IFlexDataGridCell
  horizontalGridLineThickness : *
[read-only] What thickness to use to draw the horizontal grid lines for this cell.
IFlexDataGridCell
  iExpandCollapseComponent : IExpandCollapseComponent
[read-only] In 2.7, ability was added to have any cell be a expand collapse cell.
IFlexDataGridCell
  isChromeCell : Boolean
[read-only] The "Chrome" is defined as header,footer,pager,filter sections.
IFlexDataGridCell
  isContentArea : Boolean
[read-only] Returns true if we are a data cell or if we area a chrome cell at a nest depth of greater than 1.
IFlexDataGridCell
  isDataCell : Boolean
[read-only] Returns true if the rowInfo object associated with this cell is of type RowPositionInfo.ROW_TYPE_DATA.
IFlexDataGridCell
  isElastic : Boolean
[read-only] Returns true if this cell is not right locked or not fixed width.
IFlexDataGridCell
  isExpandCollapseCell : Boolean
[read-only] Calcualted property that returns if this cell is a expand collapse cell.
IFlexDataGridCell
  isLeftLocked : Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="left"
IFlexDataGridCell
  isLocked : Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="left" or columnLockMode="right"
IFlexDataGridCell
  isNewlyCreated : Boolean
[read-only] When a cell is created for the first time, this flag is set to true.
IFlexDataGridCell
  isRightLocked : Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="right"
IFlexDataGridCell
  level : FlexDataGridColumnLevel
The FlexDataGridColumnLevel associated with this cell.
IFlexDataGridCell
  nestDepth : Number
[read-only] Returns the nestpDepth property of the associated level, if it is not null.
IFlexDataGridCell
  perceivedX : Number
[read-only] The X Position of this cell, as the user sees it.
IFlexDataGridCell
  renderer : DisplayObject
[read-only] The actual renderer component that displays the value of the cell.
IFlexDataGridCell
  rendererFactory : IFactory
The factory class used for initializing the cell.
IFlexDataGridCell
  rowInfo : RowInfo
The rowInfo object associated with this cell.
IFlexDataGridCell
  text : String
This is the actual text to display in the cell.
IFlexDataGridCell
  verticalGridLineColor : *
[read-only] What color to use to draw the vertical grid lines for this cell.
IFlexDataGridCell
  verticalGridLineThickness : *
[read-only] What thickness to use to draw the horizontal grid lines for this cell.
IFlexDataGridCell
  wordWrap : Boolean
This flag is a used for enabling the wordWrap on the associated renderer.
IFlexDataGridCell
Public Methods
 MethodDefined By
  
destroy():void
Once a grid is rendered, each cell in the grid is shown in the UI.
IFlexDataGridCell
  
drawRightBorder(unscaledWidth:Number, unscaledHeight:Number):void
IFlexDataGridCell
  
IFlexDataGridCell
  
IFlexDataGridCell
  
Returns the value of the textRollOverColor style property.
IFlexDataGridCell
  
getStyle(styleProp:String):*
IFlexDataGridCell
  
getStyleValue(styleProp:String):*
IFlexDataGridCell
  
IFlexDataGridCell
  
Returns true if the style property for horizontalGridLines is defined for the type of the row.
IFlexDataGridCell
  
Returns true if the style property for verticalGridLines is defined for the type of the row.
IFlexDataGridCell
  
Marks the cell so that the background and borders are drawn in the next validation cycle.
IFlexDataGridCell
  
Marks a component so that its updateDisplayList() method gets called during a later screen update.
IFlexDataGridCell
  
placeComponent(cellRenderer:DisplayObject, unscaledWidth:Number, unscaledHeight:Number, usePadding:Boolean = true):Point
This method will size and place the renderer within the bounds of this cell.
IFlexDataGridCell
  
This method is responsible for preparing the cell for display.
IFlexDataGridCell
  
setStyle(styleProp:String, value:*):void
IFlexDataGridCell
Property Detail
automationNameproperty
automationName:String

To provide a friendly name for automation.


Implementation
    public function get automationName():String
    public function set automationName(value:String):void
backgroundDirtyproperty 
backgroundDirty:Boolean

A number of operations can cause the cells text and background colors to change. Resizing, mouse interactions, scrolling, hovering, etc. In order to make sure we're not calling the painting and color calculating routines unnecessarily, all these operations simply mark the background as dirty. The is done by calling the invalidateBackground() method. This method will set the backgroundDirty flag to true and call invalidateDisplayList. In the next validation cycle the cell get's its color calculation code executed and painting code will then use the calculated color values to paint the cell.


Implementation
    public function get backgroundDirty():Boolean
    public function set backgroundDirty(value:Boolean):void
columnproperty 
column:FlexDataGridColumn

The FlexDataGridColumn associated with this cell. Can be null for cells that do not have a column (e.g. ExpandCollapse Cells). For Cells that span multiple columns, it is still the column that this cell starts on.

This property can be used as the source for data binding.


Implementation
    public function get column():FlexDataGridColumn
    public function set column(value:FlexDataGridColumn):void
componentInfoproperty 
componentInfo:ComponentInfo

The component info that holds this cell in the cells collection of the associated rowInfo object. When a row is rendered in the FlexDataGrid, the memory structure used to hold each row is the RowInfo object. If you look at grid.bodyContainer.rows, each item in this collection is an object of type RowInfo. These are the rows in the dataprovider that are currently rendered, which is different than the list of items in the dataprovider. In the cells collection of the rowInfo object, we have a list of ComponentInfo objects. The componentInfo object stores a bunch of additional information and provides a number of handy methods to interact with the cell object. It is basically a wrapper around the IFlexDataGridCell object.


Implementation
    public function get componentInfo():ComponentInfo
    public function set componentInfo(value:ComponentInfo):void
currentBackgroundColorsproperty 
currentBackgroundColors:*

This property stores the temporary value of a cells background color when the user hovers over it. The background colors of each cell are calculated using a series of rules as defined in the documentation for the getBackgroundColors method of the CellUtils class.


Implementation
    public function get currentBackgroundColors():*
    public function set currentBackgroundColors(value:any):void
currentTextColorsproperty 
currentTextColors:*

This property stores the temporary value of a cells text color when the user hovers over it. The text colors of each cell are calculated using a series of rules as defined in the documentation for the getTextColors method of the CellUtils class.


Implementation
    public function get currentTextColors():*
    public function set currentTextColors(value:any):void
destroyedproperty 
destroyed:Boolean

Once a grid is rendered, each cell in the grid is shown in the UI. After being shown, if the user performs operations like filtering, or paging, that result in the cell being taken out of view and no longer being rendered on the UI, instead of removing the cell from memory, we store it in the renderer cache of the grid. Prior to decommissioning the cell, we call the destroy method on the cell. This method will set the destroyed flag to true.


Implementation
    public function get destroyed():Boolean
    public function set destroyed(value:Boolean):void
drawTopBorderproperty 
drawTopBorder:Boolean  [read-only]

Calculated property that controls whether or not to draw the top border. Each cell in Ultimate will draw its own background and border. In order to prevent cells from drawing double borders (cell above me drew bottom border, so I should not need to draw my top border), this flag evaluates to false. But in certain cases, you may want to draw both top and bottom border. The bottom border is always controlled by the horizontalGridLines style property. The top border is controlled by the drawTopBorder style property. In order to provide fine grained control over border drawing functionality, there are the following style properties available.

To control the bottom border, the following properties are available:


Implementation
    public function get drawTopBorder():Boolean
graphicsproperty 
graphics:Graphics  [read-only]

The graphics object associated with the given sprite.


Implementation
    public function get graphics():Graphics
horizontalGridLineColorproperty 
horizontalGridLineColor:*  [read-only]

What color to use to draw the horizontal grid lines for this cell. The value is used to draw the bottom border. Similar to the drawTopBorder, this is a calculated property which is derived from the associated rowInfo object's row type. The result is the value of one of the following based on the rowInfo.rowPositionInfo.rowType:


Implementation
    public function get horizontalGridLineColor():*
horizontalGridLineThicknessproperty 
horizontalGridLineThickness:*  [read-only]

What thickness to use to draw the horizontal grid lines for this cell. The value is used to draw the bottom border. drawTopBorder Similar to the drawTopBorder, this is a calculated property which is derived from the associated rowInfo object's row type. The result is the value of one of the following based on the rowInfo.rowPositionInfo.rowType:


Implementation
    public function get horizontalGridLineThickness():*
iExpandCollapseComponentproperty 
iExpandCollapseComponent:IExpandCollapseComponent  [read-only]

In 2.7, ability was added to have any cell be a expand collapse cell. If you set enableExpandCollapse=true on the column the cells that belong to that column are provided with an iExpandCollapseComponent, which defaults to an instance of


Implementation
    public function get iExpandCollapseComponent():IExpandCollapseComponent

See also

isChromeCellproperty 
isChromeCell:Boolean  [read-only]

The "Chrome" is defined as header,footer,pager,filter sections. This method returns true if this cell belongs to either of these containers.


Implementation
    public function get isChromeCell():Boolean
isContentAreaproperty 
isContentArea:Boolean  [read-only]

Returns true if we are a data cell or if we area a chrome cell at a nest depth of greater than 1. These cells are all drawn in the content area, hence have to scroll. The "Chrome" is defined as header,footer,pager,filter sections. This method returns true if this cell belongs to either of these containers.


Implementation
    public function get isContentArea():Boolean
isDataCellproperty 
isDataCell:Boolean  [read-only]

Returns true if the rowInfo object associated with this cell is of type RowPositionInfo.ROW_TYPE_DATA.


Implementation
    public function get isDataCell():Boolean
isElasticproperty 
isElastic:Boolean  [read-only]

Returns true if this cell is not right locked or not fixed width.


Implementation
    public function get isElastic():Boolean
isExpandCollapseCellproperty 
isExpandCollapseCell:Boolean  [read-only]

Calcualted property that returns if this cell is a expand collapse cell.


Implementation
    public function get isExpandCollapseCell():Boolean
isLeftLockedproperty 
isLeftLocked:Boolean  [read-only]

Returns true if the column associated with this cell has columnLockMode="left"


Implementation
    public function get isLeftLocked():Boolean
isLockedproperty 
isLocked:Boolean  [read-only]

Returns true if the column associated with this cell has columnLockMode="left" or columnLockMode="right"


Implementation
    public function get isLocked():Boolean
isNewlyCreatedproperty 
isNewlyCreated:Boolean  [read-only]

When a cell is created for the first time, this flag is set to true. After the cell is no longer needed the cell is put back into the renderer cache. If after being put in the renderer cache, the cell gets called back into action and is added to the display list, this flag will be set to false.


Implementation
    public function get isNewlyCreated():Boolean
isRightLockedproperty 
isRightLocked:Boolean  [read-only]

Returns true if the column associated with this cell has columnLockMode="right"


Implementation
    public function get isRightLocked():Boolean
levelproperty 
level:FlexDataGridColumnLevel

The FlexDataGridColumnLevel associated with this cell. This set on initialize. This is usually never null.

This property can be used as the source for data binding.


Implementation
    public function get level():FlexDataGridColumnLevel
    public function set level(value:FlexDataGridColumnLevel):void
nestDepthproperty 
nestDepth:Number  [read-only]

Returns the nestpDepth property of the associated level, if it is not null. If it is null, returns 1. The top level column has nestDepth=1;


Implementation
    public function get nestDepth():Number
perceivedXproperty 
perceivedX:Number  [read-only]

The X Position of this cell, as the user sees it. Since the Left, Right and Unlocked containers are measuremment frames in themselves, each cell's X is relative to its container. This method converts the measurement of the x value relative to the corresponding parent container to the measurement of X relative to the grid. This is used mainly by keyboard navigation to figure out which cell is to the right or left of the given cell.


Implementation
    public function get perceivedX():Number
rendererproperty 
renderer:DisplayObject  [read-only]

The actual renderer component that displays the value of the cell. For all but the FlexDataGridDataCell2 and FlexDataGridDataCell3 there is a separate component that does the rendering. For FlexDataGridDataCell2 and FlexDataGridDataCell3, the cell itself becomes the renderer. This is why both FlexDataGridDataCell2 and FlexDataGridDataCell3 are more performant and optimized than the others. These are also more numerous, since they display data values. The header, filters and footers are relatively smaller in number.


Implementation
    public function get renderer():DisplayObject
rendererFactoryproperty 
rendererFactory:IFactory

The factory class used for initializing the cell. This is arrived at by calling the deriveRenderer method of the associated column.


Implementation
    public function get rendererFactory():IFactory
    public function set rendererFactory(value:IFactory):void

See also

rowInfoproperty 
rowInfo:RowInfo

The rowInfo object associated with this cell. This cell should be within the cells collection of this rowInfo object.


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

This is the actual text to display in the cell. This is just a placeholder for the text. Ultimately this value is applied to the renderers text property. This is why, if you specify a custom renderer that exposes a text property, the grid automatically applies the result of the column.itemToLabel method on the associated rowInfo.data object to the text property of the itemRenderer.


Implementation
    public function get text():String
    public function set text(value:String):void
verticalGridLineColorproperty 
verticalGridLineColor:*  [read-only]

What color to use to draw the vertical grid lines for this cell. The value is used to draw the right border. drawTopBorder Similar to the drawTopBorder, this is a calculated property which is derived from the associated rowInfo object's row type. The result is the value of one of the following based on the rowInfo.rowPositionInfo.rowType:


Implementation
    public function get verticalGridLineColor():*
verticalGridLineThicknessproperty 
verticalGridLineThickness:*  [read-only]

What thickness to use to draw the horizontal grid lines for this cell. The value is used to draw the bottom border. drawTopBorder Similar to the drawTopBorder, this is a calculated property which is derived from the associated rowInfo object's row type. The result is the value of one of the following based on the rowInfo.rowPositionInfo.rowType:


Implementation
    public function get verticalGridLineThickness():*
wordWrapproperty 
wordWrap:Boolean

This flag is a used for enabling the wordWrap on the associated renderer. Please note, if you define an item renderer, setting wordWrap will only have an impact if you define a renderer that exposes a wordWrap property. When you specify wordWrap on the associated column, the grid will set this flag to true. It will also use a predefined item renderer that has a wordWrap property, unless you specify a custom renderer. If you specify a custom renderer, then this renderer must assume responsibility for exposing a wordWrap property and handling wordWrap appropriately.


Implementation
    public function get wordWrap():Boolean
    public function set wordWrap(value:Boolean):void
Method Detail
destroy()method
public function destroy():void

Once a grid is rendered, each cell in the grid is shown in the UI. After being shown, if the user performs operations like filtering, or paging, that result in the cell being taken out of view and no longer being rendered on the UI, instead of removing the cell from memory, we store it in the renderer cache of the grid. Prior to decommissioning the cell, we call the destroy method on the cell. The destroy method typically will set the level, column, rowInfo, currentBackgroundColors, currentTextColors, for all cells to null. For header cells, it will destroy the associated sort icons, if any. For filter cells, it will call the clear method on the filter control.

drawRightBorder()method 
public function drawRightBorder(unscaledWidth:Number, unscaledHeight:Number):void

Parameters

unscaledWidth:Number
 
unscaledHeight:Number

getBackgroundColors()method 
public function getBackgroundColors():*

Returns
*
getRolloverColor()method 
public function getRolloverColor():*

Returns
*
getRolloverTextColor()method 
public function getRolloverTextColor():*

Returns the value of the textRollOverColor style property.

Returns
*
getStyle()method 
public function getStyle(styleProp:String):*

Parameters

styleProp:String

Returns
*
getStyleValue()method 
public function getStyleValue(styleProp:String):*

Parameters

styleProp:String

Returns
*
getTextColors()method 
public function getTextColors():*

Returns
*
hasHorizontalGridLines()method 
public function hasHorizontalGridLines():Boolean

Returns true if the style property for horizontalGridLines is defined for the type of the row. Based upon the rowInfo.rowPositionInfo.rowType, one of the following properties are inspected:

Returns
Boolean
hasVerticalGridLines()method 
public function hasVerticalGridLines():Boolean

Returns true if the style property for verticalGridLines is defined for the type of the row. Based upon the rowInfo.rowPositionInfo.rowType, one of the following properties are inspected:

Returns
Boolean
invalidateBackground()method 
public function invalidateBackground():void

Marks the cell so that the background and borders are drawn in the next validation cycle. Please, note this does not update or re-evaluate the content of the cell, just the border and the background. To updated the content, call the refreshCell method instead.

invalidateDisplayList()method 
public function invalidateDisplayList():void

Marks a component so that its updateDisplayList() method gets called during a later screen update.

placeComponent()method 
public function placeComponent(cellRenderer:DisplayObject, unscaledWidth:Number, unscaledHeight:Number, usePadding:Boolean = true):Point

This method will size and place the renderer within the bounds of this cell. The renderer of the cell gets a width of cell.width - paddingLeft - paddingRight. It gets a height of cell.height - paddingTop - paddingBottom. It then gets placed at x position of paddingLeft and y position of paddingTop. The padding is only applied if usePadding is set to true (default). The padding is calculated on basis of what type of cell this is. The following style properties are used to figure out padding:

This method is also used by the edit code, to place the editor. When placing the editor, usePadding is set to falst, so the editor occupies the entire cell to prevent the text of the cells from showing.

Parameters

cellRenderer:DisplayObject — The renderer to place. Can be the actual renderer, or the editor.
 
unscaledWidth:Number — The width of the cell.
 
unscaledHeight:Number — The height of the cell.
 
usePadding:Boolean (default = true) — Flag to apply padding while figuring out the size of the renderer

Returns
Point — a new Point object with paddingTop and paddingLeft as y and x properties.
refreshCell()method 
public function refreshCell():void

This method is responsible for preparing the cell for display. It gets triggered both the first time the cell is intantiated, and again when the cell is pulled out from cache, and also when the cell is assigned to another row data object during vertical scrolling, or another column during horizontal scrolling. For all cells, It performns the following steps:

For data cells, It performns the following additional steps: For header cells, It performns the following additional steps: For footer cells, It performns the following additional steps:

setStyle()method 
public function setStyle(styleProp:String, value:*):void

Parameters

styleProp:String
 
value:*