Packagecom.whirled.contrib.avrg.probe
Classpublic class GridPanel
InheritanceGridPanel Inheritance flash.display.Sprite

A panel to display objects in a simple grid with fixed row and column heights and widths.



Public Properties
 PropertyDefined by
  numColumns : int
[read-only] The number of columns in the grid.
GridPanel
  numRows : int
[read-only] The number of rows in the grid.
GridPanel
Protected Properties
 PropertyDefined by
  _columns : Array
GridPanel
  _rows : Array
GridPanel
Public Methods
 MethodDefined by
  
GridPanel(widths:Array, heights:Array)
Creates a new grid panel.
GridPanel
  
addCell(column:int, row:int, contents:DisplayObject):void
Adds a new cell at the given column and row.
GridPanel
  
getCellSize(column:int, row:int):Point
Gets the size of a cell.
GridPanel
Property detail
_columnsproperty
protected var _columns:Array
numColumnsproperty 
numColumns:int  [read-only]

The number of columns in the grid.

Implementation
    public function get numColumns():int
numRowsproperty 
numRows:int  [read-only]

The number of rows in the grid.

Implementation
    public function get numRows():int
_rowsproperty 
protected var _rows:Array
Constructor detail
GridPanel()constructor
public function GridPanel(widths:Array, heights:Array)

Creates a new grid panel.

Parameters
widths:Array — array of numeric widths, one per grid column
 
heights:Array — array of numeric heights, one per grid row
Method detail
addCell()method
public function addCell(column:int, row:int, contents:DisplayObject):void

Adds a new cell at the given column and row. The previous contents of the cell are not removed.

Parameters
column:int
 
row:int
 
contents:DisplayObject
getCellSize()method 
public function getCellSize(column:int, row:int):Point

Gets the size of a cell.

Parameters
column:int
 
row:int

Returns
Point — a point with x = the width of the cell and y = to the height.