Packagecom.flexicious.nestedtreedatagrid.cells
Classpublic class FlexDataGridHeaderCell
InheritanceFlexDataGridHeaderCell Inheritance FlexDataGridCell Inheritance mx.core.UIComponent

A container class for all header cells. In addition to the functionality it inherits from FlexDataGridCell, it adds support for the following feautres: FlexDataGridHeaderCell inherits from FlexDataGridCell, which provides a bulk of the functionality to it. FlexDataGridCell is the container component for each of the DataGrid's cells. This is a psuedo abstract class, the cells that you see in the grid are actually one of the following subclasses of this class: There are two other cells types, FlexDataGridDataCell2 and FlexDataGridDataCell3 (if you set enableDataCellOptimization=true) that do not inherit from this class, but are used in lieu of FlexDataGridDataCell in Flex 4 based grids to improve performance, since they are lighter than FlexDataGridDataCell The FlexDataGridCell is responsible for sizing, positioning (based on padding), drawing the background, and drawing the borders. This class has a renderer property, which is the actual component that is displayed on the UI. In case of the Header,Data or Footer cells the default renderer is a UITextField or UIFTETextField. For Filter, it is an instance of the IFilterControl. For the Pager, it is an IPager control. For the LevelRenderer it is an instance of the Class Factory that you specify in the nextLevelRenderer of the associated column Level. For the ExpandCollapse cells, it will draw an instance of the expand collapse icon on basis of the disclosureIcon style property All the drawing happens in the drawCell method. It seperately calls the drawBackground and drawBorder methods. Usually specifying the style properties, or the cellBackgroud/rowBackground/cellBorder/rowBorder functions is sufficient, but in case its needed, these methods can be overridden in a custom implementation, and this custom implementation can then be hooked in via the dataCellRenderer, headerCellRenderer, footerCellRenderer, pagerCellRenderer, filterCellRender, expandCollapseHeaderCellRenderer,nestIndentPaddingCellRenderer, and expandCollapseCellRenderer of the column or the level. Please note, that this class is recycled, so for example, as you scroll, a FlexDataGridCell object that was displaying some other item in the data provider previously could be reused to display the current one.



Public Properties
 PropertyDefined By
 InheritedbackgroundColorString : String
[read-only] If column is a checkbox column, returns the current state of the checkbox renderer
FlexDataGridCell
 InheritedbackgroundDirty : Boolean
A number of operations can cause the cells text and background colors to change.
FlexDataGridCell
 InheritedcheckBoxState : String
[read-only] If column is a checkbox column, returns the current state of the checkbox renderer
FlexDataGridCell
 InheritedcolIcon : Image
When column.enableIcon=true, this is the icon that will be associated with the cell.
FlexDataGridCell
 Inheritedcolumn : FlexDataGridColumn
The FlexDataGridColumn associated with this cell.
FlexDataGridCell
 InheritedcomponentInfo : ComponentInfo
The component info that holds this cell in the cells collection of the associated rowInfo object.
FlexDataGridCell
 InheritedcurrentBackgroundColors : *
FlexDataGridCell
 InheritedcurrentTextColors : *
FlexDataGridCell
 Inheriteddestroyed : Boolean
Once a grid is rendered, each cell in the grid is shown in the UI.
FlexDataGridCell
  drawTopBorder : Boolean
[override] [read-only]
FlexDataGridHeaderCell
 InheritedexpandCollapseIcon : ExpandCollapseIcon
In 2.7, ability was added to have any cell be a expand collapse cell.
FlexDataGridCell
  height : Number
[override] [write-only]
FlexDataGridHeaderCell
 InheritedhorizontalGridLineColor : *
[read-only]
FlexDataGridCell
 InheritedhorizontalGridLineThickness : *
[read-only]
FlexDataGridCell
 InheritediExpandCollapseComponent : IExpandCollapseComponent
[read-only] In 2.7, ability was added to have any cell be a expand collapse cell.
FlexDataGridCell
 InheritedisChromeCell : Boolean
[read-only] The "Chrome" is defined as header,footer,pager,filter sections.
FlexDataGridCell
 InheritedisContentArea : 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.
FlexDataGridCell
 InheritedisDataCell : Boolean
[read-only] Returns true if the rowInfo object associated with this cell is of type RowPositionInfo.ROW_TYPE_DATA.
FlexDataGridCell
 InheritedisElastic : Boolean
[read-only] Returns true if this cell is not right locked or not fixed width.
FlexDataGridCell
 InheritedisExpandCollapseCell : Boolean
