Packagecom.adobe.portfolio.components
Classpublic class NavPreview
InheritanceNavPreview Inheritance CardContainer Inheritance CardList Inheritance spark.components.List

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

The NavPreview class extends CardContainer to preview the current focus card, scroll to next and previous cards, and to view the contents of folders.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
 InheritedbindableDataGroup : DataGroup
[read-only]
CardList
  dataProvider : IList
[override] Overrides get dataProvider to provide an empty collection if the enableDataProvider property is false.
NavPreview
 InheriteddragStarted : Boolean = false
A boolean to indicate that a drag operation is in progress
CardList
 InheritedenableIdle : Boolean
CardList
  focusAttachment : IAttachment
The attachment that currently has the focus.
NavPreview
 InheritednavPreview : NavPreview
CardContainer
  previewCardSize : Point
The dimensions of the preview card in pixels.
NavPreview
  previewFolderSize : Point
The dimensions of the preview folder (used to display the content non-root folders) in pixels.
NavPreview
  rootDataGroup : DataGroup
The dataGroup associated with the root collection.
NavPreview
 InheriteduseDragDropOnFolders : Boolean = false
To enable dragDrop on folders during a drag operation.
CardList
 InheriteduseDragDropReordering : Boolean = false
To allow for reordering of items using simple drag and drop gestures.
CardList
Protected Properties
 PropertyDefined By
 InheritedautoListen : AutoListen
CardList
 InheritedautoWatch : AutoWatch
CardList
 InheritedcardLayout : ICardLayout
CardList
 InheritedcardLayoutHelper : CardLayoutHelper
CardList
 InheritedcardSize : String
CardContainer
  deleteFolderString : String
NavPreview
  enableDataProvider : Boolean
NavPreview
  extractFolderString : String
NavPreview
 InheritedfocusCardDelta : int
CardList
  focusChangeEffect : Effect
NavPreview
 InheritedisDragAndDropDisabled : Boolean
[static] [read-only] True if drag and drop has been temporarily disabled for card lists.
CardList
  isInPreviewState : Boolean
[read-only]
NavPreview
  isSkinEffectPlaying : Boolean
[read-only]
NavPreview
  nextCardPreviewEffect : Effect
[read-only]
NavPreview
  prevCardPreviewEffect : Effect
[read-only]
NavPreview
  previewCardInvalid : Boolean
NavPreview
  showInfoString : String
NavPreview
  thumbnailManager : ThumbnailManager
NavPreview
Public Methods
 MethodDefined By
  
Constructor.
NavPreview
 Inherited
addDragData(dragSource:DragSource):void
[override] Takes the data set by the list for ordered items and adds it to the attachments data format.
CardList
  
[override] Adds listeners and watchers at creation time.
NavPreview
 Inherited
calculateDropLocation(event:DragEvent):DropLocation
Calculate the dropLocation of the given dragEvent.
CardList
 Inherited
cardFromAttachment(_dataGroup:DataGroup, attachment:Object):ISimpleCard
[static] Finds the card associated with the given attachment
CardList
 Inherited
collectionDropEnabled(event:DragEvent):Boolean
Helper function that determines whether drag drop is supported
CardList
 Inherited
createDropIndicator():DisplayObject
[override] Creates a custom dropIndicator for the cardList.
CardList
 Inherited
[static] Functions used to disable and enable drag and drop.
CardList
 Inherited
[static]
CardList
 Inherited
Finds the card corresponding to the attachment in focus.
CardList
 Inherited
getFolderItemAtDragLocation(dropLocation:DropLocation):IAttachment
Finds the folder at a given dropLocation
CardList
 Inherited
Function to cleanup the event listeners required by miniNav list.
CardList
  
setCurrentState(stateName:String, playTransition:Boolean = true):void
[override] Sets the state of the skin as well as the state of this instance.
NavPreview
 Inherited
Force selection change.
CardList
 Inherited
setSelectedIndicesWithChangeDispatch(value:Vector.<int>):void
Force selection change.
CardList
 Inherited
updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
[override]
CardList
Protected Methods
 MethodDefined By
 Inherited
