Package | com.flexicious.nestedtreedatagrid.interfaces |
Interface | public interface IFlexDataGridCell extends flash.events.IEventDispatcher, mx.core.IUIComponent |
Implementors | FlexDataGridCell |
Property | Defined 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 |
Method | Defined 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 | |||
getRolloverColor():* | IFlexDataGridCell | ||
Returns the value of the textRollOverColor style property. | IFlexDataGridCell | ||
getStyle(styleProp:String):* | IFlexDataGridCell | ||
getStyleValue(styleProp:String):* | IFlexDataGridCell | ||
getTextColors():* | IFlexDataGridCell | ||
hasHorizontalGridLines():Boolean
Returns true if the style property for horizontalGridLines is defined for the type of the row. | IFlexDataGridCell | ||
hasVerticalGridLines():Boolean
Returns true if the style property for verticalGridLines is defined for the type of the row. | IFlexDataGridCell | ||
invalidateBackground():void
Marks the cell so that the background and borders are drawn in the next validation cycle. | IFlexDataGridCell | ||
invalidateDisplayList():void
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 | ||
refreshCell():void
This method is responsible for preparing the cell for display. | IFlexDataGridCell | ||
setStyle(styleProp:String, value:*):void | IFlexDataGridCell |
automationName | property |
automationName:String
To provide a friendly name for automation.
public function get automationName():String
public function set automationName(value:String):void
backgroundDirty | property |
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.
public function get backgroundDirty():Boolean
public function set backgroundDirty(value:Boolean):void
column | property |
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.
public function get column():FlexDataGridColumn
public function set column(value:FlexDataGridColumn):void
componentInfo | property |
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.
public function get componentInfo():ComponentInfo
public function set componentInfo(value:ComponentInfo):void
currentBackgroundColors | property |
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.
public function get currentBackgroundColors():*
public function set currentBackgroundColors(value:any):void
currentTextColors | property |
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.
public function get currentTextColors():*
public function set currentTextColors(value:any):void
destroyed | property |
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.
public function get destroyed():Boolean
public function set destroyed(value:Boolean):void
drawTopBorder | property |
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.
public function get drawTopBorder():Boolean
graphics | property |
graphics:Graphics
[read-only] The graphics object associated with the given sprite.
public function get graphics():Graphics
horizontalGridLineColor | property |
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:
public function get horizontalGridLineColor():*
horizontalGridLineThickness | property |
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:
public function get horizontalGridLineThickness():*
iExpandCollapseComponent | property |
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
public function get iExpandCollapseComponent():IExpandCollapseComponent
See also
isChromeCell | property |
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.
public function get isChromeCell():Boolean
isContentArea | property |
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.
public function get isContentArea():Boolean
isDataCell | property |
isDataCell:Boolean
[read-only] Returns true if the rowInfo object associated with this cell is of type RowPositionInfo.ROW_TYPE_DATA.
public function get isDataCell():Boolean
isElastic | property |
isElastic:Boolean
[read-only] Returns true if this cell is not right locked or not fixed width.
public function get isElastic():Boolean
isExpandCollapseCell | property |
isExpandCollapseCell:Boolean
[read-only] Calcualted property that returns if this cell is a expand collapse cell.
public function get isExpandCollapseCell():Boolean
isLeftLocked | property |
isLeftLocked:Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="left"
public function get isLeftLocked():Boolean
isLocked | property |
isLocked:Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="left" or columnLockMode="right"
public function get isLocked():Boolean
isNewlyCreated | property |
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.
public function get isNewlyCreated():Boolean
isRightLocked | property |
isRightLocked:Boolean
[read-only] Returns true if the column associated with this cell has columnLockMode="right"
public function get isRightLocked():Boolean
level | property |
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.
public function get level():FlexDataGridColumnLevel
public function set level(value:FlexDataGridColumnLevel):void
nestDepth | property |
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;
public function get nestDepth():Number
perceivedX | property |
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.
public function get perceivedX():Number
renderer | property |
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.
public function get renderer():DisplayObject
rendererFactory | property |
rendererFactory:IFactory
The factory class used for initializing the cell. This is arrived at by calling the deriveRenderer method of the associated column.
public function get rendererFactory():IFactory
public function set rendererFactory(value:IFactory):void
See also
rowInfo | property |
rowInfo:RowInfo
The rowInfo object associated with this cell. This cell should be within the cells collection of this rowInfo object.
public function get rowInfo():RowInfo
public function set rowInfo(value:RowInfo):void
text | property |
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.
public function get text():String
public function set text(value:String):void
verticalGridLineColor | property |
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:
public function get verticalGridLineColor():*
verticalGridLineThickness | property |
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:
public function get verticalGridLineThickness():*
wordWrap | property |
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.
public function get wordWrap():Boolean
public function set wordWrap(value:Boolean):void
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 |
* |
getStyleValue | () | method |
public function getStyleValue(styleProp:String):*
Parameters
styleProp:String |
* |
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:
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:
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:
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
|
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:
setStyle | () | method |
public function setStyle(styleProp:String, value:*):void
Parameters
styleProp:String | |
value:* |