Packageorg.aswing
Classpublic class AsWingManager

The main manager for AsWing framework.

You may need to call setRoot() to set a default root container for AsWing Popups.

See also

JPopup


Public Methods
 MethodDefined by
  
callLater(func:Function, time:int = 40):void
[static]
AsWingManager
  
callNextFrame(func:Function):void
[static] Adds a function to the queue to be invoked at next enter frame time
AsWingManager
  
[static] Returns the stage initial size.
AsWingManager
  
getRoot(checkError:Boolean = true):DisplayObjectContainer
[static] Returns the root container which components base on.
AsWingManager
  
getStage(checkError:Boolean = true):Stage
[static] Returns the stage inited by initAsStandard() or setRoot.
AsWingManager
  
initAsStandard(root:DisplayObjectContainer, _preventNullFocus:Boolean = true, workWithFlex:Boolean = false):void
[static] Init AsWing as a standard setting.
AsWingManager
  
initStage(theStage:Stage):void
[static] Init the stage for AsWing, this method should be better called when flashplayer start.
AsWingManager
  
[static] Returns the preventNullFocus property.
AsWingManager
  
isStageInited():Boolean
[static] Returns whether or not stage is set to the manager.
AsWingManager
  
setInitialStageSize(width:int, height:int):void
[static] Sets the intial stage size, this method generally do not need to use.
AsWingManager
  
setPreventNullFocus(prevent:Boolean):void
[static] Sets whether or not prevent focus transfer to null when user click a blank(not focusable object).
AsWingManager
  
setRoot(root:DisplayObjectContainer):void
[static] Sets the root container for AsWing components based on.
AsWingManager
  
updateAfterMilliseconds(delay:int = 20):void
[static] Force the screen to be updated after a time.
AsWingManager
Method detail
callLater()method
public static function callLater(func:Function, time:int = 40):voidParameters
func:Function
 
time:int (default = 40)
callNextFrame()method 
public static function callNextFrame(func:Function):void

Adds a function to the queue to be invoked at next enter frame time

Parameters
func:Function — the function to be invoked at next frame
getInitialStageSize()method 
public static function getInitialStageSize():IntDimension

Returns the stage initial size.

Returns
IntDimension — the size.
getRoot()method 
public static function getRoot(checkError:Boolean = true):DisplayObjectContainer

Returns the root container which components base on. If you have not set a specified root, the first stage will be the root to be returned.

Take care to use this method if you are working on a multiple native windows AIR project, because there maybe more than one stage.

Parameters
checkError:Boolean (default = true) — whethor or not check root is inited set.

Returns
DisplayObjectContainer — the root container, or null--not root set and AsWingManager not stage inited.

Throws
— if checkError and both root and stage is null.

See also

getStage()method 
public static function getStage(checkError:Boolean = true):Stage

Returns the stage inited by initAsStandard() or setRoot.

Take care to use this method if you are working on a multiple native windows AIR project, because there maybe more than one stage.

Parameters
checkError:Boolean (default = true) — whethor or not check is stage is inited set.

Returns
Stage — the stage.

Throws
— if checkError and stage is null.

See also

initAsStandard()method 
public static function initAsStandard(root:DisplayObjectContainer, _preventNullFocus:Boolean = true, workWithFlex:Boolean = false):void

Init AsWing as a standard setting. This method is very important for your App.

Parameters
root:DisplayObjectContainer — the default root container for aswing popups, or null to make no default root.
 
_preventNullFocus:Boolean (default = true) — set true to prevent focus transfer to null, false, not manage to do this
 
workWithFlex:Boolean (default = false) — set this to true if your application ui has both AsWing components and Flex components.

See also

initStage()method 
public static function initStage(theStage:Stage):void

Init the stage for AsWing, this method should be better called when flashplayer start. This method will be automatically called when a component is added to stage.

Parameters
theStage:Stage — the stage
isPreventNullFocus()method 
public static function isPreventNullFocus():Boolean

Returns the preventNullFocus property.

Returns
Boolean — true means will prevent focus transfer to null, false means do not manage this.

See also

isStageInited()method 
public static function isStageInited():Boolean

Returns whether or not stage is set to the manager.

Returns
Boolean — whether or not stage is set to the manager.
setInitialStageSize()method 
public static function setInitialStageSize(width:int, height:int):void

Sets the intial stage size, this method generally do not need to use. But some times, you know the manager is not initied at right time, i means some times the manager is inited after the stage is resized, so, you maybe need to call this method to correct the size.

Parameters
width:int — the width of stage when application start.
 
height:int — the height of stage when application start.
setPreventNullFocus()method 
public static function setPreventNullFocus(prevent:Boolean):void

Sets whether or not prevent focus transfer to null when user click a blank(not focusable object). The default value is true, it is suit for normal applications, if you are develop a app that are complex and may have other interactive object is not aswing components, you may need to set this value to false.

Parameters
prevent:Boolean — set true to prevent focus transfer to null, false, not manage to do this
setRoot()method 
public static function setRoot(root:DisplayObjectContainer):void

Sets the root container for AsWing components based on.

You'd better call this method before application start, before flashplayer stage resized.

Default is AsWingManager.getStage(). Parameters
root:DisplayObjectContainer — the root container for AsWing popups.
updateAfterMilliseconds()method 
public static function updateAfterMilliseconds(delay:int = 20):void

Force the screen to be updated after a time.

Parameters
delay:int (default = 20) — the time