Table

io.worxbend.tui.widgets.Table
See theTable companion class
object Table

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Table.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def ofStrings(rows: Seq[Seq[String]], widths: Seq[Constraint], header: Option[Seq[String]] = ..., footer: Option[Seq[String]] = ..., columnSpacing: Int = ..., flex: Flex = ..., style: Style = ..., headerStyle: Style = ..., footerStyle: Style = ...): Table

A table of plain unstyled text.

A table of plain unstyled text.

The cells of a table are Lines so that any one of them can carry several styles, but the common case is a grid of Strings and every such caller was writing the same rows.map(_.map(Line.raw)) incantation. This does that once. A Seq[Seq[String | Line]] union would have removed the need for a second factory altogether, but a union two collections deep is unpleasant to read and to infer, so the two shapes get two names instead.

The parameter list mirrors Table's, and that mirror is a maintenance contract: a new Table parameter belongs here too. The forwarding call below passes every argument by name, so a parameter added to one and not the other, or two neighbouring parameters of the same type swapped, is a compile error rather than a table that quietly renders wrong.

Attributes