Packagemx.states
Classpublic class AddItems
InheritanceAddItems Inheritance OverrideBase Inheritance OnDemandEventDispatcher Inheritance Object
Implements IMXMLObject

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Documentation is not currently available.

Default MXML PropertyitemsFactory



Public Properties
 PropertyDefined By
  creationPolicy : String
The creation policy for the items.
AddItems
  destination : Object
The object relative to which the child is added.
AddItems
  destructionPolicy : String
The destruction policy for the items.
AddItems
  isArray : Boolean = false
Denotes whether or not the collection represented by the target property is to be treated as a single array instance instead of a collection of items (the default).
AddItems
  isStyle : Boolean = false
Denotes whether or not the collection represented by the target property is a style.
AddItems
  items : *
The items to be added.
AddItems
  itemsDescriptor : Array
The descriptor that describes the items.
AddItems
  itemsFactory : ITransientDeferredInstance
The factory that creates the items.
AddItems
  position : String = last
The position of the child in the display list, relative to the object specified by the relativeTo property.
AddItems
  propertyName : String
The name of the Array property that is being modified.
AddItems
  relativeTo : Object
The object relative to which the child is added.
AddItems
  vectorClass : Class
When the collection represented by the target property is a Vector, vectorClass is the type of the target.
AddItems
Public Methods
 MethodDefined By
  
Constructor.
AddItems
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
OnDemandEventDispatcher
  
apply(parent:UIComponent):void
[override] Applies the override.
AddItems
  
Creates the items instance from the factory.
AddItems
 Inherited
dispatchEvent(event:Event):Boolean
OnDemandEventDispatcher
  
generateMXMLArray(document:Object, data:Array, recursive:Boolean = true):Array
AddItems
  
generateMXMLVector(document:Object, data:Array, recursive:Boolean = true):*
AddItems
 Inherited
hasEventListener(type:String):Boolean
OnDemandEventDispatcher
  
initialize():void
[override] IOverride interface method; this class implements it as an empty method.
AddItems
  
initialized(document:Object, id:String):void
IMXMLObject support
AddItems
  
remove(parent:UIComponent):void
[override] Removes the override.
AddItems
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
OnDemandEventDispatcher
 Inherited
willTrigger(type:String):Boolean
OnDemandEventDispatcher
Protected Methods
 MethodDefined By
  
generateMXMLObject(document:Object, data:Array):Object
AddItems
Public Constants
 ConstantDefined By
  AFTER : String = after
[static] Documentation is not currently available.
AddItems
  BEFORE : String = before
[static] Documentation is not currently available.
AddItems
  FIRST : String = first
[static] Documentation is not currently available.
AddItems
  LAST : String = last
[static] Documentation is not currently available.
AddItems
Property Detail
creationPolicyproperty
creationPolicy:String

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The creation policy for the items. This property determines when the itemsFactory will create the instance of the items. Flex uses this property only if you specify an itemsFactory property. The following values are valid:

ValueMeaning
auto(default)Create the instance the first time it is needed.
allCreate the instance when the application started up.
noneDo not automatically create the instance. You must call the createInstance() method to create the instance.

The default value is "auto".


Implementation
    public function get creationPolicy():String
    public function set creationPolicy(value:String):void
destinationproperty 
public var destination:Object

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The object relative to which the child is added. This property is used in conjunction with the position property. This property is optional; if you omit it, Flex uses the immediate parent of the State object, that is, the component that has the states property, or <mx:states>tag that specifies the State object.

destructionPolicyproperty 
destructionPolicy:String

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The destruction policy for the items. This property determines when the itemsFactory will destroy the deferred instances it manages. By default once instantiated, all instances are cached (destruction policy of 'never'). Flex uses this property only if you specify an itemsFactory property. The following values are valid:

ValueMeaning
never(default)Once created never destroy the instance.
autoDestroy the instance when the override no longer applies.

The default value is "never".


Implementation
    public function get destructionPolicy():String
    public function set destructionPolicy(value:String):void
isArrayproperty 
public var isArray:Boolean = false

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Denotes whether or not the collection represented by the target property is to be treated as a single array instance instead of a collection of items (the default).

The default value is false.

