Packagecom.flexicious.nestedtreedatagrid
Classpublic class FlexDataGridVirtualBodyContainer
InheritanceFlexDataGridVirtualBodyContainer Inheritance FlexDataGridBodyContainer Inheritance FlexDataGridContainerBase Inheritance mx.core.Container
Subclasses PrintFlexDataGridBodyContainer

The container for the body that supports virtual scrolling



Public Properties
 PropertyDefined By
 InheritedcolumnDraggingDragCell : FlexDataGridCell
When a column is being dragged and dropped into a different location, this variable holds the cell that is being dragged.
FlexDataGridContainerBase
 InheritedcolumnResizingCell : FlexDataGridHeaderCell
When a column is being resized, this variable holds the cell that initiated the resize operation.
FlexDataGridContainerBase
 InheritedenableHorizontalRecycling : Boolean = true
Flag to turn on horizontal scroll recycle.
FlexDataGridContainerBase
 Inheritedgrid : FlexDataGrid
The grid that we belong to
FlexDataGridContainerBase
 InheritedinEdit : Boolean
[read-only] Returns true if grid is in edit mode
FlexDataGridContainerBase
 InheriteditemClickTimerDuration : Number = 250
Duration, in milliseconds to wait until dispatching a new ITEM_CLICK event.
FlexDataGridContainerBase
 InheriteditemVerticalPositions : Array
[read-only] Row positions
FlexDataGridContainerBase
 InheritedloadedItems : ArrayCollection
[read-only] In lazy loaded grid levels, (filterPageSortMode=server), when the user expands a level for the first time, since the data is not loaded, the level dispatches the filterPageSortChange, or itemLoad.
FlexDataGridBodyContainer
 InheritedonScreenRows : Array
[read-only] Returns the number of rows currently visible.
FlexDataGridBodyContainer
 InheritedopenItems : ArrayCollection
A list of items that the user has opened.
FlexDataGridBodyContainer
  _openItemVerticalPositions : Array
Todo - make private
FlexDataGridVirtualBodyContainer
 Inheritedrows : ArrayCollection
Collection of RowInfo objects currently being displayed.
FlexDataGridContainerBase
 InheritedvalidNextPage : Boolean
[read-only] Returns true if there is another page of data.
FlexDataGridBodyContainer
 InheritedvariableRowHeightRenderers : KeyValuePairCollection
Active only when the body containers calculateRowHeight method is running.
FlexDataGridBodyContainer
  virtualScrollDelay : uint
Delay in milliseconds before "virtualScroll" event is dispatched.
FlexDataGridVirtualBodyContainer
Protected Properties
 PropertyDefined By
 InheritedcellsWithColSpanOrRowSpan : Array
Once we are through calculating rowspans and colspans, we go through this array, popping cells and hiding cells that are covered by the increased col and row spans of the cells in this array.
FlexDataGridContainerBase
 InheritededitCell : IFlexDataGridDataCell
FlexDataGridContainerBase
 Inheritededitor : UIComponent
FlexDataGridContainerBase
 InheriteditemClickTimer : Timer
Timer to prevent double click from causing two item clicks.
FlexDataGridContainerBase
 Inherited_keyboardhandled : Boolean = false
FlexDataGridContainerBase
 InheritedlastSelectedRowIndex : int = -1
Last selected Row Index
FlexDataGridContainerBase
  loadedViewPort : Rectangle
The current viewport rectange
FlexDataGridVirtualBodyContainer
  virtualScrollTimer : Timer
The timer that launches the actual scroll so we do not fire server calls as the user is scrolling.
FlexDataGridVirtualBodyContainer
Public Methods
 MethodDefined By
  
FlexDataGridVirtualBodyContainer
  
addOpenItem(item:Object, rowPositionInfo:RowPositionInfo = null):void
[override]
FlexDataGridVirtualBodyContainer
  
