Packagemx.controls.dataGridClasses
Classpublic class DataGridItemRenderer
InheritanceDataGridItemRenderer Inheritance UITextField Inheritance FlexTextField Inheritance flash.text.TextField
Implements IDataRenderer, IDropInListItemRenderer, ILayoutManagerClient, IListItemRenderer, IStyleClient

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

The DataGridItemRenderer class defines the default item renderer for a DataGrid control. By default, the item renderer draws the text associated with each item in the grid.

You can override the default item renderer by creating a custom item renderer.

See also

mx.controls.DataGrid
mx.core.IDataRenderer
mx.controls.listClasses.IDropInListItemRenderer


Public Properties
 PropertyDefined By
 InheritedautomationDelegate : Object
The delegate object which is handling the automation related functionality.
UITextField
 InheritedautomationEnabled : Boolean
[read-only] True if this component is enabled for automation, false otherwise.
UITextField
 InheritedautomationName : String
Name that can be used as an identifier for this object.
UITextField
 InheritedautomationOwner : DisplayObjectContainer
[read-only] The owner of this component for automation purposes.
UITextField
 InheritedautomationParent : DisplayObjectContainer
[read-only] The parent of this component for automation purposes.
UITextField
 InheritedautomationValue : Array
[read-only] This value generally corresponds to the rendered appearance of the object and should be usable for correlating the identifier with the object as it appears visually within the application.
UITextField
 InheritedautomationVisible : Boolean
[read-only] True if this component is visible for automation, false otherwise.
UITextField
 InheritedbaselinePosition : Number
[read-only] The y-coordinate of the baseline of the first line of text.
UITextField
 InheritedclassName : String
[read-only] The name of this instance's class, such as "DataGridItemRenderer".
UITextField
  data : Object
The implementation of the data property as defined by the IDataRenderer interface.
DataGridItemRenderer
 Inheriteddocument : Object
A reference to the document object associated with this UITextField object.
UITextField
 Inheritedenabled : Boolean
A Boolean value that indicates whether the component is enabled.
UITextField
 InheritedenableIME : Boolean
[read-only] A flag that indicates whether the IME should be enabled when the component receives focus.
UITextField
 InheritedexplicitHeight : Number
Number that specifies the explicit height of the component, in pixels, in the component's coordinates.
UITextField
 InheritedexplicitMaxHeight : Number
[read-only] Number that specifies the maximum height of the component, in pixels, in the component's coordinates, if the maxHeight property is set.
UITextField
 InheritedexplicitMaxWidth : Number
[read-only] Number that specifies the maximum width of the component, in pixels, in the component's coordinates, if the maxWidth property is set.
UITextField
 InheritedexplicitMinHeight : Number
[read-only] The minimum recommended height of the component to be considered by the parent during layout.
UITextField
 InheritedexplicitMinWidth : Number
[read-only] The minimum recommended width of the component to be considered by the parent during layout.
UITextField
 InheritedexplicitWidth : Number
Number that specifies the explicit width of the component, in pixels, in the component's coordinates.
UITextField
 InheritedfocusPane : Sprite
A single Sprite object that is shared among components and used as an overlay for drawing the focus indicator.
UITextField
 InheritedignorePadding : Boolean
If true, the paddingLeft and paddingRight styles will not add space around the text of the component.
UITextField
 InheritedimeMode : String
Specifies the IME (input method editor) mode.
UITextField
 InheritedincludeInLayout : Boolean
Specifies whether this component is included in the layout of the parent container.
UITextField
 InheritedinheritingStyles : Object
The beginning of this UITextField's chain of inheriting styles.
UITextField
 Inheritedinitialized : Boolean
A flag that determines if an object has been through all three phases of layout validation (provided that any were required)
UITextField
 InheritedisPopUp : Boolean
Set to true by the PopUpManager to indicate that component has been popped up.
UITextField
  listData : BaseListData
The implementation of the listData property as defined by the IDropInListItemRenderer interface.
DataGridItemRenderer
 InheritedmaxHeight : Number
[read-only] The maximum recommended height of the component to be considered by the parent during layout.
UITextField
 InheritedmaxWidth : Number
[read-only] The maximum recommended width of the component to be considered by the parent during layout.
UITextField
 InheritedmeasuredHeight : Number
[read-only] The default height of the component, in pixels.
UITextField
 InheritedmeasuredMinHeight : Number
