Packagecom.adobe.portfolio.cards
Classpublic class SimpleCard
InheritanceSimpleCard Inheritance NavSkinnableComponent Inheritance spark.components.supportClasses.SkinnableComponent
Implements mx.managers.IFocusManagerComponent, mx.controls.listClasses.IListItemRenderer, spark.components.IItemRenderer, ISimpleCard
Subclasses BasicCard, DetailsCard, GuideCard, PreviewCard

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

The SimpleCard class extends NavSkinnableComponent to show a simple card that displays a thumbnail corresponding to an IAttachment. SimpleCard is a skinnable renderer for an IAttachment. It implements IListItemRenderer, so it can be used as an item renderer for relevant containers. The skin is not required to provide all the relevant controls, which allows this object to act as the core for both simple (mini-nav) and complex (basic click-through card) rendering.



Public Properties
 PropertyDefined 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
  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
 InheritedskinState : String
The current skin state
NavSkinnableComponent
  visible : Boolean
[override] [write-only]
SimpleCard
Protected Properties
 PropertyDefined By
  allowMultiPage : Boolean
[read-only] Specifies whether or not this card should use a multi-page preview state.
SimpleCard
  attachment : IAttachment = null
The IAttachment data object being rendered by this component.
SimpleCard
 InheritedautoListen : AutoListen
NavSkinnableComponent
 InheritedautoWatch : 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
[read-only] The preferred preview state for this card
SimpleCard
  prefersMediaPreview : Boolean
[read-only] Returns true if this card supports in-place multimedia playback for it's current attachment; false otherwise.
SimpleCard
  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
Public Methods
 MethodDefined By
  
Default constructor for SimpleCard.
SimpleCard
 Inherited
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
 Inherited
Uses autoListen and autoWatch to remove all listeners and watchers.
NavSkinnableComponent
 Inherited
setCurrentState(stateName:String, playTransition:Boolean = true):void
[override] Sets the current component state and skin state.
NavSkinnableComponent
  
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
Protected Methods
 MethodDefined By
 Inherited
addListener(listener:IEventDispatcher, type:String, handler:Function, useCapture:Boolean = false, priority:int = 0):void
NavSkinnableComponent
 Inherited
addWatcher(watcher:ChangeWatcher):void
NavSkinnableComponent
  
[override]
SimpleCard
 Inherited
detachSkin():void
[override]
NavSkinnableComponent
  
Returns the file extension for the attachment.
SimpleCard
  
Generate a thumbnail image for the underlying attachment.
SimpleCard
  
Get the aspect ratio of the thumbnail for the attachment.
SimpleCard
  
[override]
SimpleCard
  
Get the size of the preview image
SimpleCard
  
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
  
Initialize the page count for the preview multipage model to the page count of the underlying attachement.
SimpleCard
 Inherited
initStates():void
NavSkinnableComponent
  
invalidatePreviewFromSetData(invalidateModel:Boolean = false, generateThumb:Boolean = true):void
Invalidate the preview because a new data object to be rendered has been set
SimpleCard
  
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
  
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
  
partAdded(partName:String, instance:Object):void
[override]
SimpleCard
  
partRemoved(partName:String, instance:Object):void
[override]
SimpleCard
  
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
Styles
 Style Description Defined By
  
folderSkinClass
Type: Class
Name of the skin class to use for this component when its data is set to a folder attachment.
SimpleCard
Skin Parts

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
  
icon:spark.primitives.BitmapImage
Required: false Part Type: Static
The icon image for the card
SimpleCard
  
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
Skin States

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
  
normal
SimpleCard
  
over
SimpleCard
  
overAndSelected
SimpleCard
  
selected
SimpleCard
Public Constants
 ConstantDefined 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_SELECTED : String = selected
[static] A string literal used to represent the selected skin state of the SimpleCard
SimpleCard
 InheritedSTATE_DISABLED : String = disabled
[static]
NavSkinnableComponent
 InheritedSTATE_NORMAL : String = normal
[static]
NavSkinnableComponent
Protected Constants
 ConstantDefined By
  collectionManager : CollectionManager
The navigator's CollectionManager instance.
SimpleCard
  logger : ILogger
A logger that can be used by this instance to log warnings, errors, or additional information.
SimpleCard
  thumbnailMgr : ThumbnailManager
[static] The navigator's thumbnailManager instance.
SimpleCard
Property Detail
allowMultiPageproperty
allowMultiPage:Boolean  [read-only]

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.


Implementation
    protected function get allowMultiPage():Boolean
attachmentproperty 
protected var attachment:IAttachment = null

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

