class domkit::TableModel

sys::Obj
  domkit::TableModel

@Js

Source

TableModel backs the data model for a Table

colWidth

virtual Int colWidth(Int col)

Source

Return width of given column.

headerHeight

virtual Int headerHeight()

Source

Return height of header.

isVisibleDef

virtual Bool isVisibleDef(Int col)

Source

Return default visible/hidden state for column

item

virtual Obj item(Int row)

Source

Return item for the given row to be used with selection.

numCols

virtual Int numCols()

Source

Number of columns in table.

numRows

virtual Int numRows()

Source

Number of rows in table.

onCell

virtual Void onCell(Elem cell, Int col, Int row, TableFlags flags)

Source

Callback to update the cell content at given location.

onHeader

virtual Void onHeader(Elem header, Int col)

Source

Callback to update content for column header at given index.

rowHeight

virtual Int rowHeight()

Source

Return height of rows.

sortCompare

virtual Int sortCompare(Int col, Int row1, Int row2)

Source

Compare two cells when sorting the given col. Return -1, 0, or 1 according to the same semanatics as Obj.compare. See Table.sort.