mixinafReflux::ResourceTableModel

afReflux::ResourceTableModel

@Js

A model to customise the look of a ResourceTable.

bg

Source

virtual Color? bg(Resource resource, Int col)

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

fg

Source

virtual Color? fg(Resource resource, Int col)

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

font

Source

virtual Font? font(Resource resource, Int col)

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

halign

Source

virtual Halign halign(Int col)

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

Source

virtual Str header(Int col)

Get the header text for specified column.

image

Source

virtual Image? image(Resource resource, Int col)

Get the image to display for specified cell or null. Defaults to resource.icon for the first column.

numCols

Source

virtual Int numCols()

Get number of columns in table. Default returns 1.

prefWidth

Source

virtual Int? prefWidth(Int col)

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

sortCompare

Source

virtual Int sortCompare(Resource resource1, Resource resource2, Int col)

Compare two cells when sorting the given col. Return -1, 0, or 1 according to the same semanatics as sys::Obj.compare. Default behavior sorts text using sys::Str.localeCompare. See fwt::Table.sort.

text

Source

virtual Str text(Resource resource, Int col)

Get the text to display for the specified cell.