| Package | com.adobe.portfolio.cards |
| Class | public class PreviewCard |
| Inheritance | PreviewCard SimpleCard NavSkinnableComponent spark.components.supportClasses.SkinnableComponent |
| Implements | IPreviewCard |
| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
| Property | Defined By | ||
|---|---|---|---|
| allowMultiPage : Boolean [override] [read-only]
Determines if the attachement supports calculating the number of pages it contains. | PreviewCard | ||
![]() | attachment : IAttachment = null
The IAttachment data object being rendered by this component. | SimpleCard | |
![]() | autoListen : AutoListen | NavSkinnableComponent | |
![]() | autoWatch : AutoWatch | NavSkinnableComponent | |
![]() | invalidPreview : Boolean
If true the preview for this card is invalid. | SimpleCard | |
![]() | mouseIsOver : Boolean
Returns true if the mouse is over the card;
returns false otherwise. | SimpleCard | |
| preferredPreviewState : String [override] [read-only]
Returns the preferred PreviewState. | PreviewCard | ||
| prefersMediaPreview : Boolean [override] [read-only]
Returns true when the associated attachement has
a preferredPreviewState of AUDIO or VIDEO; returns false otherwise. | PreviewCard | ||
![]() | previewMultiPageModel : IPreviewMultiPageModel [read-only]
Get a preview model that supports multipage preview of attachments
| SimpleCard | |
![]() | _skinState : String | NavSkinnableComponent | |
![]() | thumbnailMgr : ThumbnailManager [static]
The navigator's thumbnailManager instance. | SimpleCard | |
| Method | Defined By | ||
|---|---|---|---|
Constructor
| PreviewCard | ||
![]() | addListenAndWatch():void | NavSkinnableComponent | |
![]() | getDimensionsUsingPreview(fitWidth:Number, fitHeight:Number):Point
Get the dimensions of the preview image. | SimpleCard | |
![]() | invalidatePreview(invalidateModel:Boolean = false, generateThumb:Boolean = true):void
Invalidate the current preview state for the card
| SimpleCard | |
![]() | removeListenAndWatch():void | NavSkinnableComponent | |
setCurrentState(stateName:String, playTransition:Boolean = true):void [override]
Sets the current state of the skin as well as the current state of this instance. | PreviewCard | ||
![]() | setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void [override]
Sets the layout size of the card. | SimpleCard | |
![]() | toString():String [override]
The String to display in the item renderer. | SimpleCard | |
![]() | updateRenderer(oldRenderer:ISimpleCard):void
Update the renderer to use for the simpleCard
| SimpleCard | |
| Method | Defined By | ||
|---|---|---|---|
![]() | addListener(listener:IEventDispatcher, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0):void | NavSkinnableComponent | |
![]() | addWatcher(watcher:ChangeWatcher):void | NavSkinnableComponent | |
![]() | commitProperties():void [override]
Save the current properties of this card. | SimpleCard | |
![]() | detachSkin():void [override] | NavSkinnableComponent | |
![]() | extensionFromAttachment():String
Returns the file extension for the attachment. | SimpleCard | |
![]() | generateThumbnail():void
Generate a thumbnail image for the underlying attachment. | SimpleCard | |
![]() | getAspectRatio():Number
Get the aspect ratio of the thumbnail for the attachment. | SimpleCard | |
getCurrentSkinState():String [override]
Returns the current state of this instance, which is
a variant of the component state depending on
whether or not the component is selected. | PreviewCard | ||
getPreviewSize():Point [override]
XXXXX
| PreviewCard | ||
![]() | handlePreview():void
Have the collectionManager handle the preview for
the underlying attachment. | SimpleCard | |
![]() | hostPageCountChanged(val:uint):void
This function is called if the page count of the multipage model
has changed
| SimpleCard | |
![]() | initPageCount():void
Initialize the page count for the preview multipage model
to the page count of the underlying attachement. | SimpleCard | |
![]() | initStates():void | NavSkinnableComponent | |
invalidatePreviewFromSetData():void [override]
Invalidate the preview because a new data object to be rendered has been set. | PreviewCard | ||
![]() | mimeTypeFromAttachment():String
Returns the MIME type for the attachment. | SimpleCard | |
![]() | onAspectRatioChanged(event:PropertyChangeEvent):void
The event handler for changes in aspect ratio of the thumbnail. | SimpleCard | |
![]() | onAttachmentChange(evt:Event):void
Handles changes in the underlying attachement events
| SimpleCard | |
onCloseClick(evt:Event):void
Dispatches a closeButton event
| PreviewCard | ||
![]() | onEnableDynamicThumbnails(value:Boolean):void
Handle the enabling of dynamic thumbnails. | SimpleCard | |
![]() | onHostPropertyChange(event:PropertyChangeEvent):void
A listener for PropertyChangeEvents on the collectionManager. | SimpleCard | |
![]() | onIconChange(event:Event):void
Handle icon change events
| SimpleCard | |
onInfoCloseClick(evt:Event):void
The event handler for closing the previewCard's info state. | PreviewCard | ||
partAdded(partName:String, instance:Object):void [override]
This function is called when a skin has added a skin part
for this previewCard instance. | PreviewCard | ||
partRemoved(partName:String, instance:Object):void [override]
This function is called when a skin has removed a skin part
for this previewCard instance. | PreviewCard | ||
![]() | setAspectRatio(value:Number, mediaValue:Boolean = false):void
Set the aspect ratio of the thumbnail for the attachment. | SimpleCard | |
![]() | setAspectRatioField(value:Number):void
Set the aspect ratio of the appropriate field for the attachment
| SimpleCard | |
![]() | updatePreview(oldRenderer:ISimpleCard):void
Update the preview for this card. | SimpleCard | |
![]() | updatePreviewModelListeners(adding:Boolean):void
Update the listeners for preview model events. | SimpleCard | |
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
| Skin Part | Description | Defined By | ||
|---|---|---|---|---|
closeButton:spark.components.Button | Required: false Part Type: Static closeButton is the button control to close the preview card. It is an optional skin part, so it is not necessarily implemented for all skins. | PreviewCard | ||
![]() | icon:mx.controls.Image | Required: false Part Type: Static The icon image for the card | SimpleCard | |
infoCloseButton:spark.components.Button | Required: false Part Type: Static infoCloseButton is the button control to close the info card. It is an optional skin part, so not necessarily implemented for all skins. | PreviewCard | ||
![]() | paddingGroup:mx.core.UIComponent | Required: false Part Type: Static A UI Component whose left/right/top/bottom values can be adjusted to fit card UI to a particular aspect ratio without affecting the bounds of the card. | SimpleCard | |
![]() | ribbon:spark.components.Group | Required: false Part Type: Static A skin part representing the ribbon component that should be visible when the user is editing the attament in an external application. | SimpleCard | |
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
| Skin State | Description | Defined By | ||
|---|---|---|---|---|
![]() | SimpleCard | |||
![]() | SimpleCard | |||
![]() | SimpleCard | |||
previewInfo | PreviewCard | |||
previewNormal | PreviewCard | |||
![]() | SimpleCard | |||
| Constant | Defined By | ||
|---|---|---|---|
![]() | ASPECT_RATIO_FIELD : String = adobe:AspectRatio [static]
A string literal representing the name for the aspect ratio field
| SimpleCard | |
![]() | PART_ICON : String = icon [static]
A string literal used to represent the icon skin part exposed by SimpleCard
| SimpleCard | |
![]() | PART_PREVIEW : String = preview [static]
A string literal used to represent the preview skin part exposed by SimpleCard
| SimpleCard | |
![]() | PART_RIBBON : String = ribbon [static]
A string literal used to represent the ribbon skin part exposed by SimpleCard
| SimpleCard | |
![]() | SKIN_STATE_NORMAL : String = normal [static]
A string literal used to represent the normal skin state of the SimpleCard
| SimpleCard | |
![]() | SKIN_STATE_OVER : String = over [static]
A string literal used to represent the "over" skin state of the SimpleCard
| SimpleCard | |
![]() | SKIN_STATE_OVER_AND_SELECTED : String = overAndSelected [static]
A string literal used to represent the over and selected skin state of the SimpleCard
| SimpleCard | |
| SKIN_STATE_PREVIEW_INFO : String = previewInfo [static]
A string literal used to represent the info state of a PreviewCard skin. | PreviewCard | ||
| SKIN_STATE_PREVIEW_NORMAL : String = previewNormal [static]
A string literal used to represent the preview state of a PreviewCard skin. | PreviewCard | ||
![]() | SKIN_STATE_SELECTED : String = selected [static]
A string literal used to represent the selected skin state of the SimpleCard
| SimpleCard | |
![]() | STATE_DISABLED : String = disabled [static] | NavSkinnableComponent | |
| STATE_INFO : String = info [static]
A string literal used to represent the info state of a previewCard. | PreviewCard | ||
![]() | STATE_NORMAL : String = normal [static] | NavSkinnableComponent | |
| STATE_PREVIEW : String = preview [static]
A string literal used to represent the preview state of a previewCard. | PreviewCard | ||
| allowMultiPage | property |
allowMultiPage:Boolean [read-only] [override] | Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Determines if the attachement supports calculating the number of pages it contains.
protected function get allowMultiPage():Boolean| preferredPreviewState | property |
preferredPreviewState:String [read-only] [override] | Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Returns the preferred PreviewState. This is based on the MIME type of the associated attachement if supported.
protected function get preferredPreviewState():String| prefersMediaPreview | property |
prefersMediaPreview:Boolean [read-only] [override] | Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Returns true when the associated attachement has
a preferredPreviewState of AUDIO or VIDEO; returns false otherwise.
protected function get prefersMediaPreview():Boolean| PreviewCard | () | Constructor |
public function PreviewCard()| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Constructor
| getCurrentSkinState | () | method |
override protected function getCurrentSkinState():String| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Returns the current state of this instance, which is a variant of the component state depending on whether or not the component is selected.
ReturnsString |
| getPreviewSize | () | method |
override protected function getPreviewSize():Point| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
XXXXX
ReturnsPoint |
| invalidatePreviewFromSetData | () | method |
override protected function invalidatePreviewFromSetData():void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Invalidate the preview because a new data object to be rendered has been set.
| onCloseClick | () | method |
protected function onCloseClick(evt:Event):void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Dispatches a closeButton event
Parameters
evt:Event — The triggering event
|
| onInfoCloseClick | () | method |
protected function onInfoCloseClick(evt:Event):void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
The event handler for closing the previewCard's info state.
Parameters
evt:Event |
| partAdded | () | method |
override protected function partAdded(partName:String, instance:Object):void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
This function is called when a skin has added a skin part for this previewCard instance.
Parameters
partName:String | |
instance:Object |
| partRemoved | () | method |
override protected function partRemoved(partName:String, instance:Object):void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
This function is called when a skin has removed a skin part for this previewCard instance.
Parameters
partName:String | |
instance:Object |
| setCurrentState | () | method |
override public function setCurrentState(stateName:String, playTransition:Boolean = true):void| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Sets the current state of the skin as well as the current state of this instance.
Parameters
stateName:String | |
playTransition:Boolean (default = true) |
| SKIN_STATE_PREVIEW_INFO | Constant |
public static const SKIN_STATE_PREVIEW_INFO:String = previewInfo| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
A string literal used to represent the info state of a PreviewCard skin.
| SKIN_STATE_PREVIEW_NORMAL | Constant |
public static const SKIN_STATE_PREVIEW_NORMAL:String = previewNormal| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
A string literal used to represent the preview state of a PreviewCard skin.
| STATE_INFO | Constant |
public static const STATE_INFO:String = info| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
A string literal used to represent the info state of a previewCard.
| STATE_PREVIEW | Constant |
public static const STATE_PREVIEW:String = preview| Language Version : | ActionScript 3.0 |
| Product Version : | Portfolio 10.0 |
| Runtime Versions : | Flash Player 10.1, AIR 2.0 |
A string literal used to represent the preview state of a previewCard.