Grid

class Grid(val rows: Int = 1, val cols: Int = 0, val hgap: Int = 0, val vgap: Int = 0) : PanelLayout<PanelScope>

Divides the panel into equally sized cells and fills them with the children, one per cell, row by row in the panel's reading order.

A zero rows means as many rows as the children need, and a zero cols as many columns; one of the two may be zero, never both.

See also

Throws

if both rows and cols are zero

Constructors

Link copied to clipboard
constructor(rows: Int = 1, cols: Int = 0, hgap: Int = 0, vgap: Int = 0)

Properties

Link copied to clipboard
val cols: Int

the number of columns, or 0 for as many as the children need; a non-zero rows takes precedence, and the column count then follows from the row count and the number of children

Link copied to clipboard

the scope the container's content is composed in

Link copied to clipboard
val hgap: Int

the horizontal gap between components; 0 by default, so columns touch

Link copied to clipboard
val rows: Int

the number of rows, or 0 for as many as the children need; the default 1 puts every child in one row

Link copied to clipboard
val vgap: Int

the vertical gap between components; 0 by default, so rows touch

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun <C : Container> installOn(updater: SwingNodeUpdater<C>)

Lays the container out under this layout. An implementation makes one write on updater through installManager.