Package | com.ericfeminella.managers |
Class | public class DisplayObjectContainerManager |
Method | Defined by | ||
---|---|---|---|
DisplayObjectContainerManager(privateAccessClass:PrivateAccessClass)
DisplayObjectContainerManager constructor takes a single parameter of type
PrivateAccessClass
which effectively restricts constructor access to private
If a value of null is passed to constructor an error of type DisplayObjectContainerManager constructor checks to see if static member Usage Example: import com.ericfeminella.managers.DisplayObjectContainerManager; private function switchContainer():void { var containerManager:DisplayObjectContainerManager = DisplayObjectContainerManager.getInstance(); containerManager.relocate(this.leftPanel, this.rightPanel, this.textArea); } | DisplayObjectContainerManager | ||
destroyInstance():void
[static]
Static function which runs a similar evaluation as that of
getInstance but in reverse order. | DisplayObjectContainerManager | ||
[static]
Static function which runs evaluation to determine if an instance of DisplayObjectContainerManager
has been instantiated.
| DisplayObjectContainerManager | ||
relocate(originalContainer:DisplayObjectContainer, newContainer:DisplayObjectContainer, childDisplayObject:*):void
relocates a child object to a new container and retains the child objects current state once relocated
If any of the arguments are null the operation will throw an Error | DisplayObjectContainerManager |
DisplayObjectContainerManager | () | constructor |
public function DisplayObjectContainerManager(privateAccessClass:PrivateAccessClass)
DisplayObjectContainerManager constructor takes a single parameter of type PrivateAccessClass
which effectively restricts constructor access to private
If a value of null is passed to constructor an error of type DisplayObjectContainerManagerError
is thrown
DisplayObjectContainerManager constructor checks to see if static member instance
is null
If so, then static instance
is set to DisplayObjectContainerManager
Usage Example: import com.ericfeminella.managers.DisplayObjectContainerManager; private function switchContainer():void { var containerManager:DisplayObjectContainerManager = DisplayObjectContainerManager.getInstance(); containerManager.relocate(this.leftPanel, this.rightPanel, this.textArea); }Parameters
privateAccessClass:PrivateAccessClass — private class which restricts constructor access to class definition only
|
— DisplayObjectContainerManagerError
|
See also
destroyInstance | () | method |
public static function destroyInstance():void
Static function which runs a similar evaluation as that of getInstance
but in reverse order.
If an instance of DisplayObjectContainerManager has been instantiated it is set to null, and thus destroyed
from all references of DisplayObjectContainerManager instance
DisplayObjectContainerManager.destroyInstance();
getInstance | () | method |
public static function getInstance():DisplayObjectContainerManager
Static function which runs evaluation to determine if an instance of DisplayObjectContainerManager has been instantiated. If so it returns the singleton instance. If not then an instance is instantiated and returned
var containerManager:DisplayObjectContainerManager = DisplayObjectContainerManager.getInstance();
DisplayObjectContainerManager —
DisplayObjectContainerManager the singleton instance of DisplayObjectContainerManager
|
relocate | () | method |
public function relocate(originalContainer:DisplayObjectContainer, newContainer:DisplayObjectContainer, childDisplayObject:*):void
relocates a child object to a new container and retains the child objects current state once relocated
If any of the arguments are null the operation will throw an Error
ParametersoriginalContainer:DisplayObjectContainer — the original container of the child object
|
|
newContainer:DisplayObjectContainer — the new container of the child object
|
|
childDisplayObject:* — the child object to relocate
|
See also