calculateTotalHeight(flat:Object = null, level:FlexDataGridColumnLevel = null, heightSoFar:Number = 0, nestLevel:int = 0, expanding:RowPositionInfo = null, addedRows:Array = null, parentObject:Object = null, isRecusirve:Boolean = false):int
[override]
FlexDataGridVirtualBodyContainer
 Inherited
cancelEdit(event:Event):void
Cancels the current running edit.
FlexDataGridContainerBase
  
[override]
FlexDataGridVirtualBodyContainer
  
[override]
FlexDataGridVirtualBodyContainer
 Inherited
Clears out the variable row height renderers
FlexDataGridBodyContainer
  
doScroll():void
FlexDataGridVirtualBodyContainer
 Inherited
Used by accesibility
FlexDataGridContainerBase
 Inherited
endEdit(editor:UIComponent, event:Event = null):void
Dispatches ITEM_EDIT_END.
FlexDataGridContainerBase
 Inherited
filterPageSort(flat:Object, level:FlexDataGridColumnLevel, parentObj:Object, applyFilter:Boolean = true, applyPaging:Boolean = true, applySort:Boolean = true, pages:Array = null, updatePager:Boolean = false):Object
FlexDataGridContainerBase
 Inherited
findLoadingInfo(item:Object, level:FlexDataGridColumnLevel, useSelectedKeyField:Boolean = false):ItemLoadInfo
In lazy loaded grids, gets the loaded info of the provided object.
FlexDataGridContainerBase
 Inherited
getCellForRowColumn(dataObject:Object, col:FlexDataGridColumn, includeExp:Boolean = false):IFlexDataGridCell
Given a column and a data object, returns the cell associated with the data object.
FlexDataGridContainerBase
 Inherited
getCellInDirection(thisCell:IFlexDataGridCell, direction:String, dataOnly:Boolean = false, editableOnly:Boolean = false, scrollIfNecessary:Boolean = true, hoverableOnly:Boolean = false):IFlexDataGridCell
Gets the cell in the specified direction of the provided cell
FlexDataGridContainerBase
 Inherited
getChildAtId(arr:Array, id:uint):IFlexDataGridCell
Used by accesibility
FlexDataGridContainerBase
 Inherited
getChildId(arr:Array, cell:IFlexDataGridCell):uint
Used by accesibility
FlexDataGridContainerBase
 Inherited
getChildIds(arr:Array):void
Used by accesibility
FlexDataGridContainerBase
 Inherited
The IFlexDataGridCell under edit currently.
FlexDataGridContainerBase
 Inherited
getCurrentEditor():UIComponent
The editor being used as the current component to edit.
FlexDataGridContainerBase
 Inherited
Gets the first cell of the first column.
FlexDataGridContainerBase
 Inherited
getFirstHoverableCell(row:RowInfo, dataOnly:Boolean = false, editableOnly:Boolean = false):IFlexDataGridCell
FlexDataGridContainerBase
 Inherited
Returns the RowPosition Info object for the item at the given vertical scroll position
FlexDataGridBodyContainer
 Inherited
ets a copy of the calculated item vertical positions
FlexDataGridBodyContainer
 Inherited
getObjectStack(itemToFind:Object, stackSoFar:Array, useItemKeyForCompare:Boolean, flat:Object = null, level:FlexDataGridColumnLevel = null):Boolean
Given an object at any level, returns an array containing information about that object, followed by its parent, until the top of the tree is reached, in reverse order.
FlexDataGridBodyContainer
  
getParentOpenItem(verticalPosition:Number, myNestDepth:int):VirtualScrollLoadInfo
FlexDataGridVirtualBodyContainer
  
getParentOpenItemFromObject(item:Object):Object
FlexDataGridVirtualBodyContainer
 Inherited
getSelectedIds(bodyStart:uint):Array
Used by accesibility
FlexDataGridContainerBase
  
getTopLevelRecordIndex(vsp:Number):Number
FlexDataGridVirtualBodyContainer
 Inherited
