Packagecom.adobe.portfolio.components
Classpublic class CardList
InheritanceCardList Inheritance spark.components.List
Implements IListenAndWatch
Subclasses CardContainer, DetailsCardList, LinearList, MiniNavList

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  bindableDataGroup : DataGroup
[read-only]
CardList
  dataProvider : IList
[override] [write-only]
CardList
  dragStarted : Boolean = false
Boolean to indicate dragOperation is in progress
CardList
  enableIdle : Boolean
CardList
  useDragDropOnFolders : Boolean = false
To enable dragDrop on folders during drag
CardList
  useDragDropReordering : Boolean = false
To use advanced reordering
CardList
Protected Properties
 PropertyDefined By
  autoListen : AutoListen
CardList
  autoWatch : AutoWatch
CardList
  cardLayout : ICardLayout
CardList
  cardLayoutHelper : CardLayoutHelper
CardList
  focusCardDelta : int
CardList
Public Methods
 MethodDefined By
  
CardList
  
addDragData(dragSource:DragSource):void
[override] Take the data set by the list for ordered items and add it to the attachments data format.
CardList
  
CardList
  
calculateDropLocation(event:DragEvent):DropLocation
Calculate the dropLocation of the dragEvent.
CardList
  
cardFromAttachment(_dataGroup:DataGroup, attachment:Object):ISimpleCard
[static]
CardList
  
collectionDropEnabled(event:DragEvent):Boolean
Helper function that determines whether drag drop is supported
CardList
  
createDropIndicator():DisplayObject
[override]
CardList
  
[static]
CardList
  
[static]
CardList
  
CardList
  
getFolderItemAtDragLocation(dropLocation:DropLocation):IAttachment
Gets the folder item at the drop location
CardList
  
CardList
  
CardList
  
setSelectedIndicesWithChangeDispatch(value:Vector.<int>):void
CardList
  
updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
[override]
CardList
Protected Methods
 MethodDefined By
  
addListener(listener:IEventDispatcher, type:String, handler:Function):void
CardList
  
addWatcher(watcher:ChangeWatcher):void
CardList
  
Returns true if the dataProvider for this list matches the CollectionMgr's currentItems.
CardList
  
dragCompleteHandler(event:DragEvent):void
[override]
CardList
  
dragDropHandler(event:DragEvent):void
[override]
CardList
  
dragEnterHandler(event:DragEvent):void
[override]
CardList
  
dragExitHandler(event:DragEvent):void
[override]
CardList
  
dragOverHandler(event:DragEvent):void
[override]
CardList
  
dragStartHandler(event:DragEvent):void
[override] Overriding the dragStartHandler to set a boolean to indicate that drag has started
CardList
  
handleDragDropReordering(event:DragEvent):void
Handles the actual dragDrop.
CardList
  
handleDropOnFolder(folder:IAttachment, event:DragEvent):IList
Handles drop on a folder
CardList
  
CardList
  
Updates the host selection based on the current list selection.
CardList
  
CardList
  
keyDownHandler(event:KeyboardEvent):void
[override]
CardList
  
makeNewOrderedList(dropIndex:int, droppingItems:ArrayCollection, dragInitiator:IUIComponent):IList
Creates an ordered list of items after the drop.
CardList
  
onChildrenCollectionChange(event:CollectionEvent):void
Once the att's parent has been changed and it has been added to this collection, send the reorder command
CardList
  
onCollectionChange(e:CollectionEvent):void
CardList
  
onCreationComplete(event:FlexEvent):void
CardList
  
onIndexChangeEvent(event:IndexChangeEvent):void
CardList
  
CardList
  
onOpenFolderTimeComplete(evt:TimerEvent):void
CardList
  
onResize(event:ResizeEvent):void
CardList
  
partAdded(partName:String, instance:Object):void
[override]
CardList
  
partRemoved(partName:String, instance:Object):void
[override]
CardList
  
removeListener(listener:IEventDispatcher, type:String = null):void
CardList
  
reorderAttachments(source:IList):Boolean
Send the reorder command once all the attachments are found in the given list
CardList
  
CardList
  
CardList
  
