Packagecom.sibirjak.angara.sequence
Classpublic class PagedSequence
InheritancePagedSequence Inheritance Sequence Inheritance AbstractLoaderItem Inheritance AbstractProgressInfo Inheritance flash.events.EventDispatcher
ImplementsIPagedSequence

A paged sequence enables loading of only a range of containing loaders at a time.

Since the Sequence removes all loaders from its internal list, we need to make up another loaders list here, which keeps references to the loaders after they have been finished. This list is index based for an easy spefication of the range of loaders to be loaded at next. The list will be removed automatically after all loader items have been finished.

For performance reasons the PagedSequence stores all waiting loaders (status LoaderItemStatus.WAITING) in a separate list. The iterator of this list will be considered by the Schedules nextItems() method.



Public Properties
 PropertyDefined by
 InheriteditemType : String
The type of the loader item.
AbstractLoaderItem
 Inheritedkey : String
Returns the identifying key of the loader item.
AbstractLoaderItem
 InheritednumItems : uint
Returns the number of items to be loaded within the loader item.
AbstractProgressInfo
 InheritednumItemsFailed : uint
Returns the number of items failed within the loader item.
AbstractProgressInfo
 InheritednumItemsLoaded : uint
Returns the number of items loaded within the loader item.
AbstractProgressInfo
 Inheritedprogress : Number
Returns the progress of the loader item as a decimal value between zero and 1.
AbstractProgressInfo
 Inheritedscheduled : Boolean
Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.
AbstractLoaderItem
 Inheritedstatus : String
The current loading status.
AbstractLoaderItem
Protected Properties
 PropertyDefined by
 Inherited_isScheduled : Boolean = false
The schedule marker.
AbstractLoaderItem
 Inherited_key : String
The key used for debugging purposes.
AbstractLoaderItem
 Inherited_numItems : uint = 0
The number of items added.
AbstractProgressInfo
 Inherited_numItemsFailed : uint = 0
The number of items failed loading.
AbstractProgressInfo
 Inherited_numItemsLoaded : uint = 0
The number of items alredy loaded.
AbstractProgressInfo
 Inherited_progress : Number = 0
The overall progress of the item.
AbstractProgressInfo
 Inherited_status : String
The loader item status.
AbstractLoaderItem
 Inherited_type : String
The loader item type.
AbstractLoaderItem
Public Methods
 MethodDefined by
  
Creates a new PagedSequence object.
PagedSequence
  
activateLoaders(index:uint, numItems:uint):void
Resumes all loaders in the specified range and pauses all other currently waiting loaders.
PagedSequence
 Inherited
add(resourceLoader:IResourceLoader, weight:uint = 0):void
Adds a new resource loader to the sequence.
Sequence
  
clear():void
Stops all loaders and removes all loader references from the sequence.
PagedSequence
  
getResourceLoaderIterator(cursor:uint = 0):IIterator
Returns in iterator over all scheduled resource loaders.
PagedSequence
  
iterator(cursor:*):IIterator
Returns an iterator over all not paused resource loaders.
PagedSequence
 Inherited
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
Sequence
 Inherited
remove(resourceLoader:IResourceLoader):void
Removes a loader from a sequence.
Sequence
 Inherited
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
Sequence
 Inherited
stop():void
Immediately stops loading of the item or its containing items.
Sequence
 Inherited
toString():String
Info
Sequence
Protected Methods
 MethodDefined by
 Inherited
dispatchAdd(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.ADD event.
Sequence
 Inherited
Dispatches the SequenceEvent.COMPLETE event.
Sequence
 Inherited
Dispatches the SequenceEvent.PAUSE event.
Sequence
 Inherited
Dispatches the SequenceEvent.PROGRESS event.
Sequence
 Inherited
dispatchRemove(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.REMOVE event.
Sequence
 Inherited
Dispatches the SequenceEvent.RESUME event.
Sequence
 Inherited
dispatchStop():void
Dispatches the SequenceEvent.STOP event.
Sequence
  
loaderAdded(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource loader has been added but before the sequence dispatches the ADD event.
PagedSequence
  
loaderFinished(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been finished.
PagedSequence
  
loaderPaused(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been paused.
PagedSequence
  
loaderRemoved(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource loader has been removed.
PagedSequence
  
loaderResumed(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been resumed but before the sequence dispatches its RESUME event.
PagedSequence
  
Template method to notify subclasses after the internal monitor has been completed but before the sequence dispatches its COMPLETE event.
PagedSequence
Constructor detail
PagedSequence()constructor
public function PagedSequence()

Creates a new PagedSequence object.

Method detail
activateLoaders()method
public function activateLoaders(index:uint, numItems:uint):void

Resumes all loaders in the specified range and pauses all other currently waiting loaders.

Parameters
index:uint — The index of the first resource loader.
 
numItems:uint — The number of loaders to be resumed.
clear()method 
public override function clear():void

Stops all loaders and removes all loader references from the sequence.

getResourceLoaderIterator()method 
public function getResourceLoaderIterator(cursor:uint = 0):IIterator

Returns in iterator over all scheduled resource loaders.

Parameters
cursor:uint (default = 0) — Not supported.

Returns
IIterator — Iterator over all resource loaders added to the paged sequence.
iterator()method 
public override function iterator(cursor:*):IIterator

Returns an iterator over all not paused resource loaders.

Parameters
cursor:* — Not supported.

Returns
IIterator — Iterator over all not paused resource loaders.
loaderAdded()method 
protected override function loaderAdded(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource loader has been added but before the sequence dispatches the ADD event.

Parameters
resourceLoader:IResourceLoader
loaderFinished()method 
protected override function loaderFinished(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been finished.

Parameters
resourceLoader:IResourceLoader
loaderPaused()method 
protected override function loaderPaused(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been paused.

Parameters
resourceLoader:IResourceLoader
loaderRemoved()method 
protected override function loaderRemoved(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource loader has been removed.

Parameters
resourceLoader:IResourceLoader
loaderResumed()method 
protected override function loaderResumed(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been resumed but before the sequence dispatches its RESUME event.

Parameters
resourceLoader:IResourceLoader
sequenceComplete()method 
protected override function sequenceComplete():void

Template method to notify subclasses after the internal monitor has been completed but before the sequence dispatches its COMPLETE event.