CollectionManager acts as a layer between navigator components and an INavigatorHost
for managing the collection of files in the Portfolio. All host interactions
should go through a CollectionManager instance, rather than through the INavigatorHost directly.
Indicates the current folder whose contents are being viewed,
or null if the root is currently being viewed.
The items of the folder that is returned correspond
to the currentItems property of this folder. When a new
current folder is set, the SelectedItems array is set to [], since
the current folder has been changed, so there are no selected items yet.
This property can be used as the source for data binding.
Implementation public function get currentFolder():IAttachment public function set currentFolder(value:IAttachment):void
Indicates the items currently being viewed.
The items in this collection are contained in the object
specified by currentFolder.
This property will be null until the instance has been enabled.
This property can be used as the source for data binding.
public var defaultFocusItem:IFocusManagerComponent
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
A UI component that's suitable for receiving focus by default.
embeddedFontList
property
embeddedFontList:Array
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
This function returns the array of fonts that are embedded
in the portfolio.
This property can be used as the source for data binding.
Implementation public function get embeddedFontList():Array public function set embeddedFontList(value:Array):void
enabled
property
enabled:Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
true if the collectionManager instance is enabled,
false otherwise. rootItems and currentItems will
be null until the instance is enabled.
Implementation public function get enabled():Boolean public function set enabled(value:Boolean):void
fields
property
fields:Array
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
The array of fields displayed in the Files view of the Portfolio
This property can be used as the source for data binding.
Implementation public function get fields():Array public function set fields(value:Array):void
fileName
property
fileName:String [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Returns the file name of the collection,
or the empty string if the host or the collection is null.
Implementation public function get fileName():String
fixedNavigatorColorPalette
property
fixedNavigatorColorPalette:Object
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Indicates the fixed navigator color palette, if there is one.
Some navigators (such as Details) want to always have the same look independent
of the host color palette changed, unless a high contrast color palette is used.
Implementation public function get fixedNavigatorColorPalette():Object public function set fixedNavigatorColorPalette(value:Object):void
Indicates the current IAttachment considered to have focus. This may be null.
This property can be used as the source for data binding.
Implementation public function get focusAttachment():IAttachment public function set focusAttachment(value:IAttachment):void
focusIndex
property
focusIndex:int
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Indicates the index of the current focus attachment.
focusIndex is used to keep track of what IAttachment
is currently in focus and what its next and previous attachments are.
focusIndex can be set explicitly by set focusIndex(), or indirectly
by handleNewFocus().
This property can be used as the source for data binding.
Implementation public function get focusIndex():int public function set focusIndex(value:int):void
Indicates the current INavigatorHost used to communicate with the viewing application.
When the navigator host changes, the old host's event listeners are removed and
the following new event listerners are added to the new navigator host:
"currentFolderChanged", "navigatorColorPaletteChanged",
RightClickEvent.RIGHT_CLICK, "needsSave", "permissionsChanged",
PropertyChangeEvent.PROPERTY_CHANGE, PropertyChangeEvent.PROPERTY_CHANGE,
"applicationFontListChanged". Also, events of type CollectionManagerEvent.HOST_CHANGED_KIND
and CollectionManagerEvent.PERMISSIONS_CHANGED_KIND are dispatched so that clients can properly
handle these events.
This property can be used as the source for data binding.
A static instance that can be shared by Flex components.
Implementation public static function get instance():CollectionManager
isNavPreviewCardPreview
property
isNavPreviewCardPreview:Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Indicates whether a card is being previewing in the NavPreview component
This property can be used as the source for data binding.
Implementation public function get isNavPreviewCardPreview():Boolean public function set isNavPreviewCardPreview(value:Boolean):void
localeLanguagePrefix
property
localeLanguagePrefix:String [read-only]
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Returns the prefix for the locale language, for example "en" or "fr"
Implementation public function get localeLanguagePrefix():String
newOrderedList
property
public var newOrderedList:IList
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
A cache of the newly ordered list. This needs to be sent over the bridge for reordering.
Since we can reorder between folders and hence can be in different lists alltogether,
this has to be cached centrally.
Indicates the attachment following focusAttachment in the current sort order. This may be null.
This property can be used as the source for data binding.
Implementation public function get prevAttachment():IAttachment public function set prevAttachment(value:IAttachment):void
queueRootItems
property
public var queueRootItems:Boolean = true
If true, then attachments will be added to the rootItems collection incrementally,
rather than all at once. This can improve startup performance for navigators whose
startup performance is dependent on the number of root items.
public function dispatchPartRemoved(oldPart:Object):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Dispatches a CollectionManagerEvent indicating that a skin part has been removed.
This allows skin parts to listen for events from the collection manager so that cleanup
(removing event listeners) can be performed.
Parameters
oldPart:Object
See also
CollectionManagerEvent.PART_REMOVED_KIND
focusAndSelectionEventsSuspended
()
method
public function focusAndSelectionEventsSuspended():Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Returns true if Focus and Selection Events are currently suspended;
false otherwise.
Returns
Boolean
getCurrentIndex
()
method
public function getCurrentIndex(attachment:IAttachment):int
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Returns the index of attachment in currentItems,
or -1 if currentItems does not contain attachment.
public function getDefaultFontName(includeDefaultFont:Boolean):String
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
This function returns the name of the application's default font.
This includes some language-dependent overrides on the application font.
The usual default is "Myriad Pro". If there is no default font, the
string "applicationFont" is returned.
Parameters
includeDefaultFont:Boolean
Returns
String
getDirty
()
method
public function getDirty(response:Function):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Asynchronously returns the state of the host collection dirty flag.
Parameters
response:Function
See also
ICollection.getDirty
handleCurrentFolder
()
method
protected function handleCurrentFolder(newFolder:IAttachment):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
This function adjusts the state of the CollectionManager, given a new current folder.
This function returns true if "Myriad Pro" font is
supported, false otherwise. "Myriad Pro" is the usual default font.
Returns
Boolean
itemsAreCurrent
()
method
public function itemsAreCurrent(dataProvider:IList):Boolean
Returns true if the dataProvider for a list matches the CollectionMgr's currentItems.
Things like focus and selection should only be propagated to the CollectionMgr if the
dataProvider is current.
Parameters
dataProvider:IList
Returns
Boolean
onCollectionPropagateEvent
()
method
protected function onCollectionPropagateEvent(event:Event):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
A listener that receives events from host.collection and propagates them using NavHostEvents.
Parameters
event:Event
onCollectionPropertyChanged
()
method
protected function onCollectionPropertyChanged(evt:PropertyChangeEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
A listener to handle changes to properties on host.collection.
Parameters
evt:PropertyChangeEvent
onCurrentFolderChanged
()
method
protected function onCurrentFolderChanged(evt:Event):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Listener to handle folder changes from the host.
Parameters
evt:Event
onCurrentItemsChange
()
method
protected function onCurrentItemsChange(evt:CollectionEvent):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
A listener that adjusts the current focus when currentItems changes.
Parameters
evt:CollectionEvent
onGotoNextAttachment
()
method
public function onGotoNextAttachment(evt:Event):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
An event listener that gives focus to the next attachment, if it exists.
Parameters
evt:Event
onGotoPreviousAttachment
()
method
public function onGotoPreviousAttachment(evt:Event):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
An event listener that gives focus to the previous attachment, if it exists.
Parameters
evt:Event
onHostPropertyChanged
()
method
protected function onHostPropertyChanged(event:Event):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Listener to handle simple property changes from the host.
protected function setCurrentItems(value:IList):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Takes the IList of items passed to it and make these
the list of currentItems. It broadcasts appropriate events
so that clients can respond to the change in current items.
Parameters
value:IList
setDirty
()
method
public function setDirty():void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Marks the host collection as "dirty", which enables Save in the application UI.
setHostFromApplication
()
method
public function setHostFromApplication(val:INavigatorHost, app:Application):Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Sets the host to be used by this class in the context of the given application.
Applications that are not Adobe-supported may have limited functionality.
public function suspendFocusAndSelectionEvents():void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Calling this function tells the navigator to ignore focus changes.
This is useful when a series of events need to occur before the actual focus change.
unsuspendFocusAndSelectionEvents
()
method
public function unsuspendFocusAndSelectionEvents():void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
This function turns off the previously called suspension
of Focus and Selection Events.
There may be multiple calls to suspendFocusAndSelectionEvents(),
so the navigator maintains a count of the number of such calls.
For each call to suspendFocusAndSelectionEvents() you must have a
matching call to unsuspendFocusAndSelectionEvents() before the focus
change will be handled.
updateColorPalette
()
method
public function updateColorPalette(paletteObject:Object):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Updates the color palette used by the viewing application
to be the palette passed to updateColorPalette().