CardList
Public Constants
 ConstantDefined By
  collectionMgr : CollectionManager
The navigator's CollectionManager instance.
CardList
  DRAG_DROP_ATTACHMENTS : String = attachments
[static] Format that defines the set of Acrobat drag and drop attachments.
CardList
  DRAG_DROP_ITEMS : String = itemsByIndex
[static] Format that defines the default set of List drag and drop items.
CardList
Property Detail
autoListenproperty
protected var autoListen:AutoListen

autoWatchproperty 
protected var autoWatch:AutoWatch

bindableDataGroupproperty 
bindableDataGroup:DataGroup  [read-only]

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


Implementation
    public function get bindableDataGroup():DataGroup
cardLayoutproperty 
protected var cardLayout:ICardLayout

cardLayoutHelperproperty 
protected var cardLayoutHelper:CardLayoutHelper

dataProviderproperty 
dataProvider:IList  [write-only] [override]


Implementation
    public function set dataProvider(value:IList):void
dragStartedproperty 
public var dragStarted:Boolean = false

Boolean to indicate dragOperation is in progress

enableIdleproperty 
enableIdle:Boolean


Implementation
    public function get enableIdle():Boolean
    public function set enableIdle(value:Boolean):void
focusCardDeltaproperty 
protected var focusCardDelta:int

useDragDropOnFoldersproperty 
public var useDragDropOnFolders:Boolean = false

To enable dragDrop on folders during drag

useDragDropReorderingproperty 
public var useDragDropReordering:Boolean = false

To use advanced reordering

Constructor Detail
CardList()Constructor
public function CardList()



Method Detail
addDragData()method
override public function addDragData(dragSource:DragSource):void

Take the data set by the list for ordered items and add it to the attachments data format. Acrobat uses that for external drag-drops

Parameters

dragSource:DragSource

addListenAndWatch()method 
public function addListenAndWatch():void

addListener()method 
protected function addListener(listener:IEventDispatcher, type:String, handler:Function):void

Parameters

listener:IEventDispatcher
 
type:String
 
handler:Function

addWatcher()method 
protected function addWatcher(watcher:ChangeWatcher):void

Parameters

watcher:ChangeWatcher

calculateDropLocation()method 
public function calculateDropLocation(event:DragEvent):DropLocation

Calculate the dropLocation of the dragEvent. Returns the drop location for this event, or null if the drop operation is not available.

Parameters

event:DragEvent

Returns
DropLocation
cardFromAttachment()method 
public static function cardFromAttachment(_dataGroup:DataGroup, attachment:Object):ISimpleCard

Parameters

_dataGroup:DataGroup
 
attachment:Object

Returns
ISimpleCard
collectionDropEnabled()method 
public function collectionDropEnabled(event:DragEvent):Boolean

Helper function that determines whether drag drop is supported

Parameters

event:DragEvent

Returns
Boolean
createDropIndicator()method 
override public function createDropIndicator():DisplayObject

Returns
DisplayObject
dataProviderIsCurrent()method 
protected function dataProviderIsCurrent():Boolean

Returns true if the dataProvider for this list matches the CollectionMgr's currentItems. Things like focus and selection should only be propagated to the CollectionMgr if the dataProvider is current.

Returns
Boolean
disableDragAndDrop()method 
public static function disableDragAndDrop():void

dragCompleteHandler()method 
override protected function dragCompleteHandler(event:DragEvent):void

Parameters

event:DragEvent

dragDropHandler()method 
override protected function dragDropHandler(event:DragEvent):void

Parameters

event:DragEvent

dragEnterHandler()method 
override protected function dragEnterHandler(event:DragEvent):void

Parameters

event:DragEvent

dragExitHandler()method 
override protected function dragExitHandler(event:DragEvent):void

Parameters

event:DragEvent

dragOverHandler()method 
override protected function dragOverHandler(event:DragEvent):void

Parameters

event:DragEvent

dragStartHandler()method 
override protected function dragStartHandler(event:DragEvent):void

Overriding the dragStartHandler to set a boolean to indicate that drag has started

Parameters

event:DragEvent

enableDragAndDrop()method 
public static function enableDragAndDrop():void