The default minimum height of the component, in pixels.
UITextField
 InheritedmeasuredMinWidth : Number
The default minimum width of the component, in pixels.
UITextField
 InheritedmeasuredWidth : Number
[read-only] The default width of the component, in pixels.
UITextField
 InheritedminHeight : Number
[read-only] The minimum recommended height of the component to be considered by the parent during layout.
UITextField
 InheritedminWidth : Number
[read-only] The minimum recommended width of the component to be considered by the parent during layout.
UITextField
 InheritedmoduleFactory : IFlexModuleFactory
The moduleFactory that is used to create TextFields in the correct SWF context.
UITextField
 InheritednestLevel : int
Depth of this object in the containment hierarchy.
UITextField
 InheritednonInheritingStyles : Object
The beginning of this UITextField's chain of non-inheriting styles.
UITextField
 InheritednonZeroTextHeight : Number
[read-only] Unlike textHeight, this returns a non-zero value even when the text is empty.
UITextField
 Inheritedowner : DisplayObjectContainer
By default, set to the parent container of this object.
UITextField
 Inheritedparent : DisplayObjectContainer
[override] [read-only] The parent container or component for this component.
UITextField
 InheritedpercentHeight : Number
Specifies the height of a component as a percentage of its parent's size.
UITextField
 InheritedpercentWidth : Number
Specifies the width of a component as a percentage of its parent's size.
UITextField
 InheritedprocessedDescriptors : Boolean
Set to true after the createChildren() method creates any internal component children.
UITextField
  styleDeclaration : CSSStyleDeclaration
Storage for the inline inheriting styles on this object.
DataGridItemRenderer
 InheritedstyleName : Object
The class style used by this component.
UITextField
 InheritedsystemManager : ISystemManager
Returns the SystemManager object used by this component.
UITextField
 InheritedtoolTip : String
Text to display in the ToolTip.
UITextField
 InheritedtweeningProperties : Array
Array of properties that are currently being tweened on this object.
UITextField
 InheritedupdateCompletePendingFlag : Boolean
A flag that determines if an object has been through all three phases of layout validation (provided that any were required)
UITextField
Public Methods
 MethodDefined By
  
Constructor.
DataGridItemRenderer
  
clearStyle(styleProp:String):void
Deletes a style property from this component instance.
DataGridItemRenderer
  
Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.
DataGridItemRenderer
 Inherited
A convenience method for determining whether to use the explicit or measured height
UITextField
 Inherited
A convenience method for determining whether to use the explicit or measured width
UITextField
  
getStyle(styleProp:String):*
[override] Gets a style property that has been set anywhere in this component's style lookup chain.
DataGridItemRenderer
 Inherited
getTextStyles():TextFormat
Returns the TextFormat object that represents character formatting information for this UITextField object.
UITextField
 Inherited
Returns a UITextFormat object that contains formatting information for this component.
UITextField
 Inherited
initialize():void
Initializes this component.
UITextField
  
Sets up the inheritingStyles and nonInheritingStyles objects and their proto chains so that the getStyle() method can work.
DataGridItemRenderer
 Inherited
Marks a component so that its updateDisplayList() method gets called during a later screen update.
UITextField
 Inherited
Marks a component so that its commitProperties() method gets called during a later screen update.
UITextField
 Inherited
Marks a component so that its measure() method gets called during a later screen update.
UITextField
 Inherited
move(x:Number, y:Number):void
Moves the component to a specified position within its parent.
UITextField
  
notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void
Propagates style changes to the children of this component.
DataGridItemRenderer
 Inherited
owns(child:DisplayObject):Boolean
Returns true if the child is parented or owned by this object.
UITextField
 Inherited
parentChanged(p:DisplayObjectContainer):void
This function is called when a UITextField object is assigned a parent.
UITextField
  
regenerateStyleCache(recursive:Boolean):void
Sets up the internal style cache values so that the getStyle() method functions.
DataGridItemRenderer
  
registerEffects(effects:Array):void
Registers the EffectManager as one of the event listeners for each effect event.
DataGridItemRenderer
 Inherited
replayAutomatableEvent(event:Event):Boolean
Replays the specified event.
UITextField
 Inherited
setActualSize(w:Number, h:Number):void
Sizes the object.
UITextField
 Inherited
setColor(color:uint):void
Sets the font color of the text.
UITextField
 Inherited