The IAttachment data object being rendered by this component. It is set through the public data setter.

colorPaletteproperty 
colorPalette:ColorPalette

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

The color palette being used by this object.

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


Implementation
    public function get colorPalette():ColorPalette
    public function set colorPalette(value:ColorPalette):void
compressedSizeproperty 
compressedSize:uint

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

The size of this card's underlying attachment as it is currently compressed in the Navigator file.

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


Implementation
    public function get compressedSize():uint
    public function set compressedSize(value:uint):void
creationDateproperty 
creationDate:Date

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

The creation date of this card's underlying attachment.

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


Implementation
    public function get creationDate():Date
    public function set creationDate(value:Date):void
dataproperty 
data:Object

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

The data object to be renderered. Only IAttachment objects are supported.

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


Implementation
    public function get data():Object
    public function set data(value:Object):void
delayThumbnailGenerationproperty 
delayThumbnailGeneration:Boolean

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

Indicates whether generation of the thumbnail image should be delayed or not.


Implementation
    public function get delayThumbnailGeneration():Boolean
    public function set delayThumbnailGeneration(value:Boolean):void
descriptionproperty 
description:String

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

The description of this card's underlying attachment.

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


Implementation
    public function get description():String
    public function set description(value:String):void
doubleClickEnabledproperty 
doubleClickEnabled:Boolean  [write-only] [override]

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

Enable double clicking events.


Implementation
    public function set doubleClickEnabled(value:Boolean):void
downSampleOKproperty 
downSampleOK:Boolean

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

true if it is OK to scale down the image; otherwise false.


Implementation
    public function get downSampleOK():Boolean
    public function set downSampleOK(value:Boolean):void
draggingproperty 
dragging:Boolean

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

Is true if the item renderer is being dragged; otherwise false.


Implementation
    public function get dragging():Boolean
    public function set dragging(value:Boolean):void
dropShadowPreferenceproperty 
dropShadowPreference:String

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

The drop shadow effect preference. This is a string specifying the preferred location for a drop shadow effect on this component. This is used as a hint to skins when specifying filters. The possible values are "none", "bottom", and "rear".

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


Implementation
    public function get dropShadowPreference():String
    public function set dropShadowPreference(value:String):void

See also

enableThumbnailGenerationproperty 
enableThumbnailGeneration:Boolean

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

Indicates whether generation of the thumbnail image is enabled or not.


Implementation
    public function get enableThumbnailGeneration():Boolean
    public function set enableThumbnailGeneration(value:Boolean):void
fileNameproperty 
fileName:String

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

The file name of this card's underlying attachment.

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


Implementation
    public function get fileName():String
    public function set fileName(value:String):void
generateThumbproperty 
generateThumb:Boolean

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

Indicates whether or not to generate a thumbnail image for the card


Implementation
    public function get generateThumb():Boolean
    public function set generateThumb(value:Boolean):void
invalidPreviewproperty 
protected var invalidPreview:Boolean

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

If true the preview for this card is invalid.

isOpenproperty 
isOpen:Boolean

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

Is true if the attachment is open in a native editor; otherwise false.

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


Implementation
    public function get isOpen():Boolean
    public function set isOpen(value:Boolean):void
itemIndexproperty 
itemIndex:int

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

The index of the item in the data set that this renderer is visualizing.


Implementation
    public function get itemIndex():int
    public function set itemIndex(value:int):void
labelproperty 
label:String

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

The String to display in the item renderer.

The host component of the item renderer can use the itemToLabel() method to convert the data item to a String for display by the item renderer.

For controls like List and ButtonBar, you can use the labelField or labelFunction properties to specify the field of the data item that contains the String. Otherwise the host component uses the toString() method to convert the data item to a String.


Implementation
    public function get label():String
    public function set label(value:String):void
maintainAspectRatioproperty 
maintainAspectRatio:Boolean

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

Is true if the aspect ratio of the card should be maintained by setLayoutBoundsSize; otherwise it is false.


Implementation
    public function get maintainAspectRatio():Boolean
    public function set maintainAspectRatio(value:Boolean):void
modDateproperty 
modDate:Date

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

The modification date of this card's underlying attachment.

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


Implementation
    public function get modDate():Date
    public function set modDate(value:Date):void
mouseIsOverproperty 
mouseIsOver:Boolean

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

Returns true if the mouse is over the card; returns false otherwise.


Implementation
    protected function get mouseIsOver():Boolean
    protected function set mouseIsOver(value:Boolean):void
numAttachmentsproperty 
numAttachments:int

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

The number of attachments in a folder

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


Implementation
    public function get numAttachments():int
    public function set numAttachments(value:int):void
