Packagecom.adobe.portfolio.managers
Classpublic class ThumbnailManager
InheritanceThumbnailManager Inheritance flash.events.EventDispatcher

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The ThumbnailManager caches and managed thumbnail images.



Public Properties
 PropertyDefined By
  cacheThumbFitSize : Point
XXXXX
ThumbnailManager
  enableDynamicThumbnails : Boolean
A boolean indicating whether or not requests for real-time rendererd thumbnails will be honored.
ThumbnailManager
Protected Properties
 PropertyDefined By
  audioImage : Class
ThumbnailManager
  cache : OrderedDictionary
XXXXX
ThumbnailManager
  folderImage : Class
ThumbnailManager
  jobUtil : JobUtil
XXXXX
ThumbnailManager
  MAX_MEM_CACHE_SIZE : int = 50
The maximum number of items that can be cached at one time
ThumbnailManager
  pendingRequests : Dictionary
XXXXX
ThumbnailManager
  swfImage : Class
ThumbnailManager
  timeoutTimer : Timer
XXXXX
ThumbnailManager
  videoImage : Class
ThumbnailManager
Public Methods
 MethodDefined By
  
ThumbnailManager(token:Object)
Constructor
ThumbnailManager
  
getAspectRatio(object:Object, mediaValue:Boolean = false, allowNaN:Boolean = false):Number
Returns the aspect ratio for the specified object.
ThumbnailManager
  
[static] Returns the thumbnailManager instance; it creates one if is does not exist already.
ThumbnailManager
  
isThumbnailCached(attachment:IAttachment, width:Number, height:Number, pageNumber:uint):Boolean
Returns true if the
ThumbnailManager
  
requestThumbnail(id:*, attachment:IAttachment, width:Number, height:Number, pageNumber:uint, callback:Function, downSampleOK:Boolean = true, upSampleOK:Boolean = true):void
Requests a thumbnail to be generated that will fit into the specified width and height.
ThumbnailManager
  
Returns true if a dynamic thumbnail request has ever succeeded for this attachment, or false otherwise.
ThumbnailManager
Protected Methods
 MethodDefined By
  
addToPending(cacheObject:CacheObject, callback:Function, requests:Dictionary):void
XXXXX
ThumbnailManager
  
cacheThumb(callback:Function, cacheObject:CacheObject, thumbnail:Bitmap, clearPendingRequests:Boolean = true):void
XXXXX
ThumbnailManager
  
callPendingCallbacks(cacheObject:CacheObject, requests:Dictionary, clearPendingRequests:Boolean = true):void
XXXXX
ThumbnailManager
  
getCachedThumb(thumbKey:String):Bitmap
XXXXX
ThumbnailManager
  
getDownsampledThumb(c:CacheObject, downSampleOK:Boolean):Bitmap
XXXXX
ThumbnailManager
  
Returns the predefined thumbnail images for the specified attachment, such as folders, SWF files, video, and audio files.
ThumbnailManager
  
getStaticCachedThumb(callback:Function, cacheObject:CacheObject, anySizeOK:Boolean = false, clearPendingRequests:Boolean = true):Boolean
XXXXX
ThumbnailManager
  
innerSetAspectRatio(object:Object, aspectRatio:Number, currentAspectRatio:Number, mediaValue:Boolean):void
ThumbnailManager
  
isPending(cacheObject:CacheObject, requests:Dictionary):Boolean
XXXXX
ThumbnailManager
  
logEntry(prefix:String, id:*, attachment:IAttachment, width:Number, height:Number, pageNumber:uint):void
Creates a log entry for the specified attachement, using the specified prefix, id, width, height, and pageNumber
ThumbnailManager
  
logInfo(prefix:String, cacheObject:CacheObject):void
Creates a log entry using the
ThumbnailManager
  
onTimeout(e:Event):void
ThumbnailManager
  
ThumbnailManager
  
validateThumbSize(value:Number, downSampleOK:Boolean = true):Number
XXXXX
ThumbnailManager
  
wrapBitmapData(bitmapData:BitmapData):Bitmap
XXXXX
ThumbnailManager
Public Constants
 ConstantDefined By
  SMALL_THUMB_FIT_HEIGHT : int = 128
