套件 | mx.charts.chartClasses |
類別 | public class InstanceCache |
繼承 | InstanceCache Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | 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 [唯寫]
The position of the instance in the parent's child list. | InstanceCache | ||
instances : Array [唯讀]
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 |
方法 | 定義自 | ||
---|---|---|---|
InstanceCache(type:Object, parent:Object = null, insertPosition:int = -1, moduleFactory:IFlexModuleFactory = null)
Constructor. | InstanceCache | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
count | 屬性 |
creationCallback | 屬性 |
public var creationCallback:Function
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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 | 屬性 |
public var discard:Boolean = false
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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 | 屬性 |
factory:IFactory
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get factory():IFactory
public function set factory(value:IFactory):void
format | 屬性 |
format:flash.text:TextFormat
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get format():flash.text:TextFormat
public function set format(value:flash.text:TextFormat):void
hide | 屬性 |
public var hide:Boolean = true
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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 | 屬性 |
instances | 屬性 |
instances:Array
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get instances():Array
properties | 屬性 |
properties:Object
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
實作
public function get properties():Object
public function set properties(value:Object):void
remove | 屬性 |
public var remove:Boolean = false
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | 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.
InstanceCache | () | 建構函式 |
public function InstanceCache(type:Object, parent:Object = null, insertPosition:int = -1, moduleFactory:IFlexModuleFactory = null)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
參數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.
|
Tue Jun 12 2018, 03:47 PM Z