//////////////////////////////////////////////////////////////////////////////// // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// package mx.core { /** * The IRepeater interface defines the * public APIs of the Repeater object. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public interface IRepeater { //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- //---------------------------------- // container //---------------------------------- /** * The container that contains this Repeater, * and in which it will create its children. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ function get container():IContainer; //---------------------------------- // count //---------------------------------- /** * The number of times this Repeater should execute. * *
If the Repeater reaches the end of the data provider while * executing, the number of times it actually executes will be less * that the requested count.
* * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ function get count():int; /** * @private */ function set count(value:int):void; //---------------------------------- // currentIndex //---------------------------------- /** * The index of the item in thedataProvider
currently
* being processed while this Repeater is executing.
*
* After the Repeater has finished executing,
* this property is -1
.
* However, the repeaterIndex
property of a repeated
* component instance remembers the index of the
* dataProvider
item from which it was created.
* In the case of nested Repeaters, you can use the
* repeaterIndices
array.
dataProvider
currently being processed
* while this Repeater is executing.
*
* After the Repeater has finished executing,
* this property is null
.
* However, in this case you can call the getRepeaterItem()
* method of the repeated component instance to get the
* dataProvider
item from which it was created.
If you read the dataProvider
property, you always get
* an ICollectionView object or null
.
* If you set the dataProvider
property to anything other than
* null
, it is converted into an ICollectionView object,
* according the following rules:
You must specify a value for the dataProvider
property
* or the Repeater component will not execute.
If true
, when this Repeater's
* dataProvider
, startingIndex
,
* or count
changes, it will recycle the existing
* children by binding the new data into them.
* If more children are required, they are created and added.
* If fewer children are required, the extra ones are removed
* and garbage collected.
If false
, when this Repeater's
* dataProvider
, startingIndex
,
* or count
changes, it will remove any previous
* children that it created and then create and
* add new children from the new data items.
This property is false
by default.
* Setting it to true
can increase performance,
* but is not appropriate in all situations.
* For example, if the previously created children have state
* information such as text typed in by a user, then this
* state will not get reset when the children are recycled.
dataProvider
at which this Repeater
* starts creating children.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function get startingIndex():int;
/**
* @private
*/
function set startingIndex(value:int):void;
//--------------------------------------------------------------------------
//
// Methods
//
//--------------------------------------------------------------------------
/**
* Initializes a new Repeater object.
*
* This method is called by the Flex framework. * Developers should not need to call it.
* * @param container The Container that contains this Repeater, * and in which this Repeater will create its children. * * @param recurse A Boolean flag indicating whether this Repeater * should create all descendants of its children. * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ function initializeRepeater(container:IContainer, recurse:Boolean):void; /** * Executes the bindings into all the UIComponents created * by this Repeater. * *This method is called by the Flex framework. * Developers should not need to call it.
* * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ function executeChildBindings():void; } }