[static] XXXXX
ThumbnailManager
  SMALL_THUMB_FIT_WIDTH : int = 128
[static] XXXXX
ThumbnailManager
Protected Constants
 ConstantDefined By
  BYPASS_ACROBAT : Boolean = false
[static]
ThumbnailManager
  logger : ILogger
[static] The thumbnailManager logging instance
ThumbnailManager
Property Detail
audioImageproperty
protected var audioImage:Class

cacheproperty 
protected var cache:OrderedDictionary

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

cacheThumbFitSizeproperty 
cacheThumbFitSize:Point

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX


Implementation
    public function get cacheThumbFitSize():Point
    public function set cacheThumbFitSize(value:Point):void
enableDynamicThumbnailsproperty 
enableDynamicThumbnails:Boolean

A boolean indicating whether or not requests for real-time rendererd thumbnails will be honored.

This property can be used as the source for data binding.


Implementation
    public function get enableDynamicThumbnails():Boolean
    public function set enableDynamicThumbnails(value:Boolean):void
folderImageproperty 
protected var folderImage:Class

jobUtilproperty 
protected var jobUtil:JobUtil

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

MAX_MEM_CACHE_SIZEproperty 
protected var MAX_MEM_CACHE_SIZE:int = 50

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The maximum number of items that can be cached at one time

pendingRequestsproperty 
protected var pendingRequests:Dictionary

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

swfImageproperty 
protected var swfImage:Class

timeoutTimerproperty 
protected var timeoutTimer:Timer

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

videoImageproperty 
protected var videoImage:Class

Constructor Detail
ThumbnailManager()Constructor
public function ThumbnailManager(token:Object)

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Constructor

Parameters
token:Object
Method Detail
addToPending()method
protected function addToPending(cacheObject:CacheObject, callback:Function, requests:Dictionary):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

cacheObject:CacheObject
 
callback:Function
 
requests:Dictionary

cacheThumb()method 
protected function cacheThumb(callback:Function, cacheObject:CacheObject, thumbnail:Bitmap, clearPendingRequests:Boolean = true):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

callback:Function
 
cacheObject:CacheObject
 
thumbnail:Bitmap
 
clearPendingRequests:Boolean (default = true)

callPendingCallbacks()method 
protected function callPendingCallbacks(cacheObject:CacheObject, requests:Dictionary, clearPendingRequests:Boolean = true):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

cacheObject:CacheObject
 
requests:Dictionary
 
clearPendingRequests:Boolean (default = true)

getAspectRatio()method 
public function getAspectRatio(object:Object, mediaValue:Boolean = false, allowNaN:Boolean = false):Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the aspect ratio for the specified object. If object is null then it returns NaN if allowNaN is true, or 1 if allowNaN is false

Parameters

object:Object — the thumbnail object for which you are requesting the aspect ratio
 
mediaValue:Boolean (default = false)
 
allowNaN:Boolean (default = false) — if true then the defaultApectRatio is allowed to be NaN

Returns
Number
getCachedThumb()method 
protected function getCachedThumb(thumbKey:String):Bitmap

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

thumbKey:String

Returns
Bitmap
getDownsampledThumb()method 
protected function getDownsampledThumb(c:CacheObject, downSampleOK:Boolean):Bitmap

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

c:CacheObject
 
downSampleOK:Boolean

Returns
Bitmap
getPredefinedThumbnail()method 
protected function getPredefinedThumbnail(attachment:IAttachment):Bitmap

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the predefined thumbnail images for the specified attachment, such as folders, SWF files, video, and audio files. If the there is no predefined image for the attachment type, it returns null.

Parameters

attachment:IAttachment

Returns
Bitmap
getStaticCachedThumb()method 
protected function getStaticCachedThumb(callback:Function, cacheObject:CacheObject, anySizeOK:Boolean = false, clearPendingRequests:Boolean = true):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

callback:Function
 
cacheObject:CacheObject
 
anySizeOK:Boolean (default = false)
 
clearPendingRequests:Boolean (default = true)

Returns
Boolean
innerSetAspectRatio()method 
protected function innerSetAspectRatio(object:Object, aspectRatio:Number, currentAspectRatio:Number, mediaValue:Boolean):void

Parameters

object:Object
 
aspectRatio:Number
 
