Package | com.adobe.portfolio.cards |
Class | public class PreviewCard |
Inheritance | PreviewCard ![]() ![]() ![]() |
Implements | IPreviewCard |
Language Version : | ActionScript 3.0 |
Product Version : | Portfolio 10.0 |
Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Property | Defined By | ||
---|---|---|---|
![]() | colorPalette : ColorPalette
The color palette being used by this object. | SimpleCard | |
![]() | compressedSize : uint
The size of this card's underlying attachment as it is currently compressed
in the Navigator file. | SimpleCard | |
![]() | creationDate : Date
The creation date of this card's underlying attachment. | SimpleCard | |
![]() | data : Object
The data object to be renderered. | SimpleCard | |
![]() | delayThumbnailGeneration : Boolean
Indicates whether generation of the thumbnail image should be
delayed or not. | SimpleCard | |
![]() | description : String
The description of this card's underlying attachment. | SimpleCard | |
![]() | doubleClickEnabled : Boolean [override] [write-only]
Enable double clicking events. | SimpleCard | |
![]() | downSampleOK : Boolean
true if it is OK to scale down the image;
otherwise false. | SimpleCard | |
![]() | dragging : Boolean
Is true if the item renderer is being dragged;
otherwise false. | SimpleCard | |
![]() | dropShadowPreference : String
The drop shadow effect preference. | SimpleCard | |
![]() | enableThumbnailGeneration : Boolean
Indicates whether generation of the thumbnail image is enabled or not. | SimpleCard | |
![]() | fileName : String
The file name of this card's underlying attachment. | SimpleCard | |
![]() | generateThumb : Boolean
Indicates whether or not to generate a thumbnail image for the card
| SimpleCard | |
![]() | isOpen : Boolean
Is true if the attachment is open in a native editor;
otherwise false. | SimpleCard | |
![]() | itemIndex : int
The index of the item in the data set
that this renderer is visualizing. | SimpleCard | |
![]() | label : String
The String to display in the item renderer. | SimpleCard | |
![]() | maintainAspectRatio : Boolean
Is true if the aspect ratio of the card should be
maintained by setLayoutBoundsSize; otherwise it is false. | SimpleCard | |
![]() | modDate : Date
The modification date of this card's underlying attachment. | SimpleCard | |
![]() | numAttachments : int
The number of attachments in a folder
| SimpleCard | |
![]() | padding : Point [read-only]
Get the horizontal and vertical padding for this UI component. | SimpleCard | |
pageNavigationEnabled : Boolean
Whether page navigation is enabled (via keyboard, mousewheel)
| PreviewCard | ||
![]() | preview : Preview [write-only] | SimpleCard | |
![]() | previewComponent : IPreview [read-only]
Returns the preview component for this card. | SimpleCard | |
![]() | rollOverPreference : String
A string specifying the preferred type of rollover effect on this component. | SimpleCard | |
![]() | selected : Boolean
Is true if the item renderer
can show itself as selected; otherwise it is false. | SimpleCard | |
![]() | showsCaret : Boolean
Is true if the item renderer can show itself as focused;
otherwise it is false. | SimpleCard | |
![]() | size : uint
The size of this card's underlying attachment, if it were to be uncompressed. | SimpleCard | |
![]() | skinState : String
The current skin state
| NavSkinnableComponent | |
![]() | visible : Boolean [override] [write-only]
| SimpleCard |
Property | Defined By | ||
---|---|---|---|
allowMultiPage : Boolean [override] [read-only]
Specifies whether or not this card should use a multi-page preview state. | 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 if this card supports in-place multimedia playback
for it's current attachment; false otherwise. | PreviewCard | ||
![]() | previewMultiPageModel : IPreviewMultiPageModel [read-only]
Get a preview model that supports multipage preview of attachments, or
null if multipage preview is not supported by the current preview model. | SimpleCard |
Method | Defined By | ||
---|---|---|---|
Constructor
| PreviewCard | ||
![]() | addListenAndWatch():void
Creates autoListen and autoWatch for automatically tracking listeners and watchers. | NavSkinnableComponent | |
![]() | invalidatePreview(invalidateModel:Boolean = false, generateThumb:Boolean = true):void
Invalidate the current preview state for the card
| SimpleCard | |
![]() | removeListenAndWatch():void
Uses autoListen and autoWatch to remove all listeners and watchers. | NavSkinnableComponent | |
setCurrentState(stateName:String, playTransition:Boolean = true):void [override]
Set the current state of the previewCard
| 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 card
| 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]
| SimpleCard | |
![]() | detachSkin():void [override] | NavSkinnableComponent | |
![]() | extensionFromAttachment():String
Returns the file extension for the attachment. | SimpleCard | |
generateThumbnail():void [override]
Generate a thumbnail image for the underlying attachment. | PreviewCard | ||
![]() | getAspectRatio():Number
Get the aspect ratio of the thumbnail for the attachment. | SimpleCard | |
getCurrentSkinState():String [override]
| PreviewCard | ||
getPreviewSize():Point [override]
Get the size of the preview image
| PreviewCard | ||
![]() | handlePreview():void
Have the collectionManager handle modal previe experience
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(invalidateModel:Boolean = false, generateThumb:Boolean = true):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 attachment events
| SimpleCard | |
![]() | onChildrenChanged(event:CollectionEvent):void
An event listener that's called when this attachments children dispatches
a collectionChange event. | 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 from the underlying attachment
| SimpleCard | |
onInfoCloseClick(evt:Event):void
The event handler for closing the previewCard's info state. | PreviewCard | ||
partAdded(partName:String, instance:Object):void [override]
| PreviewCard | ||
partRemoved(partName:String, instance:Object):void [override]
| 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 |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the user clicks the close button for this component. | PreviewCard |
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:spark.primitives.BitmapImage | 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. See also | 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 |
Specifies whether or not this card should use a multi-page preview state. Calculating the page count is expensive, so only allow multi-page at all if the current attachment supports it.
protected function get allowMultiPage():Boolean
pageNavigationEnabled | property |
pageNavigationEnabled:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Portfolio 10.1 |
Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Whether page navigation is enabled (via keyboard, mousewheel)
This property can be used as the source for data binding.
public function get pageNavigationEnabled():Boolean
public function set pageNavigationEnabled(value:Boolean):void
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. The preferred preview state for this card
protected function get preferredPreviewState():String
See also
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
if this card supports in-place multimedia playback
for it's current attachment; 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
generateThumbnail | () | method |
override protected function generateThumbnail():void
Language Version : | ActionScript 3.0 |
Product Version : | Portfolio 10.0 |
Runtime Versions : | Flash Player 10.1, AIR 2.0 |
Generate a thumbnail image for the underlying attachment.
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
String |
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 |
Get the size of the preview image
ReturnsPoint — the width and height of the preview image as an (x,y) pair.
|
invalidatePreviewFromSetData | () | method |
override protected function invalidatePreviewFromSetData(invalidateModel:Boolean = false, generateThumb:Boolean = true):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
Parameters
invalidateModel:Boolean (default = false )
| |
generateThumb:Boolean (default = true )
|
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 |
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 |
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 |
Set the current state of the previewCard
Parameters
stateName:String — The name of the new current state
| |
playTransition:Boolean (default = true ) — If true then play the state transition effect.
|
closeButton | Event |
flash.events.Event
Dispatched when the user clicks the close button for this component.
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.