gotoItem(item:Object, highlight:Boolean, useItemKeyForCompare:Boolean, level:FlexDataGridColumnLevel = null, rebuild:Boolean = true):Boolean
Given a data item, scrolls to that item in the datagrid If the use item Key For compare parameter is set to true, uses the selectedKeyField value of the item to identify the item.
FlexDataGridBodyContainer
 Inherited
gotoRow(rowIndex:int):Boolean
Given a row index (less than the total number of rows, goes to the row in question).
FlexDataGridBodyContainer
  
gotoVerticalPosition(vsp:Number):void
[override]
FlexDataGridVirtualBodyContainer
  
handleArrowKey(cell:IFlexDataGridCell, keyCode:uint, triggerEvent:Event):Boolean
[override]
FlexDataGridVirtualBodyContainer
 Inherited
handleCellKeyUp(cell:IFlexDataGridCell, keyCode:uint, triggerEvent:Event):void
Handles cell key up.
FlexDataGridContainerBase
 Inherited
handleEditorKeyEvent(event:KeyboardEvent, cell:IFlexDataGridCell):void
FlexDataGridContainerBase
 Inherited
initializeEditor(editCell:IFlexDataGridDataCell, editor:UIComponent, pare:UIComponent):void
FlexDataGridContainerBase
 Inherited
initializeFilterRenderer(filterRenderer:IFilterControl, filterColumn:FlexDataGridColumn, item:Object, flatDp:Object, level:FlexDataGridColumnLevel):void
Given a filter control, initializes it from the provided column
FlexDataGridContainerBase
 Inherited
Calls invalidateBackground() on each of the cells.
FlexDataGridContainerBase
 Inherited
[override]
FlexDataGridContainerBase
 Inherited
Given a cell, returns true if the cell is "hidden" by another cell that has a col span which will cover this cell.
FlexDataGridContainerBase
 Inherited
Given a cell, returns true if the cell is "hidden" by another cell that has a row span which will cover this cell.
FlexDataGridContainerBase
 Inherited
Can this cell accept hover.
FlexDataGridContainerBase
 Inherited
[override] Returnes true if the row's vertical position is less than the grids vertical scroll bar position or if the rows vertical position plus rows height is greater than the grids vertical position plus grid height.
FlexDataGridBodyContainer
 Inherited
isYOutOfVisibleArea(numY:Number, numH:Number):Boolean
Returnes true if the row's vertical position is less than the grids vertical scroll bar position or if the rows vertical position plus rows height is greater than the grids vertical position plus grid height.
FlexDataGridBodyContainer
 Inherited
nextPage():void
Goes to the next page of data.
FlexDataGridBodyContainer
 Inherited
onHeaderCellClicked(cell:FlexDataGridHeaderCell, triggerEvent:Event, isMsc:Boolean = false, useMsc:Boolean = true, direction:String = null):void
FlexDataGridContainerBase
 Inherited
populateValue(event:Event, itemEditor:UIComponent = null):Boolean
Applies the value from the editor back to the model object.
FlexDataGridContainerBase
 Inherited
quickFind(whatToFind:String, flat:Object = null, level:FlexDataGridColumnLevel = null, result:Array = null, searchCols:Array = null, breakAfterFind:Boolean = true, captureCols:Boolean = false):Array
Iterates through the data provider to get a list of objects that match the text provided.
FlexDataGridBodyContainer
 Inherited
reDraw():void
Calls removeAllComponents, createComponents, validateNow, and snapToColumnWidths
FlexDataGridContainerBase
 Inherited
Re-evaluates all the visible cell contents.
FlexDataGridContainerBase
 Inherited
FlexDataGridContainerBase
 Inherited
removeAllComponents(recycle:Boolean):void
End the edit, if active, call removeComponent on each of the rows, and remove all the children.
FlexDataGridContainerBase
  
removeOpenItem(item:Object, rowPositionInfo:RowPositionInfo = null):void
[override]
FlexDataGridVirtualBodyContainer
 Inherited
scrollToExistingRow(vsp:Number, scrollDown:Boolean):void
[override] Scrolls to a row that is already drawn.
FlexDataGridBodyContainer
 Inherited