addListener(listener:IEventDispatcher, type:String, handler:Function):void
CardList
 Inherited
addWatcher(watcher:ChangeWatcher):void
CardList
  
[override]
NavPreview
  
NavPreview
  
[override]
NavPreview
 Inherited
Returns true if the dataProvider for this list matches the CollectionMgr's currentItems.
CardList
 Inherited
dragCompleteHandler(event:DragEvent):void
[override]
CardList
 Inherited
dragDropHandler(event:DragEvent):void
[override]
CardList
 Inherited
dragEnterHandler(event:DragEvent):void
[override]
CardList
 Inherited
dragExitHandler(event:DragEvent):void
[override]
CardList
 Inherited
dragOverHandler(event:DragEvent):void
[override]
CardList
 Inherited
dragStartHandler(event:DragEvent):void
[override] Does not start drag if some other component has disabled it.
CardList
  
focusChanged(newFocusAttachment:IAttachment):void
NavPreview
  
focusChangedInPreview(newFocusAttachment:IAttachment):void
NavPreview
  
[override] Returns the current state of this instance, since its skins should have a matching set of states.
NavPreview
  
NavPreview
 Inherited
growOrShrinkSelection(event:MarqueeSelectionEvent, indices:Vector.<int>):Vector.<int>
CardContainer
 Inherited
handleDragDropReordering(event:DragEvent):void
Handles the reordering of items after a dragDrop.
CardList
 Inherited
handleDropOnFolder(folder:IAttachment, event:DragEvent):IList
Handles drop on a folder.
CardList
 Inherited
Triggers generation of thumbnails around the new focus card.
CardList
 Inherited
Updates the host's selection based on the current list selection.
CardList
 Inherited
CardList
 Inherited
initStates():void
CardContainer
  
NavPreview
  
keyDownHandler(event:KeyboardEvent):void
[override]
NavPreview
 Inherited
makeNewOrderedList(dropIndex:int, droppingItems:ArrayCollection):IList
Creates an ordered list of items in the dataProvider after the drop.
CardList
 Inherited
modifiersActive(event:MouseEvent, shiftKeyOK:Boolean = false, ctrlKeyOK:Boolean = false):Boolean
CardContainer
  
onAspectRatioChanged(event:PropertyChangeEvent):void
NavPreview
  
onButtonDragExit(event:DragEvent):void
Close button is in the child hierarchy of the NavPreview.
NavPreview
 Inherited
onChildrenCollectionChange(event:CollectionEvent):void
This function is used when attachments are moved across folders.
CardList
  
onCloseButton(event:MouseEvent):void
NavPreview
 Inherited
onCollectionChange(e:CollectionEvent):void
Listener to handle collection change events.
CardList
 Inherited
onCreationComplete(event:FlexEvent):void
CardList
  
onDeleteFolderString(value:String):void
NavPreview
  
onDragOver(event:DragEvent):void
NavPreview
  
onExtractFolderString(value:String):void
NavPreview
  
NavPreview
 Inherited
onHandledFocus is used to ensure that the layout has successfully handled the layout of its initial focused attachment before transitioning in the remaining pieces of UI.
CardContainer
 Inherited
onIndexChangeEvent(event:IndexChangeEvent):void
This listener is called when the selection changes based on user interaction, or when setSelectedIndexWithChangeDispatch or setSelectedIndicesWithChangeDispatch is used to set the selection.
CardList
 Inherited
CardContainer
 Inherited
CardContainer
 Inherited
CardContainer
 Inherited
CardContainer
  
[override]
NavPreview
 Inherited
onNavPreviewCurrentState(value:String):void
CardContainer
  
onOpenFile(event:MouseEvent):void
NavPreview
 Inherited
onOpenFolderTimeComplete(evt:TimerEvent):void
Called when the openFolderTimer completes.
CardList
  
onPreviewCardClose(event:Event):void
NavPreview
  
onPreviewCardDataChanged(val:Object):void
NavPreview
  
onPreviewCardEffectEnd(event:EffectEvent):void
NavPreview
  
