One row of a Table, with the vertical room it takes and the style it is drawn in.
A Table's rows accepts either a bare sequence of cells — one terminal line tall, which is all a row could ever be before this type existed — or a TableRow, and the two may be mixed in one table. The union follows the shape ListView already uses for its String | Line items: a caller who wants none of this pays no ceremony for it, and every table written against the older signature still compiles and still draws the same thing.
What the extra room buys is spacing a table could not express at all. bottomMargin = 1 on the last header-like row puts a blank line under it; height = 2 gives a row breathing space in a sparse table; topMargin opens a gap above a group of rows.
Value parameters
- bottomMargin
-
blank lines below the row. Negative counts clamp to zero.
- cells
-
the row's cells, laid out on the table's solved column widths. A cell is either a bare
Line, which occupies one column, or a TableCell, which can span several. Extra cells beyond the last column are dropped, as they always were. - height
-
how many terminal lines the row occupies. A cell is a single line of text, so the cells are drawn on the first of those lines and the rest are left blank — this reserves vertical room, it does not wrap text. Clamped to at least one: a zero-height row would draw nothing while still being walked, which is exactly the shape that lets a ten-thousand-row table scan itself looking for something to show.
- style
-
the style this row is drawn in, layered over the table's own
style, orNoneto use the table's style unchanged. This is the per-row level the reference implementations have between the table style and the cell style: before it, a table applied one style to every row and a caller who wanted to tint one of them — a failing check, a stale record — had to restyle every io.worxbend.tui.core.Span in it by hand. - topMargin
-
blank lines above the row. Negative counts clamp to zero.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any