[read-only] Calcualted property that returns if this cell is a expand collapse cell.
FlexDataGridCell
 InheritedisLeftLocked : Boolean
[read-only]
FlexDataGridCell
 InheritedisLocked : Boolean
[read-only]
FlexDataGridCell
 InheritedisNewlyCreated : Boolean
[read-only] When a cell is created for the first time, this flag is set to true.
FlexDataGridCell
 InheritedisRightLocked : Boolean
[read-only]
FlexDataGridCell
  isSorted : Boolean
[read-only] Returns icon!=null
FlexDataGridHeaderCell
 Inheritedlevel : FlexDataGridColumnLevel
The FlexDataGridColumnLevel associated with this cell.
FlexDataGridCell
 Inheritedmoving : Boolean = false
Used by header cells and column group cells for drag drop move.
FlexDataGridCell
 InheritednestDepth : Number
[read-only] Returns the nestpDepth property of the associated level, if it is not null.
FlexDataGridCell
 InheritedperceivedX : Number
[read-only] The X Position of this cell, as the user sees it.
FlexDataGridCell
 Inheritedrenderer : DisplayObject
[read-only]
FlexDataGridCell
 InheritedrendererFactory : IFactory
FlexDataGridCell
 InheritedrowInfo : RowInfo
The rowInfo object associated with this cell.
FlexDataGridCell
 Inheritedtext : String
This is the actual text to display in the cell.
FlexDataGridCell
 InheritedverticalGridLineColor : *
[read-only]
FlexDataGridCell
 InheritedverticalGridLineThickness : *
[read-only]
FlexDataGridCell
 InheritedwordWrap : Boolean
This flag is a used for enabling the wordWrap on the associated renderer.
FlexDataGridCell
Protected Properties
 PropertyDefined By
  icon : Object
The sort icon.
FlexDataGridHeaderCell
  prefix : String
[override] [read-only] Returns one of the following values on basis of what type of cell this is: Blank string for data cells header footer filter columnGroup pager
FlexDataGridHeaderCell
  sortLabel : Object
The sort label.
FlexDataGridHeaderCell
Public Methods
 MethodDefined By
  
Constructor.
FlexDataGridHeaderCell
  
createSortIcon(container:DisplayObjectContainer):void
Creates the sort icon.
FlexDataGridHeaderCell
  
destroy():void
[override]
FlexDataGridHeaderCell
  
Removes the sort icon and the sort label
FlexDataGridHeaderCell
 Inherited
drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
Draws the background as well as calls drawBorder on the given cell Each cell in Ultimate will draw its own background and border.
FlexDataGridCell
 Inherited
drawRightBorder(unscaledWidth:Number, unscaledHeight:Number):void
FlexDataGridCell
  
[override]
FlexDataGridHeaderCell
  
[override]
FlexDataGridHeaderCell
 Inherited
If this is a fillRow, returns the value of the color property.
FlexDataGridCell
 Inherited
getStyleValue(styleProp:String):*
FlexDataGridCell
  
[override]
FlexDataGridHeaderCell
 Inherited
FlexDataGridCell
 Inherited
FlexDataGridCell
  
initializeCheckBoxRenderer(renderer:DisplayObject):void
[override]
FlexDataGridHeaderCell
 Inherited
Marks the cell so that the background and borders are drawn in the next validation cycle.
FlexDataGridCell
  
move(x:Number, y:Number):void
[override]
FlexDataGridHeaderCell
 Inherited
placeComponent(cellRenderer:DisplayObject, unscaledWidth:Number, unscaledHeight:Number, usePadding:Boolean = true):Point
FlexDataGridCell
  
Places the sort icon after it is created.
FlexDataGridHeaderCell
  
[override]
FlexDataGridHeaderCell
  
setActualSize(w:Number, h:Number):void
[override]
FlexDataGridHeaderCell
  
setRendererSize(cellRenderer:DisplayObject, w:Number, h:Number):void
[override] Sets the size of the renderer, accounting for the width of the split header or the icon.
FlexDataGridHeaderCell
Protected Methods
 MethodDefined By
 Inherited
FlexDataGridCell
 Inherited
drawCell(unscaledWidth:Number, unscaledHeight:Number):void
FlexDataGridCell
  
Draws the little gray line between the header that does the actual sort and the multi column sort part of the header that adds the current column to the existing sort.
FlexDataGridHeaderCell
  
onCheckChange(event:Event):void
[override] Handler for checkbox check change.
FlexDataGridHeaderCell
  