onPreviewCardResize(event:ResizeEvent):void
NavPreview
  
onResize(event:ResizeEvent):void
[override]
NavPreview
 Inherited
onScroll(event:Event):void
Listener to handle scroll events of the scroller on cardLists.
CardList
  
onShowInfoString(value:String):void
NavPreview
  
onTimerComplete(event:TimerEvent):void
NavPreview
  
partAdded(partName:String, instance:Object):void
[override]
NavPreview
 Inherited
partRemoved(partName:String, instance:Object):void
[override]
CardContainer
 Inherited
removeListener(listener:IEventDispatcher, type:String = null):void
CardList
 Inherited
reorderAttachments(source:IList):Boolean
Sends the reorder command once all the attachments are found in the given list.
CardList
 Inherited
CardContainer
  
[override]
NavPreview
  
setElementBounds(element:IVisualElement, elementSize:Point):void
NavPreview
 Inherited
CardList
  
setPreviewTo(force:Boolean = false):void
NavPreview
 Inherited
CardContainer
  
NavPreview
  
transitionCurrentState(metaState:String):void
NavPreview
 Inherited
updateMultiSelection(indices:Vector.<int>):void
CardContainer
 Inherited
CardList
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
  
cardShield:spark.components.Group
Required: false Part Type: Static
An optional skin part that dims back underlying components while the preview card is displayed.
NavPreview
  
closeButton:spark.components.Button
Required: false Part Type: Static
An optional skin part that is used to display the close button.
NavPreview
  
fileNameLabel:spark.components.Label
Required: false Part Type: Static
An optional skin part that is used to display the current file (attachement) name.
NavPreview
  
folderShield:spark.components.Group
Required: false Part Type: Static
An optional skin part that dims back underlying components while the folder preview is displayed.
NavPreview
 InheritedRequired: false Part Type: Static
A MarqueeSelection (with frame and shaded center) used to highlight the area of a marquee select.
CardContainer
  
nextButton:spark.components.Button
Required: false Part Type: Static
An optional skin part that is used to display the next button.
NavPreview
  
openFileButton:spark.components.Button
Required: false Part Type: Static
An optional skin part that is used to display the open file button.
NavPreview
  
prevButton:spark.components.Button
Required: false Part Type: Static
An optional skin part that is used to display the prev button.
NavPreview
  
previewCard:IPreviewCard
Required: false Part Type: Static
An optional skin part that is used to display a full-sized preview.
NavPreview
  
previewFolder:spark.components.Group
Required: false Part Type: Static
An optional skin part that is used to display the contents of a folder.
NavPreview
  
previewFolderCard:FolderCard
Required: false Part Type: Static
An optional skin part that is used to display a full-sized preview when not at the root folder level.
NavPreview
  
previewHUD:PreviewHUD
Required: false Part Type: Static
An optional skin part that is used to display a floating HUD w/ navigation controls.
NavPreview
  
tempPreviewCard:IPreviewCard
Required: false Part Type: Static
An optional skin part that is used to display the card preview transition (next, prev).
NavPreview
  
tempPreviewFolderCard:FolderCard
Required: false Part Type: Static
An optional skin part that is used to display the card preview transition (next, prev) when not at the root folder level.
NavPreview
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
  
cardPreview
NavPreview
  
disabled
NavPreview
  
folderCardPreview
NavPreview
  
folderPreview
NavPreview
 InheritedCardContainer
 InheritedCardContainer
Public Constants
 ConstantDefined By
 InheritedcollectionMgr : CollectionManager
The navigator's CollectionManager instance.
CardList
 InheritedDRAG_DROP_ATTACHMENTS : String = attachments
[static] Format that defines the set of Acrobat drag and drop attachments.
CardList
 InheritedDRAG_DROP_ITEMS : String = itemsByIndex
[static] Format that defines the default set of List drag and drop items.
CardList
  STATE_CARD_PREVIEW : String = cardPreview
[static] The "cardPreview" state for the NavPreview and its skin.
NavPreview
  STATE_DISABLED : String = disabled
