Packageorg.apache.flex.core
Classpublic class ItemRendererClassFactory
InheritanceItemRendererClassFactory Inheritance Strand Inheritance EventDispatcher Inheritance flash.events.EventDispatcher
Implements IItemRendererClassFactory, IDocument, IBead

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The ItemRendererClassFactory class is the default implementation of IItemRendererClassFactory. This implementation checks for an itemRenderer property on the strand, then looks for a default definition in CSS, but also handles the renderer being defined in MXML in sub tags of the ItemRendererClassFactory. Other more advanced implementations could return different renderers based on the data item's type.

Default MXML PropertymxmlContent



Public Properties
 PropertyDefined By
 Inheritedbeads : Array
Strand
  createFunction : Function
This is the method that actually does the work for createItemRenderer.
ItemRendererClassFactory
 Inheritedid : String
An id property for MXML documents.
Strand
  itemRendererFactory : IFactory
Stores the IFactory that will be used to generate item renderer instances if createFromClass is the createFunction.
ItemRendererClassFactory
 Inheritedmodel : IBeadModel
An IBeadModel that serves as the data model for the component.
Strand
  mxmlContent : Array
The default property.
ItemRendererClassFactory
  MXMLDescriptor : Array
[read-only] An array of data that describes the MXML attributes and tags in an MXML document.
ItemRendererClassFactory
  strand : IStrand
[write-only] The host component for this bead.
ItemRendererClassFactory
Public Methods
 MethodDefined By
  
Constructor.
ItemRendererClassFactory
 Inherited
addBead(bead:IBead):void
Add a bead to the strand.
Strand
  
Creates an instance of an item renderer from itemRendererFactory.
ItemRendererClassFactory
  
This method is called to generate another instance of an item renderer and attach it to the given parent.
ItemRendererClassFactory
 Inherited
getBeadByType(classOrInterface:Class):IBead
Find a bead on the strand.
Strand
 Inherited
Remove a bead from the strand.
Strand
  
setDocument(document:Object, id:String = null):void
This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any.
ItemRendererClassFactory
Protected Methods
 MethodDefined By
  
Creates an instance of an item renderer from child MXML tags.
ItemRendererClassFactory
Property Detail
createFunctionproperty
public var createFunction:Function

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

This is the method that actually does the work for createItemRenderer. It defaults to creating an instance from child MXML tags, but if the strand has an item renderer property or style, it switches to generating instances of the item renderer specified by that property or style. And yes, since it is public, you could theoretically assign some other method that generates item renderer instances.

itemRendererFactoryproperty 
public var itemRendererFactory:IFactory

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Stores the IFactory that will be used to generate item renderer instances if createFromClass is the createFunction.

mxmlContentproperty 
public var mxmlContent:Array

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The default property. Child tags in MXML documents get assigned to this property, but are actually encoded by the compiler into the MXMLDescriptor array. Therefore, setting this property from ActionScript will have no effect at runtime.

MXMLDescriptorproperty 
MXMLDescriptor:Array  [read-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

An array of data that describes the MXML attributes and tags in an MXML document. This data is usually decoded by an MXMLDataInterpreter


Implementation
    public function get MXMLDescriptor():Array
strandproperty 
strand:IStrand  [write-only]

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The host component for this bead.


Implementation
    public function set strand(value:IStrand):void
Constructor Detail
ItemRendererClassFactory()Constructor
public function ItemRendererClassFactory()

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Constructor.

Method Detail
createFromClass()method
public function createFromClass(parent:IItemRendererParent):IItemRenderer

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Creates an instance of an item renderer from itemRendererFactory.

Parameters

parent:IItemRendererParent

Returns
IItemRenderer
createFromMXMLContent()method 
protected function createFromMXMLContent(parent:IItemRendererParent):IItemRenderer

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Creates an instance of an item renderer from child MXML tags.

Parameters

parent:IItemRendererParent

Returns
IItemRenderer
createItemRenderer()method 
public function createItemRenderer(parent:IItemRendererParent):IItemRenderer

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

This method is called to generate another instance of an item renderer and attach it to the given parent.

Parameters

parent:IItemRendererParent — The parent of the item renderer.

Returns
IItemRenderer — The item renderer.
setDocument()method 
public function setDocument(document:Object, id:String = null):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

This method is called to notify an instance of what MXML document it belongs to, if any, and what its assigned id is in that document, if any.

Parameters

document:Object — The MXML document that hosts this component.
 
id:String (default = null) — The optional id of the component in the document.