Packagecom.yworks.util
Classpublic class BitmapCache
InheritanceBitmapCache Inheritance Object

A global cache for bitmap data.

The cache uses weak references for the keys.



Public Methods
 MethodDefined By
  
[static] Returns an iterator over all registered keys.
BitmapCache
  
lookup(key:String):Object
[static] Returns the BitmapData or ImageLoader that was stored for the given key.
BitmapCache
  
map(key:String, data:BitmapData):void
[static] Store the given data for the given key.
BitmapCache
  
unMap(key:String):void
[static] Removes the data cached for the given key.
BitmapCache
Method Detail
getRegisteredKeys()method
public static function getRegisteredKeys():Iterator

Returns an iterator over all registered keys.

Returns
Iterator
lookup()method 
public static function lookup(key:String):Object

Returns the BitmapData or ImageLoader that was stored for the given key. Returns null if the key does not exist.

Parameters

key:String — The key to get the data for.

Returns
Object — The BitmapData or ImageLoader that was stored for the given key or null.
map()method 
public static function map(key:String, data:BitmapData):void

Store the given data for the given key.

Parameters

key:String — The key to store the data for
 
data:BitmapData — The data to be cached for the given key.

unMap()method 
public static function unMap(key:String):void

Removes the data cached for the given key.

Parameters

key:String — key to remove.