[static] The "disabled" state for the NavPreview and its skin.
NavPreview
  STATE_FOLDER_CARD_PREVIEW : String = folderCardPreview
[static] The "folderCardPreview" state for the NavPreview and its skin.
NavPreview
  STATE_FOLDER_PREVIEW : String = folderPreview
[static] The "folderPreview" state for the NavPreview and its skin.
NavPreview
 InheritedSTATE_INTRO : String = intro
[static] The "intro" state of both the CardContainer and its skin.
CardContainer
 InheritedSTATE_NORMAL : String = normal
[static] The "normal" state of both the CardContainer and its skin.
CardContainer
Protected Constants
 ConstantDefined By
  DRAG_DROP_ATTACHMENTS : String = attachments
[static]
NavPreview
Property Detail
dataProviderproperty
dataProvider:IList[override]

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

Overrides get dataProvider to provide an empty collection if the enableDataProvider property is false.

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


Implementation
    public function get dataProvider():IList
    public function set dataProvider(value:IList):void
deleteFolderStringproperty 
protected var deleteFolderString:String

enableDataProviderproperty 
enableDataProvider:Boolean


Implementation
    protected function get enableDataProvider():Boolean
    protected function set enableDataProvider(value:Boolean):void
extractFolderStringproperty 
protected var extractFolderString:String

focusAttachmentproperty 
focusAttachment:IAttachment

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

The attachment that currently has the focus.

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


Implementation
    public function get focusAttachment():IAttachment
    public function set focusAttachment(value:IAttachment):void
focusChangeEffectproperty 
protected var focusChangeEffect:Effect

isInPreviewStateproperty 
isInPreviewState:Boolean  [read-only]


Implementation
    protected function get isInPreviewState():Boolean
isSkinEffectPlayingproperty 
isSkinEffectPlaying:Boolean  [read-only]


Implementation
    protected function get isSkinEffectPlaying():Boolean
nextCardPreviewEffectproperty 
nextCardPreviewEffect:Effect  [read-only]


Implementation
    protected function get nextCardPreviewEffect():Effect
prevCardPreviewEffectproperty 
prevCardPreviewEffect:Effect  [read-only]


Implementation
    protected function get prevCardPreviewEffect():Effect
previewCardInvalidproperty 
protected var previewCardInvalid:Boolean

previewCardSizeproperty 
previewCardSize:Point

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

The dimensions of the preview card in pixels.

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


Implementation
    public function get previewCardSize():Point
    public function set previewCardSize(value:Point):void
previewFolderSizeproperty 
previewFolderSize:Point

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

The dimensions of the preview folder (used to display the content non-root folders) in pixels.

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


Implementation
    public function get previewFolderSize():Point
    public function set previewFolderSize(value:Point):void
rootDataGroupproperty 
rootDataGroup:DataGroup

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

The dataGroup associated with the root collection.


Implementation
    public function get rootDataGroup():DataGroup
    public function set rootDataGroup(value:DataGroup):void
showInfoStringproperty 
protected var showInfoString:String

thumbnailManagerproperty 
protected var thumbnailManager:ThumbnailManager

Constructor Detail
NavPreview()Constructor
public function NavPreview()

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

Constructor.

Method Detail
addListenAndWatch()method
override public function addListenAndWatch():void

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

Adds listeners and watchers at creation time.

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

currentStateIsCardPreview()method 
protected function currentStateIsCardPreview():Boolean

Returns
Boolean
dataProvider_collectionChangeHandler()method 
override protected function dataProvider_collectionChangeHandler(event:Event):void

Parameters

event:Event

focusChanged()method 
protected function focusChanged(newFocusAttachment:IAttachment):void

Parameters

newFocusAttachment:IAttachment

focusChangedInPreview()method 
protected function focusChangedInPreview(newFocusAttachment:IAttachment):void

Parameters

newFocusAttachment:IAttachment

getCurrentSkinState()method 
override protected function getCurrentSkinState():String

Returns the current state of this instance, since its skins should have a matching set of states.

Returns
String
getFocusPreview()method 
protected function getFocusPreview():IPreview

