getInstance()
public static function getInstance():LayoutManager
Returns the LayoutManager instance associated with
the LayoutManager class if the LayoutManager is
being used as a singleton.
registerNewLayout()
public static function registerNewLayout(target:DisplayObject, useDefaultChangeHandler:Boolean = false):Layout
Registers a display object with a layout. As a
registered layout, it will be available for updates
if the Layout class is initialized with auto updates
and for propagation of changes from parent layouts. If the
target display object already has a registered layout
for this same LayoutManager, that layout is returned. If the
target is registered to another layout manager, it will
continue to be registered to that layout manager with a
separate layout instance.
- Parameters:
target | The display object to get a layout for. |
changeHandler | If a new Layout instance is created, this
handler will be used to update the target during the CHANGE
event [optional]. |
getLayout()
public static function getLayout(target:DisplayObject):Layout
Returns the current layout object associated with
the passed display object. If no layout has been
registered for that object, null is returned.
- Parameters:
target | The display object to get a layout for. |
unregisterLayout()
public static function unregisterLayout(target:DisplayObject):Layout
Unregisters a display object's layout. As a
registered layout, it will be available for updates
if the LayoutManager class is initialized with auto updates
and for propagation of changes from parent layouts. When
unregistered, updates will have to be made manually.
- Parameters:
target | The display object to unregister from the manager. |
isRegisteredLayout()
public static function isRegisteredLayout(target:DisplayObject):Boolean
Determines if the display object has a registered layout.
- Parameters:
target | A display object to check if registered
to this LayoutManager instance. |
initializeAutoUpdate()
public static function initializeAutoUpdate(stage:Stage):void
Initializes the Layout class to perform automatic updates
for all registered layouts. Updates happen during the RENDER
event and only occur if there was a change in a layout. If
already initialized the Layout class for auto updates and
want to stop the auto updates, call initializeAutoUpdate
again but pass null instead of a reference to the stage.
- Parameters:
stage | A reference to the stage to be used to
allow for updates in the RENDER event. |
draw()
public static function draw():void
Draws and updates all layouts in the layout manager
registerNewLayout()
public function registerNewLayout(target:DisplayObject, useDefaultChangeHandler:Boolean = false):Layout
Registers a display object with a layout. As a
registered layout, it will be available for updates
if the Layout class is initialized with auto updates
and for propagation of changes from parent layouts. If the
target display object already has a registered layout
for this same LayoutManager, that layout is returned. If the
target is registered to another layout manager, it will
continue to be registered to that layout manager with a
separate layout instance.
- Parameters:
target | The display object to get a layout for. |
changeHandler | If a new Layout instance is created, this
handler will be used to update the target during the CHANGE
event [optional]. |
getLayout()
public function getLayout(target:DisplayObject):Layout
Returns the current layout object associated with
the passed display object. If no layout has been
registered for that object, null is returned.
- Parameters:
target | The display object to get a layout for. |
unregisterLayout()
public function unregisterLayout(target:DisplayObject):Layout
Unregisters a display object's layout. As a
registered layout, it will be available for updates
if the LayoutManager class is initialized with auto updates
and for propagation of changes from parent layouts. When
unregistered, updates will have to be made manually.
- Parameters:
target | The display object to unregister from the manager. |
isRegisteredLayout()
public function isRegisteredLayout(target:DisplayObject):Boolean
Determines if the display object has a registered layout.
- Parameters:
target | A display object to check if registered
to this LayoutManager instance. |
initializeAutoUpdate()
public function initializeAutoUpdate(stage:Stage):void
Initializes the Layout class to perform automatic updates
for all registered layouts. Updates happen during the RENDER
event and only occur if there was a change in a layout. If
already initialized the Layout class for auto updates and
want to stop the auto updates, call initializeAutoUpdate
again but pass null instead of a reference to the stage.
- Parameters:
stage | A reference to the stage to be used to
allow for updates in the RENDER event. |
draw()
public function draw():void
Draws and updates all layouts in the layout manager