GODPAPER | All Packages | All Classes | Index | Frames No Frames |
TaskGroup

Package | com.adobe.cairngorm.task
Class | public class TaskGroup
Inheritance | TaskGroup Task flash.events.EventDispatcher
Implements | ITaskGroup
Subclasses | ParallelTask, SequenceTask

A base-class for task groups which implements the `children` and `size` properties.

Default MXML Property `children`

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | children : Array | TaskGroup
|  | currentState : String [read-only] | Task
|  | enabled : Boolean | Task
|  | label : String | Task
|  | processed : uint [read-only] | TaskGroup
|  | size : uint [read-only] | TaskGroup

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TaskGroup() | TaskGroup
|  | addChild(child:ITask):void | TaskGroup
|  | removeChild(child:ITask):void | TaskGroup
|  | start():void | Task

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | complete():void This should be called by a concrete sub-class to indicate that the task has been completed. | Task
|  | fault(message:String = null):void This should be called by a concrete sub-class to indicate that the task has been halted due to a fault. | Task
|  | onChildTaskComplete(event:TaskEvent):void This event handler is called whenever a child task completes. | TaskGroup
|  | onChildTaskFault(event:TaskEvent):void This event handler is called whenever a child task fails. | TaskGroup
|  | onChildTaskStart(event:TaskEvent):void This event handler is called whenever a child task is started. | TaskGroup
|  | performTask():void This abstract template method must be implemented by a concrete sub-class to perform the task associated with the task. | Task
|  | processChild(child:ITask):Boolean Processes the specified child by starting it if it is enabled or skipping it if it is disabled. | TaskGroup

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | childComplete |  | TaskGroup
|  | childFault |  | TaskGroup
|  | childStart |  | TaskGroup
|  | currentStateChange |  | Task
|  | taskComplete |  | Task
|  | taskFault |  | Task
|  | taskProgress |  | TaskGroup
|  | taskStart |  | Task

Property Detail

children | property

`children:Array`

Implementation
`public function get children():Array`
`public function set children(value:Array):void`

processed | property |

`processed:uint` [read-only]

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

Implementation
`public function get processed():uint`

size | property |

`size:uint` [read-only]

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

Implementation
`public function get size():uint`
Constructor Detail

TaskGroup | () | Constructor

`public function TaskGroup()`

Method Detail

addChild | () | method

`public function addChild(child:ITask):void`

Parameters

| `child:ITask`

onChildTaskComplete | () | method |

`protected function onChildTaskComplete(event:TaskEvent):void`

This event handler is called whenever a child task completes. It can be overridden, but the `super.onChildTaskComplete()` method should be called.

Parameters

| `event:TaskEvent`

onChildTaskFault | () | method |

`protected function onChildTaskFault(event:TaskEvent):void`

This event handler is called whenever a child task fails. It can be overridden, but the `super.onChildTaskFault()` method should be called.

Parameters

| `event:TaskEvent`

onChildTaskStart | () | method |

`protected function onChildTaskStart(event:TaskEvent):void`

This event handler is called whenever a child task is started. It can be overridden, but the `super.onChildTaskStart()` method should be called.

Parameters

| `event:TaskEvent`

processChild | () | method |

`protected function processChild(child:ITask):Boolean`

Processes the specified child by starting it if it is enabled or skipping it if it is disabled.

Parameters

| `child:ITask` — the child task to start processing

Returns

| `Boolean` — true if the child task is started or false if it is skipped

removeChild | () | method |

`public function removeChild(child:ITask):void`

Parameters

| `child:ITask`

Event Detail

childComplete | Event

Event Object Type: `com.adobe.cairngorm.task.TaskEvent`

childFault | Event |

Event Object Type: `com.adobe.cairngorm.task.TaskEvent`

childStart | Event |

Event Object Type: `com.adobe.cairngorm.task.TaskEvent`

taskProgress | Event |

Event Object Type: `com.adobe.cairngorm.task.TaskEvent`

Thu Jan 16 2014, 01:11 PM +08:00