Adds a widget to the specified row and column. If the specified cells are outside the grid or the cell is already occupied, it does not add the widget and returns null. The widget does not need to be rendered while adding, and the grid also sets positioning and size automatically. Note that the rows are measured from the top.
arg
type
description
widget
du.widget.Widget
Widget to add.
column
number
Column index of the cell to add widget to.
row
number
Row index of the cell to add widget to.
width
number
Number of columns to occupy.
height
number
Number of rows to occupy.
return
description
du.widget.Widget
Reference to the added widget if cells are available and free, null pointer otherwise.
get
du.widgets.grid.Grid.get(row, column)
Returns the widget occupying the cell at the specified row and column.
arg
type
description
row
number
Row of the cell to get widget for.
column
number
Column of the cell to get widget for.
return
description
du.widget.Widget
Reference to the widget in the specified cell if cell is in grid and it is not empty, null pointer otherwise.