selectText(txt:String):void
Selects the provided text in the currently visible cells that have the default item renderer, or if the item renderer has the selection property
FlexDataGridBodyContainer
 Inherited
Sets the current highlight cell to the first available cell.
FlexDataGridContainerBase
  
setCurrentRowAtScrollPosition(vsp:Number):Boolean
[override]
FlexDataGridVirtualBodyContainer
  
setVirtualScrollData(arr:Array):void
FlexDataGridVirtualBodyContainer
 Inherited
Sets the records in the visible range.
FlexDataGridBodyContainer
 Inherited
shiftColumns(columnToInsert:FlexDataGridColumn, insertBefore:FlexDataGridColumn):void
Inserts the column specified column before the specified column
FlexDataGridBodyContainer
 Inherited
sortByColumn(col:FlexDataGridColumn, direction:String = null):void
FlexDataGridContainerBase
Protected Methods
 MethodDefined By
 Inherited
Based upon the type of the cell, adds various event listeners to them to respond to mouse overs, clicks, double clicks, mouse outs, keyboard input, etc.
FlexDataGridContainerBase
 Inherited
addPadding(nestLevel:int, row:RowInfo, paddingHeight:Number, level:FlexDataGridColumnLevel, forceRightLock:Boolean = false, scrollPad:Boolean = false, width:int = -1):FlexDataGridPaddingCell
FlexDataGridContainerBase
  
addRecord(recordsOnPage:Array, vsp:Number):Number
FlexDataGridVirtualBodyContainer
 Inherited
Starts the Edit Session.
FlexDataGridContainerBase
 Inherited
binarySearch(arr:Array, verticalPos:Number, low:int, high:int):RowPositionInfo
On basis of the vertical scroll position provided, does a quick binary lookup of the record to be shown at that row.
FlexDataGridBodyContainer
 Inherited
Given the mouse event, figures out which cell is the drop target.
FlexDataGridContainerBase
 Inherited
checkRowSpanColSpan(retCell:IFlexDataGridCell, thisCell:IFlexDataGridCell, direction:String, dataOnly:Boolean, editableOnly:Boolean, scrollIfNecessary:Boolean, hoverableOnly:Boolean):IFlexDataGridCell
FlexDataGridContainerBase
 Inherited
[override]
FlexDataGridContainerBase
  
dispatchScroll(vsp:Number, recordsOnPage:Array = null):void
FlexDataGridVirtualBodyContainer
  
FlexDataGridVirtualBodyContainer
 Inherited
getAllRows():ArrayCollection
Gets the Rows Collection
FlexDataGridContainerBase
  
FlexDataGridVirtualBodyContainer
 Inherited
FlexDataGridContainerBase
 Inherited
FlexDataGridContainerBase
  
FlexDataGridVirtualBodyContainer
 Inherited
Given a cell, gets the colspan associated with that cell by calling the grid.colSpanFunction.
FlexDataGridContainerBase
  
FlexDataGridVirtualBodyContainer
  
FlexDataGridVirtualBodyContainer
  
getOpenVirtualScrollInfo(vsp:Number, levelNestDepth:Number = -1):VirtualScrollLoadInfo
FlexDataGridVirtualBodyContainer
 Inherited
FlexDataGridContainerBase
 Inherited
FlexDataGridContainerBase
 Inherited
Given a cell, gets the rowSpan associated with that cell by calling the grid.rowSpanFunction.
FlexDataGridContainerBase
  
getVpFromRecordIndex(vsp:Number, recordIndex:Number, expandingLevel:FlexDataGridColumnLevel):Number
FlexDataGridVirtualBodyContainer
 Inherited
