| Package | graphics.layouts |
| Class | public class BoxLayout |
| Inheritance | BoxLayout CoreLayout Object |
| Implements | Directionable |
| Subclasses | GridLayout |
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
The alignement of the layout. | CoreLayout | |
![]() | bounds : Rectangle
A rectangle that defines the area of the layout. | CoreLayout | |
| childCount : int
Determinates the number of childs visible in this layout to calculates size with the measure method. | BoxLayout | ||
![]() | container : DisplayObjectContainer
Indicates the container reference to change with the layout. | CoreLayout | |
| direction : String
Indicates the direction value of this layout ("horizontal" or "vertical"). | BoxLayout | ||
| horizontalGap : Number
Number of pixels between children in the horizontal direction. | BoxLayout | ||
![]() | measuredHeight : Number
The default height of the component, in pixels. | CoreLayout | |
![]() | measuredWidth : Number
The default width of the component, in pixels. | CoreLayout | |
| order : String
Indicates the direction order of to layout all children in the container. | BoxLayout | ||
| padding : EdgeMetrics
Specifies the thickness, in pixels, of the four edge regions around the box layout. | BoxLayout | ||
| propHeight : String = height
The height property name use in the container to layout all items. | BoxLayout | ||
| propWidth : String = width
The width property name use in the container to layout all items. | BoxLayout | ||
| propX : String = x
The x property name use in the container to layout all items. | BoxLayout | ||
| propY : String = y
The y property name use in the container to layout all items. | BoxLayout | ||
![]() | renderer : Signaler
This signal emit before the rendering is started. | CoreLayout | |
![]() | udpater : Signaler
This signal emit when the rendering is finished. | CoreLayout | |
| verticalGap : Number
Number of pixels between children in the vertical direction. | BoxLayout | ||
| Method | Defined By | ||
|---|---|---|---|
BoxLayout(container:DisplayObjectContainer = null, init:Object = null, auto:Boolean = false)
Creates a new BoxLayout instance. | BoxLayout | ||
getChildPositionAt(n:Number):Point
Returns the child position with the specified index and the current direction of this layout. | BoxLayout | ||
getCoordinateProperty():String
Returns the string representation of the coordinate attribute used in this display with the current direction value. | BoxLayout | ||
getSizeProperty():String
Returns the string representation of the size attribute with the current direction. | BoxLayout | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreLayout | |
isVertical():Boolean
Indicates if the layout is vertical. | BoxLayout | ||
![]() | lock():void
Locks the object. | CoreLayout | |
measure():void [override]
Calculates the default sizes and minimum and maximum values. | BoxLayout | ||
render():void [override]
Render the layout, refresh and change the position of all childs in a specific container. | BoxLayout | ||
![]() | resetLock():void
Reset the lock security of the display. | CoreLayout | |
![]() | run(... arguments):void
Run the layout (render and update). | CoreLayout | |
![]() | unlock():void
Unlocks the display. | CoreLayout | |
update():void [override]
This method is invoked when the rendering is finished to finalize the it after the measure invokation. | BoxLayout | ||
| childCount | property |
childCount:intDeterminates the number of childs visible in this layout to calculates size with the measure method. If this value is -1 all childs are used to calculate the visible area size else only the number of childs defines with the childCount attribute.
public function get childCount():int public function set childCount(value:int):void| direction | property |
direction:StringIndicates the direction value of this layout ("horizontal" or "vertical").
public function get direction():String public function set direction(value:String):voidSee also
| horizontalGap | property |
horizontalGap:NumberNumber of pixels between children in the horizontal direction. The default value depends on the component class; if not overriden for the class, the default value is 0.
public function get horizontalGap():Number public function set horizontalGap(value:Number):void| order | property |
order:StringIndicates the direction order of to layout all children in the container. This property can be define with the two constants DirectionOrder.NORMAL and DirectionOrder.REVERSE.
public function get order():String public function set order(value:String):voidSee also
| padding | property |
padding:EdgeMetricsSpecifies the thickness, in pixels, of the four edge regions around the box layout.
public function get padding():EdgeMetrics public function set padding(value:EdgeMetrics):void| propHeight | property |
public var propHeight:String = heightThe height property name use in the container to layout all items.
| propWidth | property |
public var propWidth:String = widthThe width property name use in the container to layout all items.
| propX | property |
public var propX:String = xThe x property name use in the container to layout all items.
| propY | property |
public var propY:String = yThe y property name use in the container to layout all items.
| verticalGap | property |
verticalGap:NumberNumber of pixels between children in the vertical direction. The default value depends on the component class; if not overriden for the class, the default value is 0.
public function get verticalGap():Number public function set verticalGap(value:Number):void| BoxLayout | () | Constructor |
public function BoxLayout(container:DisplayObjectContainer = null, init:Object = null, auto:Boolean = false)Creates a new BoxLayout instance.
Parameterscontainer:DisplayObjectContainer (default = null) — The container to layout.
| |
init:Object (default = null) — An object that contains properties with which to populate the newly layout object. If init is not an object, it is ignored.
| |
auto:Boolean (default = false) — This boolean indicates if the layout is auto running or not (default false).
|
| getChildPositionAt | () | method |
public function getChildPositionAt(n:Number):PointReturns the child position with the specified index and the current direction of this layout.
Parameters
n:Number |
Point — the child position with the specified index and the current direction of this layout.
|
| getCoordinateProperty | () | method |
public function getCoordinateProperty():StringReturns the string representation of the coordinate attribute used in this display with the current direction value.
ReturnsString — the string representation of the coordinate attribute used in this display with the current direction value.
|
| getSizeProperty | () | method |
public function getSizeProperty():StringReturns the string representation of the size attribute with the current direction.
ReturnsString — the string representation of the size attribute with the current direction.
|
| isVertical | () | method |
public function isVertical():BooleanIndicates if the layout is vertical.
ReturnsBoolean |
| measure | () | method |
override public function measure():voidCalculates the default sizes and minimum and maximum values. If the Box layout's direction property is set to Direction.HORIZONTAL, its measuredWidth property is equal to the sum of default widths of all of the children in the container, plus the thickness of the borders (padding), plus the left and right padding, plus the horizontal gap between each child. The value of the measuredHeight property is the maximum of all the children's default heights, plus room for the borders and padding. If the Box layout's direction property is set to Direction.VERTICAL, these two values are reversed.
| render | () | method |
override public function render():voidRender the layout, refresh and change the position of all childs in a specific container.
| update | () | method |
override public function update():voidThis method is invoked when the rendering is finished to finalize the it after the measure invokation.