addColumn

abstract fun addColumn(header: @Nls String, columnClass: Class<*>, isEditable: Boolean, isCellEditable: (row: R, rowIndex: Int) -> Boolean?, isSortable: Boolean, comparator: Comparator<Any?>?, minWidth: Int, maxWidth: Int, onCellEdit: (row: R, rowIndex: Int, newValue: Any?) -> Unit, cellContent: @Composable TableCellScope.(row: R) -> Unit?, value: (row: R) -> Any?)

Appends one fully specified column. Both forms of column funnel through here, each filling in what a declaration leaves out.

Marked InternalSwingUiApi; it may change without notice in any release.

column carries the guidance on choosing each parameter.

Parameters

header

the column's header text.

columnClass

the class the table renders and edits this column's cells as.

isEditable

whether the column's cells can be edited in place at all.

isCellEditable

decides that per row while it is declared, or null to leave the answer to isEditable.

isSortable

whether a click on the header sorts by this column, while the table sorts at all.

comparator

orders this column's values, or null to order them as a TableRowSorter orders a column of columnClass.

minWidth

the narrowest this column may be dragged or squeezed to, in pixels.

maxWidth

the widest this column may be dragged or stretched to, in pixels.

onCellEdit

invoked with the row, its index and the committed value when a cell is edited.

cellContent

renders the cells through a composable body, or null to render them through the renderer the table picks by columnClass.

value

extracts the value to show for a row.