currentAspectRatio:Number
 
mediaValue:Boolean

instance()method 
public static function instance():ThumbnailManager

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the thumbnailManager instance; it creates one if is does not exist already.

Returns
ThumbnailManager
isPending()method 
protected function isPending(cacheObject:CacheObject, requests:Dictionary):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

cacheObject:CacheObject
 
requests:Dictionary

Returns
Boolean
isThumbnailCached()method 
public function isThumbnailCached(attachment:IAttachment, width:Number, height:Number, pageNumber:uint):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns true if the

Parameters

attachment:IAttachment
 
width:Number
 
height:Number
 
pageNumber:uint

Returns
Boolean
logEntry()method 
protected function logEntry(prefix:String, id:*, attachment:IAttachment, width:Number, height:Number, pageNumber:uint):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Creates a log entry for the specified attachement, using the specified prefix, id, width, height, and pageNumber

Parameters

prefix:String — A string that is the prefix for the log entry
 
id:* — An id that the client can use for tracking purposes.
 
attachment:IAttachment — Specifies the attachment (an IAttachment) for which the thumbnail is generated.
 
width:Number — The desired width of the thumbnail, in pixels. It must be > 0 and <= 2048.
 
height:Number — The desired height of the thumbnail, in pixels. It must be > 0 and <= 2048.
 
pageNumber:uint — The desired page number of the attachment. It must be >= 1.

logInfo()method 
protected function logInfo(prefix:String, cacheObject:CacheObject):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Creates a log entry using the

Parameters

prefix:String — A string that is the prefix for the log entry
 
cacheObject:CacheObject

onTimeout()method 
protected function onTimeout(e:Event):void

Parameters

e:Event

requestThumbnail()method 
public function requestThumbnail(id:*, attachment:IAttachment, width:Number, height:Number, pageNumber:uint, callback:Function, downSampleOK:Boolean = true, upSampleOK:Boolean = true):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Requests a thumbnail to be generated that will fit into the specified width and height.

Parameters

id:* — An id that the client can use for tracking purposes.
 
attachment:IAttachment — Specifies the attachment (an IAttachment) for which the thumbnail is generated.
 
width:Number — The desired width of the thumbnail, in pixels. It must be gt; 0 and <= 2048.
 
height:Number — The desired height of the thumbnail, in pixels. It must be > 0 and <= 2048.
 
pageNumber:uint — The desired page number of the attachment. It must be >= 1.
 
callback:Function — A callback function that will be called when the thumbnail has been generated. Its parameters are specified below. Callback function parameters: callbackFunction(id: width:Number, height:Number, thumbnail:Bitmap)
Parameter:TypeValue
id:Stringthe value of the id param passed to requestThumbnail
width:Numberthe value of the width parameter passed to requestThumbnail
height:NumberThe value of the height param to requestThumbnail
pageNumber:uintthe value of the pageNumber param to requestThumbnail
thumbnail:Bitmapthe generated thumbnail
 
downSampleOK:Boolean (default = true)
 
upSampleOK:Boolean (default = true)

startTimeOutTimer()method 
protected function startTimeOutTimer():void

supportsDynamicThumbnails()method 
public function supportsDynamicThumbnails(attachment:IAttachment):Boolean

Returns true if a dynamic thumbnail request has ever succeeded for this attachment, or false otherwise.

Parameters

attachment:IAttachment

Returns
Boolean
validateThumbSize()method 
protected function validateThumbSize(value:Number, downSampleOK:Boolean = true):Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

value:Number
 
downSampleOK:Boolean (default = true)

Returns
Number
wrapBitmapData()method 
protected function wrapBitmapData(bitmapData:BitmapData):Bitmap

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

Parameters

bitmapData:BitmapData

Returns
Bitmap
Constant Detail
BYPASS_ACROBATConstant
protected static const BYPASS_ACROBAT:Boolean = false

loggerConstant 
protected static const logger:ILogger

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The thumbnailManager logging instance

SMALL_THUMB_FIT_HEIGHTConstant 
public static const SMALL_THUMB_FIT_HEIGHT:int = 128

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX

SMALL_THUMB_FIT_WIDTHConstant 
public static const SMALL_THUMB_FIT_WIDTH:int = 128

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

XXXXX