setFocus():void
Sets the focus to this component.
UITextField
  
setStyle(styleProp:String, newValue:*):void
[override] Sets a style property on this component instance.
DataGridItemRenderer
 Inherited
setVisible(visible:Boolean, noEvent:Boolean = false):void
Sets the visible property of this UITextField object.
UITextField
 Inherited
styleChanged(styleProp:String):void
Detects changes to style properties.
UITextField
 Inherited
toString():String
[override] Returns a string indicating the location of this object within the hierarchy of DisplayObjects in the Application.
FlexTextField
 Inherited
truncateToFit(truncationIndicator:String = null):Boolean
Truncate text to make it fit horizontally in the area defined for the control, and append an ellipsis, three periods (...), to the text.
UITextField
  
If Flex calls LayoutManager.invalidateDisplayList() method on this ILayoutManagerClient, then this function is called when it's time to update the display list.
DataGridItemRenderer
 Inherited
Validate and update the properties and layout of this object and redraw it, if necessary.
UITextField
  
If Flex calls the LayoutManager.invalidateProperties() method on this ILayoutManagerClient, then this function is called when it's time to commit property values.
DataGridItemRenderer
  
validateSize(recursive:Boolean = false):void
If Flex calls the LayoutManager.invalidateSize() method on this ILayoutManagerClient, then this function is called when it's time to do measurements.
DataGridItemRenderer
Protected Methods
 MethodDefined By
  
The event handler to position the tooltip.
DataGridItemRenderer
Events
 Event Summary Defined By
  Dispatched when the data property changes.DataGridItemRenderer
Styles
 Style Description Defined By
 InheritedType: uint Format: Color CSS Inheritance: yes
Color of text in the component, including the component label.
UITextField
 InheritedType: uint Format: Color CSS Inheritance: yes
Color of text in the component if it is disabled.
UITextField
 InheritedType: String CSS Inheritance: yes
Sets the antiAliasType property of internal TextFields.

See also

flash.text.TextField
flash.text.AntiAliasType
UITextField
 InheritedType: String CSS Inheritance: yes
Name of the font to use.
UITextField
 InheritedType: String CSS Inheritance: yes
Sets the gridFitType property of internal TextFields that represent text in Flex controls.

See also

flash.text.TextField
flash.text.GridFitType
UITextField
 InheritedType: Number CSS Inheritance: yes
Sets the sharpness property of internal TextFields that represent text in Flex controls.

See also

flash.text.TextField
UITextField
 InheritedType: Number Format: Length CSS Inheritance: yes
Height of the text, in pixels.
UITextField
 InheritedType: String CSS Inheritance: yes
Determines whether the text is italic font.
UITextField
 InheritedType: Number CSS Inheritance: yes
Sets the thickness property of internal TextFields that represent text in Flex controls.

See also

flash.text.TextField
UITextField
 InheritedType: String CSS Inheritance: yes
Determines whether the text is boldface.
UITextField
 InheritedType: Boolean CSS Inheritance: yes
A Boolean value that indicates whether kerning is enabled (true) or disabled (false).
UITextField
 InheritedType: Number Format: Length CSS Inheritance: yes
Additional vertical space between lines of text.
UITextField
 InheritedType: Number CSS Inheritance: yes
The number of additional pixels to appear between each character.
UITextField
 InheritedType: String CSS Inheritance: yes
The locale of the text displayed by this component.
UITextField
 InheritedType: Number Format: Length CSS Inheritance: no
Number of pixels between the component's left border and the left edge of its content area.
UITextField
 InheritedType: Number Format: Length CSS Inheritance: no
Number of pixels between the component's right border and the right edge of its content area.
UITextField
 InheritedType: String CSS Inheritance: yes
Alignment of text within a container.
UITextField
 InheritedType: String CSS Inheritance: yes
Determines whether the text is underlined.
UITextField
 InheritedType: Class CSS Inheritance: no
The class implementing IUITextField that is used by this component to render text.
UITextField
 InheritedType: Number Format: Length CSS Inheritance: yes
Offset of first line of text from the left side of the container, in pixels.
UITextField
Property Detail
dataproperty
data:Object

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

The implementation of the data property as defined by the IDataRenderer interface. The value is ignored. Only the listData property is used.

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


Implementation
    public function get data():Object
    public function set data(value:Object):void

See also

listDataproperty 
listData:BaseListData

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

