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.
The internal representation of the AttachmentCollection referenced by the currentItems getter.
For now, _currentItems is always the same object, but it's contents are swapped out.
If the object itself is going to change, then it needs to be Bindable
_fields
property
protected var _fields:Array
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Internal representation of the fields array referenced by the fields getter and setter.
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
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 [read-only]
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 application.
Implementation public function get embeddedFontList():Array
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.
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 value of _FocusIndex.
_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 NavHostEventKind.HOST_CHANGED
and NavHostEventKind.PERMISSIONS_CHANGED are dispatched so that clients can properly
handle these events.
This property can be used as the source for data binding.
A NavHostManager static instance that can be shared by Flex components.
Implementation public static function get instance():CollectionManager
isNavPreviewEnabled
property
isNavPreviewEnabled:Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Indicates whether previewing is enabled or not in the Navigator
for the currently selected item.
Implementation public function get isNavPreviewEnabled():Boolean public function set isNavPreviewEnabled(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.
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 NavHostEvent 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
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
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 onSelectionChanged(value:Array):void
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Listener to handle selection changes from the host.
Parameters
value:Array
permissionCheck
()
method
public function permissionCheck(category:String, permission:String):Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Returns true if the given category/permission combination is allowed in the host,
or false otherwise.
Parameters
category:String
permission:String
Returns
Boolean
See also
IPermissions.check
queryAdobeHost
()
method
public function queryAdobeHost(app:Application):Boolean
Language Version :
ActionScript 3.0
Product Version :
Portfolio 10.0
Runtime Versions :
Flash Player 10.1, AIR 2.0
Functionality is still TBD
Parameters
app:Application
Returns
Boolean
setCurrentItems
()
method
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
The use and meaning of this function needs to be filled in once
the functionality of queryAdobeHost is finalized.
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 suspendFocusAndSelectionEvents() 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().