handleDoubleClick(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles the Double Click.
FlexDataGridContainerBase
 Inherited
handleMouseClick(cell:IFlexDataGridCell, triggerEvent:Event, checkTimer:Boolean = true):void
Handles the Mouse click.
FlexDataGridContainerBase
 Inherited
handleMouseOut(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles mouse out.
FlexDataGridContainerBase
 Inherited
handleMouseOver(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles mouse over for data cells.
FlexDataGridContainerBase
 Inherited
handleSpaceBar(cell:IFlexDataGridCell, triggerEvent:Event):void
FlexDataGridContainerBase
 Inherited
Once the snapToColumnWidths finishes, the cellsWithColSpanOrRowSpan array contains all cells that have a row or col span.
FlexDataGridContainerBase
 Inherited
FlexDataGridContainerBase
 Inherited
onCellMouseClick(event:MouseEvent):void
Handles mouse click.
FlexDataGridContainerBase
 Inherited
onCellMouseOver(event:MouseEvent):void
Handles Cell Mouse Over.
FlexDataGridContainerBase
  
[override]
FlexDataGridVirtualBodyContainer
 Inherited
onEditorKeyDown(event:KeyboardEvent):void
Handles the KeyDown on the Editor Component.
FlexDataGridContainerBase
 Inherited
onItemClickTimer(event:TimerEvent):void
FlexDataGridContainerBase
 Inherited
onMouseMove(event:MouseEvent):void
FlexDataGridContainerBase
 Inherited
onSelectAllChanged(event:Event):void
FlexDataGridContainerBase
 Inherited
placeSortIcon(event:Event):void
FlexDataGridContainerBase
 Inherited
Removes the component from its parents hierarchy, and calls destroy method, if the component is a IFlexDataGridCell object Hangs on to the component in the cache for further reuse.
FlexDataGridContainerBase
 Inherited
Iterates through all rows and calls removeComponent on each of the cells.
FlexDataGridContainerBase
  
FlexDataGridVirtualBodyContainer
 Inherited
selectAllChangedHandler(event:Event):void
FlexDataGridContainerBase
  
FlexDataGridVirtualBodyContainer
 Inherited
FlexDataGridContainerBase
 Inherited
FlexDataGridContainerBase
 Inherited
storeSort(item:Object, column:FlexDataGridColumn, ascending:Boolean):void
FlexDataGridContainerBase
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
FlexDataGridContainerBase
Events
 Event Summary Defined By
 InheritedDispatched when the columns at any level are resized.FlexDataGridContainerBase
 InheritedDispatched when the header cells are clickedFlexDataGridContainerBase
Property Detail
_openItemVerticalPositionsproperty
public var _openItemVerticalPositions:Array

Todo - make private

loadedViewPortproperty 
protected var loadedViewPort:Rectangle

The current viewport rectange

virtualScrollDelayproperty 
virtualScrollDelay:uint

Delay in milliseconds before "virtualScroll" event is dispatched.


Implementation
    public function get virtualScrollDelay():uint
    public function set virtualScrollDelay(value:uint):void
virtualScrollTimerproperty 
protected var virtualScrollTimer:Timer

The timer that launches the actual scroll so we do not fire server calls as the user is scrolling.

Constructor Detail
FlexDataGridVirtualBodyContainer()Constructor
public function FlexDataGridVirtualBodyContainer(grid:FlexDataGrid)



Parameters
grid:FlexDataGrid
Method Detail
addOpenItem()method
override public function addOpenItem(item:Object, rowPositionInfo:RowPositionInfo = null):void

Parameters

item:Object
 
rowPositionInfo:RowPositionInfo (default = null)

addRecord()method 
protected function addRecord(recordsOnPage:Array, vsp:Number):Number

Parameters

recordsOnPage:Array
 
vsp:Number

Returns
Number
calculateTotalHeight()method 
override public function calculateTotalHeight(flat:Object = null, level:FlexDataGridColumnLevel = null, heightSoFar:Number = 0, nestLevel:int = 0, expanding:RowPositionInfo = null, addedRows:Array = null, parentObject:Object = null, isRecusirve:Boolean = false):int

Parameters

flat:Object (default = null)
 
level:FlexDataGridColumnLevel (default = null)
 
heightSoFar:Number (default = 0)
 
nestLevel:int (default = 0)
 
expanding:RowPositionInfo (default = null)
 
addedRows:Array (default = null)
 
parentObject:Object (default = null)
 
isRecusirve:Boolean (default = false)

Returns
int
clearAllCollections()method 
override public function clearAllCollections():void

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

dispatchScroll()method 
protected function dispatchScroll(vsp:Number, recordsOnPage:Array = null):void

Parameters

vsp:Number
 
recordsOnPage:Array (default = null)

doScroll()method 
public function doScroll():void

findRowPositionInfo()method 
protected function findRowPositionInfo(item:Object):RowPositionInfo

Parameters

item:Object

Returns
RowPositionInfo
getAnchorArea()method 
protected function getAnchorArea(openArea:VirtualScrollLoadInfo, vsp:Number, level:FlexDataGridColumnLevel):VirtualScrollLoadInfo

Parameters

openArea:VirtualScrollLoadInfo
 
vsp:Number
 
level:FlexDataGridColumnLevel

Returns
VirtualScrollLoadInfo
getChromeHeight()method 
protected function getChromeHeight(nextLvl:FlexDataGridColumnLevel):Number

Parameters

nextLvl:FlexDataGridColumnLevel

Returns
Number
getFirstVisibleRow()method 
protected function getFirstVisibleRow():RowInfo

Returns
RowInfo
getLastVisibleRow()method 
protected function getLastVisibleRow():RowInfo

Returns
RowInfo
getOpenVirtualScrollInfo()method 
protected function getOpenVirtualScrollInfo(vsp:Number, levelNestDepth:Number = -1):VirtualScrollLoadInfo

Parameters

vsp:Number
 
levelNestDepth:Number (default = -1)

Returns
VirtualScrollLoadInfo
getParentOpenItem()method 
public function getParentOpenItem(verticalPosition:Number, myNestDepth:int):VirtualScrollLoadInfo

Parameters

verticalPosition:Number
 
myNestDepth:int

Returns
VirtualScrollLoadInfo
getParentOpenItemFromObject()method 
public function getParentOpenItemFromObject(item:Object):Object

Parameters

item:Object

Returns
Object
getTopLevelRecordIndex()method 
public function getTopLevelRecordIndex(vsp:Number):Number

Parameters

vsp:Number

Returns
Number
getVpFromRecordIndex()method 
protected function getVpFromRecordIndex(vsp:Number, recordIndex:Number, expandingLevel:FlexDataGridColumnLevel):Number

Parameters

vsp:Number
 
recordIndex:Number
 
expandingLevel:FlexDataGridColumnLevel

Returns
Number
gotoVerticalPosition()method 
override public function gotoVerticalPosition(vsp:Number):void

Parameters

vsp:Number

handleArrowKey()method 
override public function handleArrowKey(cell:IFlexDataGridCell, keyCode:uint, triggerEvent:Event):Boolean

Parameters

cell:IFlexDataGridCell
 
keyCode:uint
 
triggerEvent:Event

Returns
Boolean
onChildHeaderClicked()method 
override protected function onChildHeaderClicked(headerCell:FlexDataGridHeaderCell):void

Parameters

headerCell:FlexDataGridHeaderCell

removeOpenItem()method 
override public function removeOpenItem(item:Object, rowPositionInfo:RowPositionInfo = null):void

Parameters

item:Object
 
rowPositionInfo:RowPositionInfo (default = null)

removeOpenItemVerticalPosition()method 
protected function removeOpenItemVerticalPosition(toRemove:VirtualScrollLoadInfo, vPos:Number):void

Parameters

toRemove:VirtualScrollLoadInfo
 
vPos:Number

setCurrentRowAtScrollPosition()method 
override public function setCurrentRowAtScrollPosition(vsp:Number):Boolean

Parameters

vsp:Number

Returns
Boolean
setVirtualScrollData()method 
public function setVirtualScrollData(arr:Array):void

Parameters

arr:Array

setVirtualScrollProperties()method 
protected function setVirtualScrollProperties():void