Packagecom.adobe.portfolio.previews
Classpublic class PreviewFactory
InheritancePreviewFactory Inheritance Object

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

The PreviewFactory class is a factory for constructing IPreviewModels.



Public Properties
 PropertyDefined By
  instance : PreviewFactory
[static] [read-only] Returns the singleton instance.
PreviewFactory
Protected Properties
 PropertyDefined By
  skinStateExtensionDict : Dictionary
PreviewFactory
Public Methods
 MethodDefined By
  
PreviewFactory(token:Object)
Constructor.
PreviewFactory
  
initPreview(preview:Preview, previewState:String, attachment:IAttachment):void
Initializes a Preview and creates a preview model if necessary.
PreviewFactory
  
previewStateFromMimeType(mimeType:String, extension:String):String
Returns a preview state from a file/attachment mimeType and/or extension.
PreviewFactory
Protected Methods
 MethodDefined By
  
createPreviewModel(previewState:String, attachment:IAttachment):IPreviewModel
Creates a preview model for use by the Preview component.
PreviewFactory
  
previewStateFromExtension(extension:String):String
PreviewFactory
Property Detail
instanceproperty
instance:PreviewFactory  [read-only]

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

Returns the singleton instance.


Implementation
    public static function get instance():PreviewFactory
skinStateExtensionDictproperty 
protected var skinStateExtensionDict:Dictionary

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

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

Constructor. Consider this private - it will throw an error if called directly.

Parameters
token:Object
Method Detail
createPreviewModel()method
protected function createPreviewModel(previewState:String, attachment:IAttachment):IPreviewModel

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

Creates a preview model for use by the Preview component.

Parameters

previewState:String — The type of preview. Valid values: Preview.THUMBNAIL, Preview.PAGING_THUMBNAIL, Preview.AUDIO, Preview.VIDEO.
 
attachment:IAttachment — The associated attachment

Returns
IPreviewModel — A previewModel corresponding to the previewState.

See also

initPreview()method 
public function initPreview(preview:Preview, previewState:String, attachment:IAttachment):void

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

Initializes a Preview and creates a preview model if necessary.

Parameters

preview:Preview — The Preview component to initialize.
 
previewState:String — The type of preview. Valid values: Preview.THUMBNAIL, Preview.PAGING_THUMBNAIL, Preview.AUDIO, Preview.VIDEO.
 
attachment:IAttachment — The associated attachment.

See also

previewStateFromExtension()method 
protected function previewStateFromExtension(extension:String):String

Parameters

extension:String

Returns
String
previewStateFromMimeType()method 
public function previewStateFromMimeType(mimeType:String, extension:String):String

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

Returns a preview state from a file/attachment mimeType and/or extension. It uses the extension only if the mimeType is unknown or not supplied.

Parameters

mimeType:String — The file/attachment mimeType.
 
extension:String — The file/attachment extension.

Returns
String — A previewState. One of: Preview.THUMBNAIL, Preview.PAGING_THUMBNAIL, Preview.AUDIO, Preview.VIDEO.

See also