paddingproperty 
padding:Point  [read-only]

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

Get the horizontal and vertical padding for this UI component.


Implementation
    public function get padding():Point
preferredPreviewStateproperty 
preferredPreviewState:String  [read-only]

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

The preferred preview state for this card


Implementation
    protected function get preferredPreviewState():String

See also

Preview.AUDIO
Preview.PAGING_THUMBNAIL
Preview.THUMBNAIL
Preview.VIDEO
prefersMediaPreviewproperty 
prefersMediaPreview:Boolean  [read-only]

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.


Implementation
    protected function get prefersMediaPreview():Boolean

See also

previewproperty 
preview:Preview  [write-only]


Implementation
    public function set preview(value:Preview):void
previewComponentproperty 
previewComponent:IPreview  [read-only]

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

Returns the preview component for this card.


Implementation
    public function get previewComponent():IPreview
previewMultiPageModelproperty 
previewMultiPageModel:IPreviewMultiPageModel  [read-only]

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

Get a preview model that supports multipage preview of attachments, or null if multipage preview is not supported by the current preview model.


Implementation
    protected function get previewMultiPageModel():IPreviewMultiPageModel
rollOverPreferenceproperty 
rollOverPreference:String

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

A string specifying the preferred type of rollover effect on this component. This is used as a hint to skins when specifying filters. Possible values are "none", "glow", and "scale".

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


Implementation
    public function get rollOverPreference():String
    public function set rollOverPreference(value:String):void

See also

selectedproperty 
selected:Boolean

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

Is true if the item renderer can show itself as selected; otherwise it is false.

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


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
showsCaretproperty 
showsCaret:Boolean

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

Is true if the item renderer can show itself as focused; otherwise it is false.


Implementation
    public function get showsCaret():Boolean
    public function set showsCaret(value:Boolean):void
sizeproperty 
size:uint

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

The size of this card's underlying attachment, if it were to be uncompressed.

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


Implementation
    public function get size():uint
    public function set size(value:uint):void
visibleproperty 
visible:Boolean  [write-only] [override]

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


Implementation
    public function set visible(value:Boolean):void
Constructor Detail
SimpleCard()Constructor
public function SimpleCard()

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

Default constructor for SimpleCard.

Method Detail
commitProperties()method
override protected function commitProperties():void

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

extensionFromAttachment()method 
protected function extensionFromAttachment():String

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

Returns the file extension for the attachment. If the attachment is a folder, this returns null.

Returns
String
generateThumbnail()method 
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.

getAspectRatio()method 
protected function getAspectRatio():Number

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

Get the aspect ratio of the thumbnail for the attachment.

Returns
Number — The aspect ratio as a single number representing width/height
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 
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

Returns
Point — the width and height of the preview image as an (x,y) pair.
handlePreview()method 
protected function handlePreview():void

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

Have the collectionManager handle modal previe experience for the underlying attachment. This is usually handled within the portfolio by the NavPreview component, or by the host application through the preview command.

See also

NavPreview
CommandType.PREVIEW
hostPageCountChanged()method 
protected function hostPageCountChanged(val:uint):void

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

This function is called if the page count of the multipage model has changed

Parameters

val:uint — If 0 then do nothing; otherwise invalidate the preview.

initPageCount()method 
protected function initPageCount():void

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

Initialize the page count for the preview multipage model to the page count of the underlying attachement. Calculating the page count is expensive, so avoid calling this function when allowMultiPage is false.

See also

invalidatePreview()method 
public function invalidatePreview(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 current preview state for the card

Parameters

invalidateModel:Boolean (default = false) — If true then nulify the preview model.
 
generateThumb:Boolean (default = true) — If true then generate a thumbnail image.

invalidatePreviewFromSetData()method 
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)

mimeTypeFromAttachment()method 
protected function mimeTypeFromAttachment():String

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

Returns the MIME type for the attachment. If the attachment is a folder, this returns null.

Returns
String
onAspectRatioChanged()method 
protected function onAspectRatioChanged(event:PropertyChangeEvent):void

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

The event handler for changes in aspect ratio of the thumbnail.

Parameters

event:PropertyChangeEvent — the change in aspect ratio event

onAttachmentChange()method 
protected function onAttachmentChange(evt:Event):void

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

Handles changes in the underlying attachment events

Parameters

evt:Event — The change in the underlying attachement event

See also

IAttachment
onChildrenChanged()method 
protected function onChildrenChanged(event:CollectionEvent):void

An event listener that's called when this attachments children dispatches a collectionChange event.

Parameters

event:CollectionEvent

