Package | com.flexicious.nestedtreedatagrid |
Class | public class FlexDataGridBodyContainer |
Inheritance | FlexDataGridBodyContainer ![]() ![]() |
Subclasses | FlexDataGridVirtualBodyContainer |
Property | Defined By | ||
---|---|---|---|
![]() | columnDraggingDragCell : FlexDataGridCell
When a column is being dragged and dropped into a different location, this variable
holds the cell that is being dragged. | FlexDataGridContainerBase | |
![]() | columnResizingCell : FlexDataGridHeaderCell
When a column is being resized, this variable
holds the cell that initiated the resize operation. | FlexDataGridContainerBase | |
![]() | enableHorizontalRecycling : Boolean = true
Flag to turn on horizontal scroll recycle. | FlexDataGridContainerBase | |
![]() | grid : FlexDataGrid
The grid that we belong to
| FlexDataGridContainerBase | |
![]() | inEdit : Boolean [read-only]
Returns true if grid is in edit mode
| FlexDataGridContainerBase | |
![]() | itemClickTimerDuration : Number = 250
Duration, in milliseconds to wait until dispatching a new ITEM_CLICK event. | FlexDataGridContainerBase | |
![]() | itemVerticalPositions : Array [read-only]
Row positions
| FlexDataGridContainerBase | |
loadedItems : 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 | ||
onScreenRows : Array [read-only]
Returns the number of rows currently visible. | FlexDataGridBodyContainer | ||
openItems : ArrayCollection
A list of items that the user has opened. | FlexDataGridBodyContainer | ||
![]() | rows : ArrayCollection
Collection of RowInfo objects currently being displayed. | FlexDataGridContainerBase | |
validNextPage : Boolean [read-only]
Returns true if there is another page of data. | FlexDataGridBodyContainer | ||
variableRowHeightRenderers : KeyValuePairCollection
Active only when the body containers calculateRowHeight method is running. | FlexDataGridBodyContainer |
Method | Defined By | ||
---|---|---|---|
Constructor
| FlexDataGridBodyContainer | ||
calculateTotalHeight(flat:Object = null, level:FlexDataGridColumnLevel = null, heightSoFar:Number = 0, nestLevel:int = 0, expanding:RowPositionInfo = null, addedRows:Array = null, parentObject:Object = null, isRecursive:Boolean = false):int
Dual purpose function, one to calculate height, second to figure out that at
vertical position Y, the seed record to be shown is?. | FlexDataGridBodyContainer | ||
![]() | cancelEdit(event:Event):void
Cancels the current running edit. | FlexDataGridContainerBase | |
Clears out the variable row height renderers
| FlexDataGridBodyContainer | ||
![]() | emulateClick(cell:IFlexDataGridCell):void
Used by accesibility
| FlexDataGridContainerBase | |
![]() | endEdit(editor:UIComponent, event:Event = null):void
Dispatches ITEM_EDIT_END. | FlexDataGridContainerBase | |
![]() | filterPageSort(flat:Object, level:FlexDataGridColumnLevel, parentObj:Object, applyFilter:Boolean = true, applyPaging:Boolean = true, applySort:Boolean = true, pages:Array = null, updatePager:Boolean = false):Object | FlexDataGridContainerBase | |
![]() | findLoadingInfo(item:Object, level:FlexDataGridColumnLevel, useSelectedKeyField:Boolean = false):ItemLoadInfo
In lazy loaded grids, gets the loaded info of the provided object. | FlexDataGridContainerBase | |
![]() | 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 | |
![]() | 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 | |
![]() | getChildAtId(arr:Array, id:uint):IFlexDataGridCell
Used by accesibility
| FlexDataGridContainerBase | |
![]() | getChildId(arr:Array, cell:IFlexDataGridCell):uint
Used by accesibility
| FlexDataGridContainerBase | |
![]() | getChildIds(arr:Array):void
Used by accesibility
| FlexDataGridContainerBase | |
![]() |
The IFlexDataGridCell under edit currently. | FlexDataGridContainerBase | |
![]() | getCurrentEditor():UIComponent
The editor being used as the current component to edit. | FlexDataGridContainerBase | |
![]() |
Gets the first cell of the first column. | FlexDataGridContainerBase | |
![]() | getFirstHoverableCell(row:RowInfo, dataOnly:Boolean = false, editableOnly:Boolean = false):IFlexDataGridCell | FlexDataGridContainerBase | |
getItemAtPosition(position:Number):RowPositionInfo
Returns the RowPosition Info object for the item at the given vertical scroll position
| FlexDataGridBodyContainer | ||
getItemVerticalPositions():Array
ets a copy of the calculated item vertical positions
| FlexDataGridBodyContainer | ||
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 | ||
![]() | getSelectedIds(bodyStart:uint):Array
Used by accesibility
| FlexDataGridContainerBase | |
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 | ||
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
Goes to the vertical position specified by the parameter. | FlexDataGridBodyContainer | ||
![]() | handleArrowKey(cell:IFlexDataGridCell, keyCode:uint, triggerEvent:Event):Boolean
Handles cell key up. | FlexDataGridContainerBase | |
![]() | handleCellKeyUp(cell:IFlexDataGridCell, keyCode:uint, triggerEvent:Event):void
Handles cell key up. | FlexDataGridContainerBase | |
![]() | handleEditorKeyEvent(event:KeyboardEvent, cell:IFlexDataGridCell):void | FlexDataGridContainerBase | |
![]() | initializeEditor(editCell:IFlexDataGridDataCell, editor:UIComponent, pare:UIComponent):void | FlexDataGridContainerBase | |
![]() | initializeFilterRenderer(filterRenderer:IFilterControl, filterColumn:FlexDataGridColumn, item:Object, flatDp:Object, level:FlexDataGridColumnLevel):void
Given a filter control, initializes it from the provided column
| FlexDataGridContainerBase | |
![]() | invalidateCells():void
Calls invalidateBackground() on each of the cells. | FlexDataGridContainerBase | |
![]() | invalidateDisplayList():void [override] | FlexDataGridContainerBase | |
![]() | isCoveredByColSpan(cell:IFlexDataGridCell):Boolean
Given a cell, returns true if the cell is "hidden" by another cell that has a col span which will cover this cell. | FlexDataGridContainerBase | |
![]() | isCoveredByRowSpan(cell:IFlexDataGridCell):Boolean
Given a cell, returns true if the cell is "hidden" by another cell that has a row span which will cover this cell. | FlexDataGridContainerBase | |
![]() | isHoverableCell(cell:IFlexDataGridCell):Boolean
Can this cell accept hover. | FlexDataGridContainerBase | |
isOutOfVisibleArea(row:RowInfo):Boolean [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 | ||
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 | ||
nextPage():void
Goes to the next page of data. | FlexDataGridBodyContainer | ||
![]() | onHeaderCellClicked(cell:FlexDataGridHeaderCell, triggerEvent:Event, isMsc:Boolean = false, useMsc:Boolean = true, direction:String = null):void | FlexDataGridContainerBase | |
![]() | populateValue(event:Event, itemEditor:UIComponent = null):Boolean
Applies the value from the editor back to the model object. | FlexDataGridContainerBase | |
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 | ||
![]() | reDraw():void
Calls removeAllComponents, createComponents, validateNow, and snapToColumnWidths
| FlexDataGridContainerBase | |
![]() | refreshCells():void
Re-evaluates all the visible cell contents. | FlexDataGridContainerBase | |
![]() | refreshCheckBoxes():void | FlexDataGridContainerBase | |
![]() | removeAllComponents(recycle:Boolean):void
End the edit, if active, call removeComponent on each of the rows, and remove all the children. | FlexDataGridContainerBase | |
scrollToExistingRow(vsp:Number, scrollDown:Boolean):void [override]
Scrolls to a row that is already drawn. | FlexDataGridBodyContainer | ||
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 | ||
![]() | setCurrentCellToFirst():void
Sets the current highlight cell to the first available cell. | FlexDataGridContainerBase | |
setVisibleRange():void
Sets the records in the visible range. | FlexDataGridBodyContainer | ||
Inserts the column specified column before the specified column
| FlexDataGridBodyContainer | ||
![]() | sortByColumn(col:FlexDataGridColumn, direction:String = null):void | FlexDataGridContainerBase |
Method | Defined By | ||
---|---|---|---|
![]() |
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 | |
![]() | addPadding(nestLevel:int, row:RowInfo, paddingHeight:Number, level:FlexDataGridColumnLevel, forceRightLock:Boolean = false, scrollPad:Boolean = false, width:int = -1):FlexDataGridPaddingCell | FlexDataGridContainerBase | |
![]() | beginEdit(cell:IFlexDataGridDataCell):void
Starts the Edit Session. | FlexDataGridContainerBase | |
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 | ||
![]() | calculateColumnDraggingDropTargetCell(event:MouseEvent):void
Given the mouse event, figures out which cell is the drop target. | FlexDataGridContainerBase | |
![]() | checkRowSpanColSpan(retCell:IFlexDataGridCell, thisCell:IFlexDataGridCell, direction:String, dataOnly:Boolean, editableOnly:Boolean, scrollIfNecessary:Boolean, hoverableOnly:Boolean):IFlexDataGridCell | FlexDataGridContainerBase | |
![]() | createChildren():void [override] | FlexDataGridContainerBase | |
![]() | getAllRows():ArrayCollection
Gets the Rows Collection
| FlexDataGridContainerBase | |
![]() | getCellHeight(cell:IFlexDataGridCell):Number | FlexDataGridContainerBase | |
![]() | getCellWidth(cell:IFlexDataGridCell):Number | FlexDataGridContainerBase | |
![]() | getColSpan(cell:IFlexDataGridCell):int
Given a cell, gets the colspan associated with that cell by calling the grid.colSpanFunction. | FlexDataGridContainerBase | |
![]() | getRowsForRecycling():Object | FlexDataGridContainerBase | |
![]() | getRowsForSnapping():Object | FlexDataGridContainerBase | |
![]() | getRowSpan(cell:IFlexDataGridCell):int
Given a cell, gets the rowSpan associated with that cell by calling the grid.rowSpanFunction. | FlexDataGridContainerBase | |
![]() | handleDoubleClick(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles the Double Click. | FlexDataGridContainerBase | |
![]() | handleMouseClick(cell:IFlexDataGridCell, triggerEvent:Event, checkTimer:Boolean = true):void
Handles the Mouse click. | FlexDataGridContainerBase | |
![]() | handleMouseOut(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles mouse out. | FlexDataGridContainerBase | |
![]() | handleMouseOver(cell:IFlexDataGridCell, triggerEvent:Event):void
Handles mouse over for data cells. | FlexDataGridContainerBase | |
![]() | handleSpaceBar(cell:IFlexDataGridCell, triggerEvent:Event):void | FlexDataGridContainerBase | |
![]() | hideSpannedCells():void
Once the snapToColumnWidths finishes, the cellsWithColSpanOrRowSpan array contains all cells
that have a row or col span. | FlexDataGridContainerBase | |
![]() | isCoveredByRowSpanOrColspan(cell:IFlexDataGridCell):Boolean | FlexDataGridContainerBase | |
![]() | onCellMouseClick(event:MouseEvent):void
Handles mouse click. | FlexDataGridContainerBase | |
![]() | onCellMouseOver(event:MouseEvent):void
Handles Cell Mouse Over. | FlexDataGridContainerBase | |
![]() | onEditorKeyDown(event:KeyboardEvent):void
Handles the KeyDown on the Editor Component. | FlexDataGridContainerBase | |
![]() | onItemClickTimer(event:TimerEvent):void | FlexDataGridContainerBase | |
![]() | onMouseMove(event:MouseEvent):void | FlexDataGridContainerBase | |
![]() | onSelectAllChanged(event:Event):void | FlexDataGridContainerBase | |
![]() | placeSortIcon(event:Event):void | FlexDataGridContainerBase | |
![]() | removeComponent(comp:ComponentInfo):void
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 | |
![]() | removeComponents(row:RowInfo):void
Iterates through all rows and calls removeComponent on each of the cells. | FlexDataGridContainerBase | |
![]() | selectAllChangedHandler(event:Event):void | FlexDataGridContainerBase | |
![]() | snapRowToColumnWidth(row:RowInfo):void | FlexDataGridContainerBase | |
![]() | sortByCell(cell:FlexDataGridHeaderCell):void | FlexDataGridContainerBase | |
![]() | storeSort(item:Object, column:FlexDataGridColumn, ascending:Boolean):void | FlexDataGridContainerBase | |
![]() | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override] | FlexDataGridContainerBase |
loadedItems | property |
loadedItems: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. This event is then handled by client code, and when the data is retreieved from the server, the setChildData method is called. This method will store the results in this array collection.
public function get loadedItems():ArrayCollection
onScreenRows | property |
onScreenRows:Array
[read-only] Returns the number of rows currently visible.
public function get onScreenRows():Array
openItems | property |
openItems:ArrayCollection
A list of items that the user has opened. Only applicable grids with nested column levels.
public function get openItems():ArrayCollection
public function set openItems(value:ArrayCollection):void
validNextPage | property |
validNextPage:Boolean
[read-only] Returns true if there is another page of data.
public function get validNextPage():Boolean
variableRowHeightRenderers | property |
public var variableRowHeightRenderers:KeyValuePairCollection
Active only when the body containers calculateRowHeight method is running. This dictionary will be purged as soon as calculateRowHeight is done running.
FlexDataGridBodyContainer | () | Constructor |
public function FlexDataGridBodyContainer(grid:FlexDataGrid)
Constructor
Parametersgrid:FlexDataGrid |
binarySearch | () | method |
protected function 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.
Parameters
arr:Array | |
verticalPos:Number | |
low:int | |
high:int |
RowPositionInfo |
calculateTotalHeight | () | method |
public function calculateTotalHeight(flat:Object = null, level:FlexDataGridColumnLevel = null, heightSoFar:Number = 0, nestLevel:int = 0, expanding:RowPositionInfo = null, addedRows:Array = null, parentObject:Object = null, isRecursive:Boolean = false):int
Dual purpose function, one to calculate height, second to figure out that at vertical position Y, the seed record to be shown is?.
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 )
| |
isRecursive:Boolean (default = false )
|
int |
clearVariableRowHeightRenderes | () | method |
public function clearVariableRowHeightRenderes():void
Clears out the variable row height renderers
getItemAtPosition | () | method |
public function getItemAtPosition(position:Number):RowPositionInfo
Returns the RowPosition Info object for the item at the given vertical scroll position
Parameters
position:Number |
RowPositionInfo |
getItemVerticalPositions | () | method |
public function getItemVerticalPositions():Array
ets a copy of the calculated item vertical positions
ReturnsArray |
getObjectStack | () | method |
public function 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. The array contains a list of ItemPositionInfo objects, which contains that object itself, its index, as well as the page number it appears on, if enablePaging is set to true else -1.
Parameters
itemToFind:Object | |
stackSoFar:Array | |
useItemKeyForCompare:Boolean | |
flat:Object (default = null )
| |
level:FlexDataGridColumnLevel (default = null )
|
Boolean |
gotoItem | () | method |
public function 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. Flexicious by default will only build RowPositionInfo objects for open items that the user can visually scroll to. So items that are closed, or are on a different page, will not be built, and cannot be scrolled to. If you set rebuildRowPositions to true, the function will inspect the data provider to find the item in question, and build the RowPositionInfo for it if its not found in the currently built RowPositionInfo objects.
Parameters
item:Object | |
highlight:Boolean | |
useItemKeyForCompare:Boolean | |
level:FlexDataGridColumnLevel (default = null )
| |
rebuild:Boolean (default = true )
|
Boolean |
gotoRow | () | method |
public function gotoRow(rowIndex:int):Boolean
Given a row index (less than the total number of rows, goes to the row in question). Row index becomes the first visible row. Please note this is a 1 based index.
Parameters
rowIndex:int |
Boolean |
gotoVerticalPosition | () | method |
public function gotoVerticalPosition(vsp:Number):void
Goes to the vertical position specified by the parameter. Recycles the renderers
Parameters
vsp:Number |
isOutOfVisibleArea | () | method |
override public function isOutOfVisibleArea(row:RowInfo):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.
Parameters
row:RowInfo |
Boolean |
isYOutOfVisibleArea | () | method |
public function 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.
Parameters
numY:Number | |
numH:Number |
Boolean |
nextPage | () | method |
public function nextPage():void
Goes to the next page of data.
quickFind | () | method |
public function 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.
Parameters
whatToFind:String | |
flat:Object (default = null )
| |
level:FlexDataGridColumnLevel (default = null )
| |
result:Array (default = null )
| |
searchCols:Array (default = null )
| |
breakAfterFind:Boolean (default = true )
| |
captureCols:Boolean (default = false )
|
Array |
scrollToExistingRow | () | method |
override public function scrollToExistingRow(vsp:Number, scrollDown:Boolean):void
Scrolls to a row that is already drawn.
Parameters
vsp:Number | |
scrollDown:Boolean |
selectText | () | method |
public function 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
Parameters
txt:String |
setVisibleRange | () | method |
public function setVisibleRange():void
Sets the records in the visible range.
shiftColumns | () | method |
public function shiftColumns(columnToInsert:FlexDataGridColumn, insertBefore:FlexDataGridColumn):void
Inserts the column specified column before the specified column
Parameters
columnToInsert:FlexDataGridColumn | |
insertBefore:FlexDataGridColumn |