findCardWithAttachmentFocus()method 
public function findCardWithAttachmentFocus():SimpleCard

Returns
SimpleCard
getFolderItemAtDragLocation()method 
public function getFolderItemAtDragLocation(dropLocation:DropLocation):IAttachment

Gets the folder item at the drop location

Parameters

dropLocation:DropLocation

Returns
IAttachment
handleDragDropReordering()method 
protected function handleDragDropReordering(event:DragEvent):void

Handles the actual dragDrop. However, it does not modify the dataProvider, but invokes makeNewOrderedList to create an ordered list of items after the drop.

Parameters

event:DragEvent

handleDropOnFolder()method 
protected function handleDropOnFolder(folder:IAttachment, event:DragEvent):IList

Handles drop on a folder

Parameters

folder:IAttachment
 
event:DragEvent

Returns
IList
handleFocusChange()method 
protected function handleFocusChange(event:NavHostEvent):void

Parameters

event:NavHostEvent

handleSelectionChanged()method 
protected function handleSelectionChanged():void

Updates the host selection based on the current list selection.

initializeSelectionFromHost()method 
protected function initializeSelectionFromHost():Boolean

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

Parameters

event:KeyboardEvent

makeNewOrderedList()method 
protected function makeNewOrderedList(dropIndex:int, droppingItems:ArrayCollection, dragInitiator:IUIComponent):IList

Creates an ordered list of items after the drop.

Parameters

dropIndex:int
 
droppingItems:ArrayCollection
 
dragInitiator:IUIComponent

Returns
IList
onChildrenCollectionChange()method 
protected function onChildrenCollectionChange(event:CollectionEvent):void

Once the att's parent has been changed and it has been added to this collection, send the reorder command

Parameters

event:CollectionEvent

onCollectionChange()method 
protected function onCollectionChange(e:CollectionEvent):void

Parameters

e:CollectionEvent

onCreationComplete()method 
protected function onCreationComplete(event:FlexEvent):void

Parameters

event:FlexEvent

onIndexChangeEvent()method 
protected function onIndexChangeEvent(event:IndexChangeEvent):void

Parameters

event:IndexChangeEvent

onNavHostEvent()method 
protected function onNavHostEvent(event:NavHostEvent):void

Parameters

event:NavHostEvent

onOpenFolderTimeComplete()method 
protected function onOpenFolderTimeComplete(evt:TimerEvent):void

Parameters

evt:TimerEvent

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

Parameters

event:ResizeEvent

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

Parameters

partName:String
 
instance:Object

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

Parameters

partName:String
 
instance:Object

removeListenAndWatch()method 
public function removeListenAndWatch():void

removeListener()method 
protected function removeListener(listener:IEventDispatcher, type:String = null):void

Parameters

listener:IEventDispatcher
 
type:String (default = null)

reorderAttachments()method 
protected function reorderAttachments(source:IList):Boolean

Send the reorder command once all the attachments are found in the given list

Parameters

source:IList

Returns
Boolean
resizeCachedThumbs()method 
protected function resizeCachedThumbs():void

setFocusOnIndexChange()method 
protected function setFocusOnIndexChange(attachment:IAttachment):void

Parameters

attachment:IAttachment

setSelectedIndexWithChangeDispatch()method 
public function setSelectedIndexWithChangeDispatch(value:int):void

Parameters

value:int

setSelectedIndicesWithChangeDispatch()method 
public function setSelectedIndicesWithChangeDispatch(value:Vector.<int>):void

Parameters

value:Vector.<int>

updateRenderer()method 
override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void

Parameters

renderer:IVisualElement
 
itemIndex:int
 
data:Object

updateSelection()method 
protected function updateSelection():void

Constant Detail
collectionMgrConstant
public const collectionMgr:CollectionManager

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

DRAG_DROP_ATTACHMENTSConstant 
public static const DRAG_DROP_ATTACHMENTS:String = attachments

Format that defines the set of Acrobat drag and drop attachments.

DRAG_DROP_ITEMSConstant 
public static const DRAG_DROP_ITEMS:String = itemsByIndex

Format that defines the default set of List drag and drop items.