Packagecom.ghostwire.ui.containers
Classpublic class uiGrid
InheritanceuiGrid Inheritance uiComponent Inheritance flash.display.Sprite

uiGrid is a layout container that organizes its child objects in a table of columns and rows.

The height of all the cells in a single row is the same, but each row can have a different height. The width of all the cells in a single column is the same, but each column can have a different width.

The number of columns and rows depends on the value of the columns property. If left undefined or set to zero (0), the columns property assumes a value equal to the number of child objects, effectively laying out the child objects in a single row. Otherwise, the number of rows will depends on the number of columns and child objects.

The child objects are laid out in the order they are added to the container, from left-to-right and then top-to-bottom.

uiGrid can contain only uiComponent child objects.

Although you can also use a combination of multiple uiBox instances to achieve the same result, this class is more efficient when laying out objects in uniform rows and columns.

"skin" Property
Always null - attempting to set this property will throw an error.

~ This class is available in Aspire UI Components Standard Edition ~



Public Properties
 PropertyDefined by
 InheritedalignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
uiComponent
 InheritedalignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
uiComponent
 Inheritedbackground : Object
Indicates the style of the background for this component.
uiComponent
  columns : int
Indicates the number of columns in this grid layout, which in turn determines the number of rows (you cannot specify the number of rows directly).
uiGrid
 Inheritedcontainer : uiComponent
Indicates the uiComponent instance that contains this instance.
uiComponent
 Inheriteddepth : int
Indicates how deep the component is in the containment hierarchy.
uiComponent
 InheriteddesiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
uiComponent
 InheriteddesiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
uiComponent
 Inheritedenabled : Boolean
Indicates whether the component is enabled for user interaction.
uiComponent
 InheritedfillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated horizontal space.
uiComponent
 InheritedfillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated vertical space.
uiComponent
 InheritedfocusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus rectangle.
uiComponent
 InheritedfocusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it is in focus.
uiComponent
 Inheritedheight : Number
Indicates the current height of the component.
uiComponent
 Inheritedmargin : Object
Indicates the thickness of the space surrounding the component.
uiComponent
 InheritedmaxHeight : int
Indicates the upper limit for height.
uiComponent
 InheritedmaxWidth : int
Indicates the upper limit for width.
uiComponent
 InheritedminHeight : int
Indicates the lower limit for height.
uiComponent
 InheritedminWidth : int
Indicates the lower limit for width.
uiComponent
 Inheritedpadding : Object
Indicates the thickness of the interior space from the edge of the component to the content area, which is where child components, if any, are contained.
uiComponent
 Inheritedskin : String
Indicates the name of the skin to use for this component instance.
uiComponent
  spacingH : int
Indicates the gap between each column, in pixels.
uiGrid
  spacingV : int
Indicates the gap between each row, in pixels.
uiGrid
 Inheritedstretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this component.
uiComponent
 InheritedtextStyle : String
Indicates the style to use for uiText instances contained in this component.
uiComponent
 InheritedtoolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers over this control.
uiComponent
 Inheriteduiskin : uiBitmapImage
Returns the uiBitmapImage rendered as the skin - for advanced users only.
uiComponent
 Inheritedvisible : Boolean
Indicates whether or not the component is visible within its container.
uiComponent
 Inheritedwidth : Number
Indicates the current width of the component.
uiComponent
Public Methods
 MethodDefined by
  
Constructor - creates a new uiGrid instance.
uiGrid
  
addChild(child:DisplayObject):DisplayObject
Adds a child uiComponent instance to this container.
uiGrid
  
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child uiComponent instance to this container at the specified index position.
uiGrid
 Inherited
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
uiComponent
 Inherited
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
uiComponent
 Inherited
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
uiComponent
  
setColumnSize(index:int, size:int):void
Sets the width of the space allocated to a specific column.
uiGrid
 Inherited
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its tabEnabled property set to true, otherwise this method will fail silently.
uiComponent
  
setRowSize(index:int, size:int):void
Sets the height of the space allocated to a specific row.
uiGrid
 Inherited
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified width and height.
uiComponent
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
uiComponent
 Inherited
validateNow():void
Validates and render the component instance, and any component instances with depth higher than itself in the validation queue, immediately.
uiComponent
Events
 EventSummaryDefined by
 Inherited Dispatched when the component's visible property is changed from true to false via calling the setVisible() method.uiComponent
 Inherited Dispatched when the component's position within its parent container has changed via calling the move() method.uiComponent
 Inherited Dispatched when the component's size has changed via calling the setSize() method.uiComponent
 Inherited Dispatched when the component's visible property is changed from false to true via calling the setVisible() method.uiComponent
Property detail
columnsproperty
columns:int  [read-write]

Indicates the number of columns in this grid layout, which in turn determines the number of rows (you cannot specify the number of rows directly).

Implementation
    public function get columns():int
    public function set columns(value:int):void
spacingHproperty 
spacingH:int  [read-write]

Indicates the gap between each column, in pixels.

The default value is 0.

Implementation
    public function get spacingH():int
    public function set spacingH(value:int):void
spacingVproperty 
spacingV:int  [read-write]

Indicates the gap between each row, in pixels.

The default value is 0.

Implementation
    public function get spacingV():int
    public function set spacingV(value:int):void
Constructor detail
uiGrid()constructor
public function uiGrid()

Constructor - creates a new uiGrid instance.

Method detail
addChild()method
public override function addChild(child:DisplayObject):DisplayObject

Adds a child uiComponent instance to this container. The child is added to the front (top) of all other children in this container.

Note that the order of the layout will be the same as the order you addChild() to the uiGrid container. Adding a child object invalidates the layout.

Parameters
child:DisplayObject — The uiComponent instance to add to the container.

Returns
DisplayObject

See also

flash.display.DisplayObjectContainer.addChild()
addChildAt()method 
public override function addChildAt(child:DisplayObject, index:int):DisplayObject

Adds a child uiComponent instance to this container at the specified index position.

Note that the order of the layout will be the same as the order you addChild() to the uiGrid container. Adding a child object invalidates the layout.

Parameters
child:DisplayObject — The uiComponent instance to add to the container.
 
index:int — The index position at which to insert the child.

Returns
DisplayObject

See also

flash.display.DisplayObjectContainer.addChildAt()
setColumnSize()method 
public function setColumnSize(index:int, size:int):void

Sets the width of the space allocated to a specific column.

All the cells in a column are allocated the same width.

Parameters
index:int — The zero-based index of the column to affect (zero is first column).
 
size:int — The desired width in pixels. Set this to -1 to remove explicit width.
setRowSize()method 
public function setRowSize(index:int, size:int):void

Sets the height of the space allocated to a specific row.

All the cells in a row are allocated the same height.

Parameters
index:int — The zero-based index of the row to affect (zero is first row).
 
size:int — The desired height in pixels. Set this to -1 to remove explicit height.