onSortLabelClick(event:MouseEvent):void
Default handler for the sort label click.
FlexDataGridHeaderCell
  
selectLevel(checkLevel:FlexDataGridColumnLevel, items:Object, checked:Boolean = true):void
Select all items passed in
FlexDataGridHeaderCell
Events
 Event Summary Defined By
  Dispatched when the cell is clicked.FlexDataGridHeaderCell
Property Detail
drawTopBorderproperty
drawTopBorder:Boolean  [read-only] [override]


Implementation
    public function get drawTopBorder():Boolean
heightproperty 
height:Number  [write-only] [override]


Implementation
    public function set height(value:Number):void
iconproperty 
icon:Object

The sort icon. This is null by default. It gets initialized in the createSortIcon method, which is called after refreshCell method.


Implementation
    protected function get icon():Object
    protected function set icon(value:Object):void
isSortedproperty 
isSorted:Boolean  [read-only]

Returns icon!=null


Implementation
    public function get isSorted():Boolean
prefixproperty 
prefix:String  [read-only] [override]

Returns one of the following values on basis of what type of cell this is:


Implementation
    protected function get prefix():String
sortLabelproperty 
sortLabel:Object

The sort label. This is null by default. It gets initialized in the createSortIcon method, which is called after refreshCell method.


Implementation
    protected function get sortLabel():Object
    protected function set sortLabel(value:Object):void
Constructor Detail
FlexDataGridHeaderCell()Constructor
public function FlexDataGridHeaderCell()

Constructor. Adds an event listener for the click event.

Method Detail
createSortIcon()method
public function createSortIcon(container:DisplayObjectContainer):void

Creates the sort icon. Depending whether the enableMultiColumnSort flag is set to true, this method will create a sort label as well, which is responsible for initializing the icon.

Parameters

container:DisplayObjectContainer

destroy()method 
override public function destroy():void

destroySortIcon()method 
public function destroySortIcon():void

Removes the sort icon and the sort label

drawSortSeparator()method 
protected function drawSortSeparator():void

Draws the little gray line between the header that does the actual sort and the multi column sort part of the header that adds the current column to the existing sort.

getBackgroundColors()method 
override public function getBackgroundColors():*

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

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

Returns
*
initializeCheckBoxRenderer()method 
override public function initializeCheckBoxRenderer(renderer:DisplayObject):void

Parameters

renderer:DisplayObject

move()method 
override public function move(x:Number, y:Number):void

Parameters

x:Number
 
y:Number

onCheckChange()method 
override protected function onCheckChange(event:Event):void

Handler for checkbox check change. If the target is the top level (grid.columnLevel) checkbox, dispatches the SELECT_ALL_CHECKBOX_CHANGED event, and calls selectAll on the associated top level. Calls level.selectRow method based on checkbox state, and whether or not grid.enableSelectionExclusion is set to true.

Parameters

event:Event

onSortLabelClick()method 
protected function onSortLabelClick(event:MouseEvent):void

Default handler for the sort label click. (The sort label is only shown when the enableMultiColumnSortFlag is set to true). If the grid.enableSplitHeader is true and the column is sortable, sort is handled by the headerContainers onHeaderCellClicked method. Otherwise, this method will launch the multiColumnSortPopUp.

Parameters

event:MouseEvent

placeSortIcon()method 
public function placeSortIcon():void

Places the sort icon after it is created. By default the column is placed 3 pixels from the right, half way from the top. If the enableMultiColumnSort flag is set to true, the label is places above or below the icon based on if it is ascending or descending respectively.

refreshCell()method 
override public function refreshCell():void

selectLevel()method 
protected function selectLevel(checkLevel:FlexDataGridColumnLevel, items:Object, checked:Boolean = true):void

Select all items passed in

Parameters

checkLevel:FlexDataGridColumnLevel
 
items:Object
 
checked:Boolean (default = true)

setActualSize()method 
override public function setActualSize(w:Number, h:Number):void

Parameters

w:Number
 
h:Number

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

Sets the size of the renderer, accounting for the width of the split header or the icon. If enableSplitHeader is set to true, reduces the renderer's width by grid.headerSortSeparatorRight If sort icon is rendererd, reduces the renderer's width by the icons width.

Parameters

cellRenderer:DisplayObject
 
w:Number
 
h:Number

Event Detail
headerClicked Event
Event Object Type: com.flexicious.nestedtreedatagrid.events.FlexDataGridEvent

Dispatched when the cell is clicked.