Column

class Column<T>(val title: String, var width: Double, val value: (T) -> Any?, val format: (Any?) -> String = { it?.toString() ?: "" }, val comparator: Comparator<T>? = Comparator { a, b -> compareValues(value(a) as? Comparable<Any>, value(b) as? Comparable<Any>) })(source)

A column of a DataTable: its title, its width in pixels, the value of a row, shown with format, and the comparator that sorts the rows by it, null when the column does not sort

Constructors

Link copied to clipboard
constructor(title: String, width: Double, value: (T) -> Any?, format: (Any?) -> String = { it?.toString() ?: "" }, comparator: Comparator<T>? = Comparator { a, b -> compareValues(value(a) as? Comparable<Any>, value(b) as? Comparable<Any>) })

Properties

Link copied to clipboard
Link copied to clipboard
val format: (Any?) -> String
Link copied to clipboard
Link copied to clipboard
val value: (T) -> Any?
Link copied to clipboard