class com.senocular.display
Layout
Extends: LayoutConstraint
Constructors | |
---|---|
Layout() | Constructor for creating new Layout instances. If you want your instances to automatically update, you would generally favor LayoutManager.registerNewLayout() in favor of creating layout instances with the Layout constructor. |
Properties | |
---|---|
useDefaultChangeHandler | The change handler for updating a display object when its layout has changed. This relates to the changeHandler passed into the Layout constructor and is optional to using addEventListener with the layout's Event.CHANGE event yourself. |
parent | The parent layout in which the current layout is contained. This property will return the parent layout if that parent had this layout added to it using addChild(), otherwise if the layout within the parent of the layout's target display object has been registered to the same LayoutManager instance, it will return that layout. If neither are the case, null is returned [read-only]. |
children | An optional constraint used for layouts contained withinthe current layout. By default, layouts within other layouts fit to the extends of the containing layout. By defining a children layout constraint layouts that are children of the current layout can be contained to a separate set of boundaries. The children property is null by default. To use the children layout, you must first assign it to a Layout or LayoutConstraint instance. |
manager | The LayoutManager instance managing this layout [read-only]. |
target | The target display object this layout affects [read-only]. |
Methods | |
---|---|
defaultChangeHandler() | A predefined change handler for generic objects being fit within a contraint's bounds. This handler maps the display objects x, y, width and height properties directly to the respective properties within the layout rect. |
clone() | Creates a new copy of the current Layout instance. Cloned layouts do do not retain an association with any LayoutManager used with the original. |
addChild() | Adds a layout to be the child of the current layout. As a child, changes from this layout will be propagated to that layout to assure that it is properly constrained within this layout's boundaries. |
removeChild() | Removes a layout as a child of this layout. |
draw() | Updates the layout (current and children) dimensions dispatching the Layout.CHANGE event for this layout or any child layouts affected. |
public function Layout(target:DisplayObject = null, useDefaultChangeHandler:Boolean = false)
target | The target display object this layout instance will be associated. Of the target is stage, an automatic listner for the RESIZE event will be added to update the layout's size to match the stage's [optional]. |
changeHandler | A change handler function that will automatically be set to listen to the CHANGE event for the new layout instance [optional]. |
public function get useDefaultChangeHandler():Boolean
public function set useDefaultChangeHandler(value:Boolean):void
public function get parent():Layout
public function get children():LayoutConstraint
public function set children(value:LayoutConstraint):void
public function get manager():LayoutManager
public function get target():DisplayObject
public function set target(value:DisplayObject):void
public static function defaultChangeHandler(event:Event):void
event | The CHANGE event object dispatched to this handler when a layout has changed. |
override public function clone():LayoutConstraint
public function addChild(childLayout:Layout):Layout
childLayout | The layout to be made a child of the current layout. |
public function removeChild(childLayout:Layout):Layout
childLayout | The layout to be removed as a child of the current layout. |
public function draw():void
Page generated: 11:09 pm on July 31, 2007