SWC Managers

The managers package of the teotiGraphix package holds mostly singleton class implementations.

Classes or SWC files located in this package manage or control a specific global action or user interface component-set. Usually you will use a static method of the class or a getInstance() call to the class reference itself to obtain the single instance of the managing class.

The ResizeManagerFX class is an example where you would use;

 import com.teotiGraphix.managers.ResizeManagerFX;
...
/**
 * Create the window.
 */
private function createResizeWindow():void
{
	var myWindow:TitleWindow = new TitleWindow();
	myWindow.title = "A resize window";
	// a one step proccess adds resize to the window
	ResizeManagerFX.addClient(myWindow);
	PopUpManager.createPopUp.(myWindow, this);
	PopUpManager.centerPopUp.(myWindow);
}

The example above imports the ResizeManagerFX class and calls the static method addClient() of the class. When using a manager class you will never call;

var manager:ManagerClass = new ManagerClass();

If AS3 had implemented private constructors, this is a place that would use them to prohibit outside instantiation of an instance of the class.

The classes in the managers package will help you operate on other components in the same Application. The resize manager helps resize IChildList UIComponents.

Managers are very powerful design patterns when used with the UIComponents because of the abstract function of their class.

Privacy Policy | Copyright Notice| Disclaimer| Product EULA
©2003-2008 Teoti Graphix, LLC - All rights reserved.