isStyleproperty 
public var isStyle:Boolean = false

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Denotes whether or not the collection represented by the target property is a style.

The default value is false.

itemsproperty 
items:*

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The items to be added. If you set this property, the items are created at app startup. Setting this property is equivalent to setting a itemsFactory property with a creationPolicy of "all".

Do not set this property if you set the itemsFactory property.


Implementation
    public function get items():*
    public function set items(value:any):void
itemsDescriptorproperty 
itemsDescriptor:Array

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The descriptor that describes the items.

If you set this property, the items are instantiated at the time determined by the creationPolicy property.

Do not set this property if you set the items property. This propety is the AddItems class default property. Setting this property with a creationPolicy of "all" is equivalent to setting a items property.


Implementation
    public function get itemsDescriptor():Array
    public function set itemsDescriptor(value:Array):void
itemsFactoryproperty 
itemsFactory:ITransientDeferredInstance

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The factory that creates the items.

If you set this property, the items are instantiated at the time determined by the creationPolicy property.

Do not set this property if you set the items property. This propety is the AddItems class default property. Setting this property with a creationPolicy of "all" is equivalent to setting a items property.


Implementation
    public function get itemsFactory():ITransientDeferredInstance
    public function set itemsFactory(value:ITransientDeferredInstance):void
positionproperty 
public var position:String = last

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The position of the child in the display list, relative to the object specified by the relativeTo property.

The default value is AddItems.LAST.

propertyNameproperty 
public var propertyName:String

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The name of the Array property that is being modified. If the destination property is a Group or Container, this property is optional. If not defined, the items will be added as children of the Group/Container.

relativeToproperty 
public var relativeTo:Object

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

The object relative to which the child is added. This property is only used when the position property is AddItems.BEFORE or AddItems.AFTER.

vectorClassproperty 
public var vectorClass:Class

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10, AIR 1.5

When the collection represented by the target property is a Vector, vectorClass is the type of the target. It is used to initialize the target property.

Constructor Detail
AddItems()Constructor
public function AddItems()

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Constructor.

Method Detail
apply()method
override public function apply(parent:UIComponent):void

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Applies the override. Flex retains the original value, so that it can restore the value later in the remove() method.

This method is called automatically when the state is entered. It should not be called directly.

Parameters

parent:UIComponent — The parent of the state object containing this override. The override should use this as its target if an explicit target was not specified.

createInstance()method 
public function createInstance():void

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Creates the items instance from the factory. You must use this method only if you specify a targetItems property and a creationPolicy value of "none". Flex automatically calls this method if the creationPolicy property value is "auto" or "all". If you call this method multiple times, the items instance is created only on the first call.

generateMXMLArray()method 
public function generateMXMLArray(document:Object, data:Array, recursive:Boolean = true):Array

Parameters

document:Object
 
data:Array
 
recursive:Boolean (default = true)

Returns
Array
generateMXMLObject()method 
protected function generateMXMLObject(document:Object, data:Array):Object

Parameters

document:Object
 
data:Array

Returns
Object
generateMXMLVector()method 
public function generateMXMLVector(document:Object, data:Array, recursive:Boolean = true):*

Parameters

document:Object
 
data:Array
 
recursive:Boolean (default = true)

Returns
*
initialize()method 
override public function initialize():void

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

IOverride interface method; this class implements it as an empty method.

initialized()method 
public function initialized(document:Object, id:String):void

IMXMLObject support

Parameters

document:Object
 
id:String

remove()method 
override public function remove(parent:UIComponent):void

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Removes the override. The value remembered in the apply() method is restored.

This method is called automatically when the state is entered. It should not be called directly.

Parameters

parent:UIComponent — The parent of the state object containing this override. The override should use this as its target if an explicit target was not specified.

Constant Detail
AFTERConstant
public static const AFTER:String = after

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Documentation is not currently available.

BEFOREConstant 
public static const BEFORE:String = before

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Documentation is not currently available.

FIRSTConstant 
public static const FIRST:String = first

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Documentation is not currently available.

LASTConstant 
public static const LAST:String = last

Language Version : ActionScript 3.0
Product Version : Flex 4
Runtime Versions : Flash Player 10, AIR 1.5

Documentation is not currently available.