The implementation of the listData property as defined by the IDropInListItemRenderer interface. The text of the renderer is set to the label property of the listData.

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


Implementation
    public function get listData():BaseListData
    public function set listData(value:BaseListData):void

See also

styleDeclarationproperty 
styleDeclaration:CSSStyleDeclaration

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Storage for the inline inheriting styles on this object. This CSSStyleDeclaration is created the first time that setStyle() is called on this component to set an inheriting style.


Implementation
    public function get styleDeclaration():CSSStyleDeclaration
    public function set styleDeclaration(value:CSSStyleDeclaration):void
Constructor Detail
DataGridItemRenderer()Constructor
public function DataGridItemRenderer()

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Constructor.

Method Detail
clearStyle()method
public function clearStyle(styleProp:String):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Deletes a style property from this component instance.

This does not necessarily cause the getStyle() method to return undefined.

Parameters

styleProp:String — The name of the style property.

getClassStyleDeclarations()method 
public function getClassStyleDeclarations():Array

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.

For example, suppose that component MyButton extends Button. This method first looks for a MyButton selector; then, it looks for a Button type selector; finally, it looks for a UIComponent type selector.

Returns
Array — Array of CSSStyleDeclaration objects.
getStyle()method 
override public function getStyle(styleProp:String):*

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Gets a style property that has been set anywhere in this component's style lookup chain.

This same method is used to get any kind of style property, so the value returned can be a Boolean, String, Number, int, uint (for an RGB color), Class (for a skin), or any kind of object. Therefore the return type is simply specified as *.

If you are getting a particular style property, you know its type and often want to store the result in a variable of that type. No casting from * to that type is necessary.

var backgroundColor:uint = getStyle("backgroundColor");

If the style property has not been set anywhere in the style lookup chain, the value returned by getStyle() is undefined. Note that undefined is a special value that is not the same as false, "", NaN, 0, or null. No valid style value is ever undefined. You can use the method IStyleManager2.isValidStyleValue() to test whether the value was set.

Parameters

styleProp:String — Name of the style property.

Returns
* — Style value.
initProtoChain()method 
public function initProtoChain():void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Sets up the inheritingStyles and nonInheritingStyles objects and their proto chains so that the getStyle() method can work.

notifyStyleChangeInChildren()method 
public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Propagates style changes to the children of this component.

Parameters

styleProp:String — Name of the style property.
 
recursive:Boolean — Whether to propagate the style changes to the children's children.

regenerateStyleCache()method 
public function regenerateStyleCache(recursive:Boolean):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Sets up the internal style cache values so that the getStyle() method functions. If this object already has children, then reinitialize the children's style caches.

Parameters

recursive:Boolean — Regenerate the proto chains of the children.

registerEffects()method 
public function registerEffects(effects:Array):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Registers the EffectManager as one of the event listeners for each effect event.

Parameters

effects:Array — An Array of Strings of effect names.

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

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Sets a style property on this component instance.

This can override a style that was set globally.

Calling the setStyle() method can result in decreased performance. Use it only when necessary.

Parameters

styleProp:String — Name of the style property.
 
newValue:* — New value for the style.

toolTipShowHandler()method 
protected function toolTipShowHandler(event:ToolTipEvent):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

The event handler to position the tooltip.

Parameters

event:ToolTipEvent — The event object.

validateDisplayList()method 
public function validateDisplayList():void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

If Flex calls LayoutManager.invalidateDisplayList() method on this ILayoutManagerClient, then this function is called when it's time to update the display list.

validateProperties()method 
public function validateProperties():void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

If Flex calls the LayoutManager.invalidateProperties() method on this ILayoutManagerClient, then this function is called when it's time to commit property values.

validateSize()method 
public function validateSize(recursive:Boolean = false):void

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

If Flex calls the LayoutManager.invalidateSize() method on this ILayoutManagerClient, then this function is called when it's time to do measurements.

Parameters

recursive:Boolean (default = false) — If true, call this method on the object's children.

Event Detail
dataChange Event
Event Object Type: mx.events.FlexEvent
FlexEvent.type property = mx.events.FlexEvent.DATA_CHANGE

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Dispatched when the data property changes.

When you use a component as an item renderer, the data property contains the data to display. You can listen for this event and update the component when the data property changes.

The FlexEvent.DATA_CHANGE constant defines the value of the type property of the event object for a dataChange event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.