See also

IAttachment.children
onEnableDynamicThumbnails()method 
protected function onEnableDynamicThumbnails(value:Boolean):void

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

Handle the enabling of dynamic thumbnails. This function makes sure that cards supporting multi-page start listening for page events.

Parameters

value:Boolean — If true cards supporting multi-page will start listening for page events.

onHostPropertyChange()method 
protected function onHostPropertyChange(event:PropertyChangeEvent):void

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

A listener for PropertyChangeEvents on the collectionManager.

Parameters

event:PropertyChangeEvent — The host's PropertyChangeEvent to be handled.

See also

CollectionManager
onIconChange()method 
protected function onIconChange(event:Event):void

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

Handle icon change events from the underlying attachment

Parameters

event:Event — icon change event

See also

IAttachment.icon
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

setAspectRatio()method 
protected function setAspectRatio(value:Number, mediaValue:Boolean = false):void

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

Set the aspect ratio of the thumbnail for the attachment.

Parameters

value:Number — The aspect ratio as a single number representing width/height
 
mediaValue:Boolean (default = false) — Set to true if the card for an audio or video attachment; otherwise set to false.

setAspectRatioField()method 
protected function setAspectRatioField(value:Number):void

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

Set the aspect ratio of the appropriate field for the attachment

Parameters

value:Number — The aspect ratio as a single number representing width/height

See also

setLayoutBoundsSize()method 
override public function setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void

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

Sets the layout size of the card. This is the size that the card element uses to draw on screen.

If the width and/or height parameters are left unspecified, Flex sets the element's layout size to its preferred width and/or preferred height.

Note that calls to the setLayoutBoundSize() method can affect the layout position, so call setLayoutBoundPosition() after calling setLayoutBoundSize().

If maintainAspectRatio is true, then this call will attempt to size the card around its preview component by reducing the width or height, or by adjusting the layout values of paddingGroup.

Parameters

width:Number — The desired width for the card
 
height:Number — The desired height for the card
 
postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true, the specified sizes are those of the card's bounding box. The bounding box is in card's parent coordinate space and is calculated from the card's layout size, layout position and layout transform matrix.

See also

toString()method 
override public function toString():String

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

The String to display in the item renderer.

For controls that do not have labelField or labelFunction properties to specify the field of the data item that contains the string to display, use toString() to convert the data item to a string.

Returns
String — The String to display in the item renderer.
updatePreview()method 
protected function updatePreview(oldRenderer:ISimpleCard):void

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

Update the preview for this card.

Parameters

oldRenderer:ISimpleCard — The previous simpleCard renderer to use as the basis for the updated preview

updatePreviewModelListeners()method 
protected function updatePreviewModelListeners(adding:Boolean):void

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

Update the listeners for preview model events.

Parameters

adding:Boolean — Set to true if you are adding attachments

updateRenderer()method 
public function updateRenderer(oldRenderer:ISimpleCard):void

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

Update the renderer to use for the card

Parameters

oldRenderer:ISimpleCard — The renderer to use.

Constant Detail
ASPECT_RATIO_FIELDConstant
public static const ASPECT_RATIO_FIELD:String = adobe:AspectRatio

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

A string literal representing the name for the aspect ratio field

collectionManagerConstant 
protected const collectionManager:CollectionManager

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

The navigator's CollectionManager instance. All host interaction should go through this instance, rather than the INavigatorHost directly.

loggerConstant 
protected const logger:ILogger

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

A logger that can be used by this instance to log warnings, errors, or additional information.

PART_ICONConstant 
public static const PART_ICON:String = icon

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 icon skin part exposed by SimpleCard

PART_PREVIEWConstant 
public static const PART_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 skin part exposed by SimpleCard

PART_RIBBONConstant 
public static const PART_RIBBON:String = ribbon

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 ribbon skin part exposed by SimpleCard

SKIN_STATE_NORMALConstant 
public static const SKIN_STATE_NORMAL:String = normal

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 normal skin state of the SimpleCard

SKIN_STATE_OVERConstant 
public static const SKIN_STATE_OVER:String = over

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 "over" skin state of the SimpleCard

SKIN_STATE_OVER_AND_SELECTEDConstant 
public static const SKIN_STATE_OVER_AND_SELECTED:String = overAndSelected

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 over and selected skin state of the SimpleCard

SKIN_STATE_SELECTEDConstant 
public static const SKIN_STATE_SELECTED:String = selected

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 selected skin state of the SimpleCard

thumbnailMgrConstant 
protected static const thumbnailMgr:ThumbnailManager

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

The navigator's thumbnailManager instance.