Class Index | File Index

Classes


Class gva.util.Grid


Defined in: Grid.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new Grid instance.
Field Summary
Field Attributes Field Name and Description
 
The outer boundaries of each grid cell
 
The total number of cells available in the grid
 
Whether columns should be positioned in the center of the available width
 
Whether rows should be positioned in the center of the available height
 
The number of columns along the x axis of the grid.
 
An array of 2D points representing the top left position of each grid cell.
 
The outer boundaries of the grid
 
The number of rows along the y axis of the grid.
Method Summary
Method Attributes Method Name and Description
 
Recalculates each cell position based on the current grid setup
 
setCellBounds(width, height, spacingX, spacingY)
Sets the outer boundaries of each grid cell and automatically recalculates the cell positions.
 
setGridBounds(x, y, width, height)
Sets the outer boundaries of the grid and automatically recalculates the cell positions.
Class Detail
gva.util.Grid()
Creates a new Grid instance.
Field Detail
cellBounds
The outer boundaries of each grid cell

cells
The total number of cells available in the grid

centerAlignX
Whether columns should be positioned in the center of the available width

centerAlignY
Whether rows should be positioned in the center of the available height

cols
The number of columns along the x axis of the grid.

coords
An array of 2D points representing the top left position of each grid cell.

gridBounds
The outer boundaries of the grid

rows
The number of rows along the y axis of the grid.
Method Detail
refresh()
Recalculates each cell position based on the current grid setup

setCellBounds(width, height, spacingX, spacingY)
Sets the outer boundaries of each grid cell and automatically recalculates the cell positions.
Parameters:
{number} width
The width of each grid cell.
{number} height
The height of each grid cell.
{number} spacingX
The spacing between grid cells along the x axis.
{number} spacingY
The spacing between grid cells along the y axis.

setGridBounds(x, y, width, height)
Sets the outer boundaries of the grid and automatically recalculates the cell positions.
Parameters:
{number} x
The position of the grid on the x axis.
{number} y
The position of the grid on the y axis.
{number} width
The total width of the grid.
{number} height
The total height of the grid.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Dec 22 2011 17:41:23 GMT-0800 (PST)