Returns
IPreview
invalidatePreviewCard()method 
protected function invalidatePreviewCard():void

keyDownHandler()method 
override protected function keyDownHandler(event:KeyboardEvent):void

Parameters

event:KeyboardEvent

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

Parameters

event:PropertyChangeEvent

onButtonDragExit()method 
protected function onButtonDragExit(event:DragEvent):void

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

Close button is in the child hierarchy of the NavPreview. It does not receive a dragExit until we exit from NavPreview. The only way we can know if we exited from the close button is when we didnt receive a dragOver event on the button, but received a dragOverEvent on NavPreview. Use the below logic to reset the timer.

Parameters

event:DragEvent

onCloseButton()method 
protected function onCloseButton(event:MouseEvent):void

Parameters

event:MouseEvent

onDeleteFolderString()method 
protected function onDeleteFolderString(value:String):void

Parameters

value:String

onDragOver()method 
protected function onDragOver(event:DragEvent):void

Parameters

event:DragEvent

onExtractFolderString()method 
protected function onExtractFolderString(value:String):void

Parameters

value:String

onFieldValueChanged()method 
protected function onFieldValueChanged(e:FieldValueChangedEvent):void

Parameters

e:FieldValueChangedEvent

onNavHostEvent()method 
override protected function onNavHostEvent(event:CollectionManagerEvent):void

Parameters

event:CollectionManagerEvent

onOpenFile()method 
protected function onOpenFile(event:MouseEvent):void

Parameters

event:MouseEvent

onPreviewCardClose()method 
protected function onPreviewCardClose(event:Event):void

Parameters

event:Event

onPreviewCardDataChanged()method 
protected function onPreviewCardDataChanged(val:Object):void

Parameters

val:Object

onPreviewCardEffectEnd()method 
protected function onPreviewCardEffectEnd(event:EffectEvent):void

Parameters

event:EffectEvent

onPreviewCardResize()method 
protected function onPreviewCardResize(event:ResizeEvent):void

Parameters

event:ResizeEvent

onResize()method 
override protected function onResize(event:ResizeEvent):void

Parameters

event:ResizeEvent

onShowInfoString()method 
protected function onShowInfoString(value:String):void

Parameters

value:String

onTimerComplete()method 
protected function onTimerComplete(event:TimerEvent):void

Parameters

event:TimerEvent

partAdded()method 
override protected function partAdded(partName:String, instance:Object):void

Parameters

partName:String
 
instance:Object

resizeCachedThumbs()method 
override protected function resizeCachedThumbs():void

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 state of the skin as well as the state of this instance.

Parameters

stateName:String
 
playTransition:Boolean (default = true)

setElementBounds()method 
protected function setElementBounds(element:IVisualElement, elementSize:Point):void

Parameters

element:IVisualElement
 
elementSize:Point

setPreviewTo()method 
protected function setPreviewTo(force:Boolean = false):void

Parameters

force:Boolean (default = false)

stopPlayback()method 
protected function stopPlayback():void

transitionCurrentState()method 
protected function transitionCurrentState(metaState:String):void

Parameters

metaState:String

Constant Detail
DRAG_DROP_ATTACHMENTSConstant
protected static const DRAG_DROP_ATTACHMENTS:String = attachments

STATE_CARD_PREVIEWConstant 
public static const STATE_CARD_PREVIEW:String = cardPreview

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

The "cardPreview" state for the NavPreview and its skin. This state is active when a single card at the root folder level is being previewed.

STATE_DISABLEDConstant 
public static const STATE_DISABLED:String = disabled

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

The "disabled" state for the NavPreview and its skin.

STATE_FOLDER_CARD_PREVIEWConstant 
public static const STATE_FOLDER_CARD_PREVIEW:String = folderCardPreview

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

The "folderCardPreview" state for the NavPreview and its skin. This state is active when a card from a non-root folder is being previewed.

STATE_FOLDER_PREVIEWConstant 
public static const STATE_FOLDER_PREVIEW:String = folderPreview

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

The "folderPreview" state for the NavPreview and its skin. This state is active when a non-root folder is being displayed.