Packagegraphics.layouts
Classpublic class GridLayout
InheritanceGridLayout Inheritance BoxLayout Inheritance CoreLayout Inheritance Object

The Grid layout lays out a container's children in a rectangular grid. The container is divided into equal-sized rectangles, and one child is placed in each rectangle.



Public Properties
 PropertyDefined By
 Inheritedalign : uint
The alignement of the layout.
CoreLayout
 Inheritedbounds : Rectangle
A rectangle that defines the area of the layout.
CoreLayout
 InheritedchildCount : int
Determinates the number of childs visible in this layout to calculates size with the measure method.
BoxLayout
  columns : uint
Determinates the number of columns in the grid layout if the direction of this container is Direction.HORIZONTAL.
GridLayout
 Inheritedcontainer : DisplayObjectContainer
Indicates the container reference to change with the layout.
CoreLayout
 Inheriteddirection : String
Indicates the direction value of this layout ("horizontal" or "vertical").
BoxLayout
 InheritedhorizontalGap : Number
Number of pixels between children in the horizontal direction.
BoxLayout
  lines : uint
Determinates the number of lines in the matrix layout if the direction of this container is Direction.VERTICAL.
GridLayout
 InheritedmeasuredHeight : Number
The default height of the component, in pixels.
CoreLayout
 InheritedmeasuredWidth : Number
The default width of the component, in pixels.
CoreLayout
 Inheritedorder : String
Indicates the direction order of to layout all children in the container.
BoxLayout
  orientation : uint
The orientation of the layout.
GridLayout
 Inheritedpadding : EdgeMetrics
Specifies the thickness, in pixels, of the four edge regions around the box layout.
BoxLayout
 InheritedpropHeight : String = height
The height property name use in the container to layout all items.
BoxLayout
 InheritedpropWidth : String = width
The width property name use in the container to layout all items.
BoxLayout
 InheritedpropX : String = x
The x property name use in the container to layout all items.
BoxLayout
 InheritedpropY : String = y
The y property name use in the container to layout all items.
BoxLayout
 Inheritedrenderer : Signaler
This signal emit before the rendering is started.
CoreLayout
 Inheritedudpater : Signaler
This signal emit when the rendering is finished.
CoreLayout
 InheritedverticalGap : Number
Number of pixels between children in the vertical direction.
BoxLayout
Protected Properties
 PropertyDefined By
 Inherited_bounds : Rectangle
The absolute rectangle bound area calculate with the measure method.
CoreLayout
Public Methods
 MethodDefined By
  
GridLayout(container:DisplayObjectContainer = null, init:Object = null, auto:Boolean = false)
Creates a new GridLayout instance.
GridLayout
 Inherited
getChildPositionAt(n:Number):Point
Returns the child position with the specified index and the current direction of this layout.
BoxLayout
 Inherited
Returns the string representation of the coordinate attribute used in this display with the current direction value.
BoxLayout
 Inherited
Returns the string representation of the size attribute with the current direction.
BoxLayout
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreLayout
 Inherited
isVertical():Boolean
Indicates if the layout is vertical.
BoxLayout
 Inherited
lock():void
Locks the object.
CoreLayout
  
measure():void
[override] Calculates the default sizes and minimum and maximum values.
GridLayout
  
render():void
[override] Render the layout, refresh and change the position of all childs in a specific container.
GridLayout
 Inherited
resetLock():void
Reset the lock security of the display.
CoreLayout
 Inherited
run(... arguments):void
Run the layout (render and update).
CoreLayout
 Inherited
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.
GridLayout
Protected Methods
 MethodDefined By
  
isBottomToTop():Boolean
Indicates if the layout orientation is bottom-to-top.
GridLayout
  
isRightToLeft():Boolean
Indicates if the layout orientation is right-to-left.
GridLayout
Property Detail
columnsproperty
columns:uint

Determinates the number of columns in the grid layout if the direction of this container is Direction.HORIZONTAL.


Implementation
    public function get columns():uint
    public function set columns(value:uint):void

See also

linesproperty 
lines:uint

Determinates the number of lines in the matrix layout if the direction of this container is Direction.VERTICAL.


Implementation
    public function get lines():uint
    public function set lines(value:uint):void

See also

orientationproperty 
orientation:uint

The orientation of the layout.


Implementation
    public function get orientation():uint
    public function set orientation(value:uint):void

See also

Constructor Detail
GridLayout()Constructor
public function GridLayout(container:DisplayObjectContainer = null, init:Object = null, auto:Boolean = false)

Creates a new GridLayout instance.

Parameters
container: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).
Method Detail
isBottomToTop()method
protected function isBottomToTop():Boolean

Indicates if the layout orientation is bottom-to-top.

Returns
Boolean
isRightToLeft()method 
protected function isRightToLeft():Boolean

Indicates if the layout orientation is right-to-left.

Returns
Boolean
measure()method 
override public function measure():void

Calculates 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():void

Render the layout, refresh and change the position of all childs in a specific container.

update()method 
override public function update():void

This method is invoked when the rendering is finished to finalize the it after the measure invokation.