Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
The CardLayoutHelper class is a set of utility functions to help Card-based layouts.
protected var attachmentProperties:Dictionary
protected var autoListen:AutoListen
protected var cardLayout:ICardLayout
protected var cardProvider:ICardProvider
protected var enableDynamicThumbnailsTimer:Timer
enableIdle:Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
True if thumbnail idle is enabled
Implementation public function get enableIdle():Boolean
public function set enableIdle(value:Boolean):void
protected var idleDelay:int = 2000
protected var idleItems:Array
protected var idleTimer:Timer
pendingFade:Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
True if a fade (of cards) is pending
Implementation public function get pendingFade():Boolean
public function set pendingFade(value:Boolean):void
protected var sequentialFade:SequentialFade
target:GroupBase
[read-only]
Implementation protected function get target():GroupBase
thumbFitSize:Point
Implementation protected function get thumbFitSize():Point
protected function set thumbFitSize(value:Point):void
protected var thumbnailMgr:ThumbnailManager
public function CardLayoutHelper(cardLayout:ICardLayout )
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Constructor.
Parameters public function dataProviderIsCurrent():Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns true if the dataProvider is "current".
Returns Boolean
— True if the dataProvider is "current".
See also
public function elementIntersectsRect(element:IVisualElement, rect:Rectangle):Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns true if an element intersects the specified rectangle
Parameters
element :IVisualElement
— The element
rect :Rectangle
— The rectangle
Returns Boolean
— True if the element intersects the specified rectangle
protected function enableDynamicThumbnails():void
public function enableThumbnailGeneration():void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Iterates the cards in a layout and enables thumbnail generation.
public function fadeInCards(delay:Number, duration:Number = 50):void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Fades in cards in a layout
Parameters
delay :Number
— The delay in msec before starting the fade
duration :Number
(default = 50
)
— The duration of the fade for each card in msec
public function findCardsThatIntersect(rect:Rectangle):Vector.<int>
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns a vector of indices of cards that intersect a given rectangle
Parameters
rect :Rectangle
— The rectangle
Returns Vector.<int>
— A vector of indices
public function getAlpha(card:ISimpleCard ):Number
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the alpha value of a card
Parameters
Returns public function getCard(index:int):ISimpleCard
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the card in the target at the specified index
Parameters
Returns public function getCurrentIndex(attachment:IAttachment , dataProvider:IList = null):int
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the index in the specified dataProvider of the given attachement
Parameters
attachment :IAttachment
— attachment
dataProvider :IList
(default = null
)
— dataProvider (if null it uses the dataProvider associated with the layout)
Returns int
— The index of the attachment in the dataProvider. Returns -1 if not found.
public function getDataProvider():IList
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the layout target's dataProvider
Returns IList
— The dataProvider of the layout target
public function getLayoutElement(index:int):IVisualElement
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the element in the target at the specified index
Parameters
Returns IVisualElement
— The element (of the layout)
public function getLayoutRect(element:IVisualElement):Rectangle
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns the bounding box of a layout element
Parameters
element :IVisualElement
— The element
Returns Rectangle
— The bounding box of the element
protected function handleItemIdle(attachment:IAttachment ):void
Parameters
public function idleCardsAroundFocus(dataProvider:IList, focusAttachment:IAttachment , delta:int):void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Lazily rebuilds thumbnails in a region around a specified focus after a resize of the layout
Parameters
dataProvider :IList
— The dataProvider of the layout (a list of attachments)
focusAttachment :IAttachment
— Specifies how many cards from the focusAttachment to idle (i.e. 1 idles focusAttachment-1, focusAttachment, focusAttachment+1, etc.)
delta :int
public function invalidateTarget():void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Invalidate the displaylist of the target of the associated layout
public function isPendingOrFading():Boolean
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
True if a fade (of cards) is pending or the fade is active
Returns protected function onElementDone(target:Object):void
Parameters
protected function onIdleTime(e:TimerEvent):void
Parameters
protected function preloadThumb(attachment:IAttachment , fitSize:Point):void
Parameters
protected function resetIdleItems():void
public function resizeCachedThumbs(dataProvider:IList, width:Number, height:Number, delta:int):void
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Responds to a layout resize by resetting the ThumbnailManager thumb size and idling thumbs around the focus card
Parameters
dataProvider :IList
— The dataProvider of the layout (a list of attachments)
width :Number
— The thumb fit width
height :Number
— The thumb fit height
delta :int
— Specifies how many cards from the focus card to idle (i.e. 1 idles focusCard-1, focusCard, focusCard+1, etc.)
protected function saveAlpha(card:ISimpleCard ):void
Parameters
public function scrollRect(group:GroupBase):Rectangle
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns a scroll rect for the group.
Parameters
group :GroupBase
— The group
Returns Rectangle
— A Rectangle corresponding to the scrollRect
override public function toString():String
Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0
Returns protected static const collectionMgr:CollectionManager
protected static const logger:ILogger
Copyright Adobe Systems Incorporated, all rights reserved, for internal use only Mon Apr 25 2011, 05:54 PM -07:00