Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
mx.charts.chartClasses 

InstanceCache  - AS3 Flex

Paquetemx.charts.chartClasses
Clasepublic class InstanceCache
HerenciaInstanceCache Inheritance Object

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

InstanceCache is a utility that governs the task of creating and managing a set of n object instances, where n changes frequently.



Propiedades públicas
 PropiedadDefinido por
 Inheritedconstructor : Object
Una referencia a la clase de objeto o función constructora para una instancia de objeto determinada.
Object
  count : int
The number of items currently required in the cache.
InstanceCache
  creationCallback : Function
A callback invoked when new instances are created.
InstanceCache
  discard : Boolean = false
Determines if unneeded instances are discarded.
InstanceCache
  factory : IFactory
A factory that generates the type of object to cache.
InstanceCache
  format : flash.text:TextFormat
A TextFormat to apply to any instances created.
InstanceCache
  hide : Boolean = true
Determines if unneeded instances should be hidden.
InstanceCache
  insertPosition : int
[solo escritura] The position of the instance in the parent's child list.
InstanceCache
  instances : Array
[solo lectura] The Array of cached instances.
InstanceCache
  properties : Object
A hashmap of properties to assign to new instances.
InstanceCache
  remove : Boolean = false
Determines if unneeded instances should be removed from their parent.
InstanceCache
Métodos públicos
 MétodoDefinido por
  
InstanceCache(type:Object, parent:Object = null, insertPosition:int = -1, moduleFactory:IFlexModuleFactory = null)
Constructor.
InstanceCache
 Inherited
Indica si un objeto tiene definida una propiedad especificada.
Object
 Inherited
Indica si hay una instancia de la clase Object en la cadena de prototipo del objeto especificado como parámetro.
Object
 Inherited
Indica si existe la propiedad especificada y si es enumerable.
Object
 Inherited
Establece la disponibilidad de una propiedad dinámica para operaciones de bucle.
Object
 Inherited
Devuelve la representación de cadena de este objeto, con formato según las convenciones específicas de configuración regional.
Object
 Inherited
Devuelve la representación de cadena del objeto especificado.
Object
 Inherited
Devuelve el valor simple del objeto especificado.
Object
Información sobre propiedades

count

propiedad
count:int

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

The number of items currently required in the cache.



Implementación
    public function get count():int
    public function set count(value:int):void

creationCallback

propiedad 
public var creationCallback:Function

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

A callback invoked when new instances are created. This callback has the following signature:

      function creationCallback(newInstance:Object, cache:InstanceCache):void;
      

discard

propiedad 
public var discard:Boolean = false

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Determines if unneeded instances are discarded. If set to true, extra elements are discarded when the cache count is reduced. Otherwise, extra elements are kept in a separate cache and reused when the count is increased.

factory

propiedad 
factory:IFactory

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

A factory that generates the type of object to cache. Assigning to this discards all current instances and recreate new instances of the correct type.



Implementación
    public function get factory():IFactory
    public function set factory(value:IFactory):void

format

propiedad 
format:flash.text:TextFormat

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

A TextFormat to apply to any instances created. If set, this format is applied as the current and default format for the contents of any instances created. This property is only relevant if the factory generates TextField instances.



Implementación
    public function get format():flash.text:TextFormat
    public function set format(value:flash.text:TextFormat):void

hide

propiedad 
public var hide:Boolean = true

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Determines if unneeded instances should be hidden. If true, the visible property is set to false on each extra element when the cache count is reduced, and set to true when the count is increased.

This property is only relevant when the factory generates DisplayObjects. Setting this property to true for other factory types generates a run-time error.

insertPosition

propiedad 
insertPosition:int  [solo escritura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

The position of the instance in the parent's child list.



Implementación
    public function set insertPosition(value:int):void

instances

propiedad 
instances:Array  [solo lectura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

The Array of cached instances. There may be more instances in this Array than currently requested. You should rely on the count property of the instance cache rather than the length of this Array.



Implementación
    public function get instances():Array

properties

propiedad 
properties:Object

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

A hashmap of properties to assign to new instances. Each key/value pair in this hashmap is assigned to each new instance created. The property hashmap is assigned to any existing instances when set.

The values in the hashmap are not cloned; object values are shared by all instances.



Implementación
    public function get properties():Object
    public function set properties(value:Object):void

remove

propiedad 
public var remove:Boolean = false

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Determines if unneeded instances should be removed from their parent. If true, the removeChild() method is called on the parent for each extra element when the cache count is reduced.

This property is only relevant when the factory generates DisplayObjects. Setting this property to true for other factory types generates a run-time error.

Información sobre constructores

InstanceCache

()Información sobre
public function InstanceCache(type:Object, parent:Object = null, insertPosition:int = -1, moduleFactory:IFlexModuleFactory = null)

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Constructor.

Parámetros
type:Object — The type of object to construct. This can be either a Class or an IFactory.
 
parent:Object (default = null) — An optional DisplayObject to add new instances to.
 
insertPosition:int (default = -1) — Where in the parent's child list to insert instances. Set to -1 to add the children to the end of the child list.
 
moduleFactory:IFlexModuleFactory (default = null) — The context for using embedded fonts and for finding the style manager that controls the styles for this component.




[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.