| Package | system.ioc |
| Class | public class ObjectDefinitionContainer |
| Inheritance | ObjectDefinitionContainer CoreAction Task Object |
| Implements | IObjectDefinitionContainer |
| Subclasses | ObjectFactory |
Example :
import flash.text.TextField ;
import flash.text.TextFormat ;
import system.ioc.ObjectDefinition ;
import system.ioc.ObjectDefinitionContainer ;
import system.ioc.ObjectFactory ;
var container:ObjectDefinitionContainer = new ObjectFactory();
var context:Object =
{
id : "my_field" ,
type : "flash.text.TextField" ,
properties :
[
{ name:"defaultTextFormat" , value:new TextFormat("Verdana", 11) } ,
{ name:"selectable" , value:false } ,
{ name:"text" , value:"hello world" } ,
{ name:"textColor" , value:0xF7F744 } ,
{ name:"x" , value:100 } ,
{ name:"y" , value:100 }
]
}
var definition:ObjectDefinition = ObjectDefinition.create( context ) ;
container.addObjectDefinition( definition );
var field:TextField = (container as ObjectFactory).getObject("my_field") as TextField ;
addChild(field) ;
| Property | Defined By | ||
|---|---|---|---|
![]() | changeIt : Signaler
This signal emit when the notifyChanged method is invoked. | CoreAction | |
![]() | clearIt : Signaler
This signal emit when the notifyCleared method is invoked. | CoreAction | |
![]() | finishIt : Signaler
This signal emit when the notifyFinished method is invoked. | Task | |
![]() | infoIt : Signaler
This signal emit when the notifyInfo method is invoked. | CoreAction | |
![]() | logger : Logger
Determinates the internal Logger reference of this Loggable object. | Task | |
![]() | looping : Boolean
The flag to determinate if the Action object is looped. | CoreAction | |
![]() | loopIt : Signaler
This signal emit when the notifyLooped method is invoked. | CoreAction | |
| numObjectDefinitions : uint [read-only]
Indicates the numbers of object definitions registered in the container. | ObjectDefinitionContainer | ||
![]() | pauseIt : Signaler
This signal emit when the notifyPause method is invoked. | CoreAction | |
![]() | phase : String [read-only]
The current phase of the action. | Task | |
![]() | progressIt : Signaler
This signal emit when the notifyProgress method is invoked. | CoreAction | |
![]() | resumeIt : Signaler
This signal emit when the notifyResumed method is invoked. | CoreAction | |
![]() | running : Boolean [read-only]
Indicates true if the process is in progress. | Task | |
![]() | startIt : Signaler
This signal emit when the notifyStarted method is invoked. | Task | |
![]() | stopIt : Signaler
This signal emit when the notifyStopped method is invoked. | CoreAction | |
![]() | timeoutIt : Signaler
This signal emit when the notifyTimeOut method is invoked. | CoreAction | |
| Method | Defined By | ||
|---|---|---|---|
Creates a new ObjectDefinitionContainer instance. | ObjectDefinitionContainer | ||
addObjectDefinition(definition:IObjectDefinition):void
Registers a new object definition in the container. | ObjectDefinitionContainer | ||
clearObjectDefinition():void
Removes all the object definitions register in the container. | ObjectDefinitionContainer | ||
clone():* [override]
Returns a shallow copy of this object. | ObjectDefinitionContainer | ||
containsObjectDefinition(id:String):Boolean
Returns true if the object defines with the specified id is register in the container. | ObjectDefinitionContainer | ||
getObjectDefinition(id:String):IObjectDefinition
Returns the IObjectDefinition object register in the container with the specified id. | ObjectDefinitionContainer | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyChanged():void
Notify when the process is changed. | CoreAction | |
![]() | notifyCleared():void
Notify when the process is cleared. | CoreAction | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyInfo(info:*):void
Notify a specific information when the process is changed. | CoreAction | |
![]() | notifyLooped():void
Notify when the process is looped. | CoreAction | |
![]() | notifyPaused():void
Notify when the process is paused. | CoreAction | |
![]() | notifyProgress():void
Notify when the process is in progress. | CoreAction | |
![]() | notifyResumed():void
Notify when the process is resumed. | CoreAction | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
![]() | notifyStopped():void
Notify when the process is stopped. | CoreAction | |
![]() | notifyTimeOut():void
Notify when the process is out of time. | CoreAction | |
removeObjectDefinition(id:String):void
Unregisters an object definition in the container. | ObjectDefinitionContainer | ||
![]() | run(... arguments):void
Run the process. | Task | |
![]() | unlock():void
Unlocks the display. | Task | |
| numObjectDefinitions | property |
numObjectDefinitions:uint [read-only] Indicates the numbers of object definitions registered in the container.
public function get numObjectDefinitions():uint| ObjectDefinitionContainer | () | Constructor |
public function ObjectDefinitionContainer()Creates a new ObjectDefinitionContainer instance.
| addObjectDefinition | () | method |
public function addObjectDefinition(definition:IObjectDefinition):voidRegisters a new object definition in the container.
Parameters
definition:IObjectDefinition — The Identifiable ObjectDefinition reference to register in the container.
|
ArgumentError — If the specified object definition is null or if this id attribut is null.
|
| clearObjectDefinition | () | method |
public function clearObjectDefinition():voidRemoves all the object definitions register in the container.
| clone | () | method |
override public function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| containsObjectDefinition | () | method |
public function containsObjectDefinition(id:String):Boolean
Returns true if the object defines with the specified id is register in the container.
Parameters
id:String — The id of the ObjectDefinition to search.
|
Boolean — true if the object defines with the specified id is register in the container.
|
| getObjectDefinition | () | method |
public function getObjectDefinition(id:String):IObjectDefinitionReturns the IObjectDefinition object register in the container with the specified id.
Parameters
id:String — the id name of the ObjectDefinition to return.
|
IObjectDefinition — the IObjectDefinition object register in the container with the specified id.
|
ArgumentError — If the specified object definition don't exist in the container.
|
| removeObjectDefinition | () | method |
public function removeObjectDefinition(id:String):voidUnregisters an object definition in the container.
Parameters
id:String — The id of the object definition to remove.
|
ArgumentError — If the specified object definition don't exist in the container.
|