class fwt::TableModel

sys::Obj
  fwt::TableModel

@Js

Source

TableModel models the data of a table widget.

bg

virtual Color? bg(Int col, Int row)

Source

Get the background color for this cell. If null, use the default background color.

fg

virtual Color? fg(Int col, Int row)

Source

Get the foreground color for this cell. If null, use the default foreground color.

font

virtual Font? font(Int col, Int row)

Source

Get the font used to render the text for this cell. If null, use the default system font.

halign

virtual Halign halign(Int col)

Source

Get the horizontal alignment for specified column. Default is left.

virtual Str header(Int col)

Source

Get the header text for specified column.

image

virtual Image? image(Int col, Int row)

Source

Get the image to display for specified cell or null.

numCols

virtual Int numCols()

Source

Get number of columns in table. Default returns 1.

numRows

virtual Int numRows()

Source

Get number of rows in table.

prefWidth

virtual Int? prefWidth(Int col)

Source

Return the preferred width in pixels for this column. Return null (the default) to use the Tables default width.

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. Default behavior sorts text using Str.localeCompare. See Table.sort.

text

virtual Str text(Int col, Int row)

Source

Get the text to display for specified cell.