type
constructors
make |
Constructor. |
---|
fields
model |
Model for this table. |
---|---|
sel |
Selection for table |
showHeader |
Is the table header visible. |
stripeClasses |
List of CSS classes applied to rows in sequence, looping as required. |
methods
onAction |
Callback when row is double-clicked. |
---|---|
onHeaderPopup |
Callback to display header popup. |
onSelect |
Callback when selection has changed. |
onSort |
Callback when table is sorted by a column |
onTableEvent |
Callback when a event occurs inside a table cell. |
rebuild |
Rebuild table layout. |
refresh |
Refresh table cell content. |
scrollTo |
Scroll to the given row and column in table. |
sort |
Sort a table by the given column index. |
sortCol |
The column index by which the table is currently sorted, or null if the table is not currently sorted by a column. |
sortDir |
Return if the table is currently sorting up or down. |
Slot Details
make
src
new make()
Constructor.
model
src
TableModel model := TableModel.<ctor>()
Model for this table.
onAction
onHeaderPopup
onSelect
onSort
onTableEvent
src
Void onTableEvent(Str type, |TableEvent| f)
Callback when a event occurs inside a table cell.
rebuild
refresh
scrollTo
sel
showHeader
sort
src
Void sort(Int? col, Dir dir := Dir.up)
Sort a table by the given column index. If col is null, then the table is ordered by its natural order of the table model. Sort order is determined by TableModel.sortCompare
. Sorting does not modify the indexing of TableModel, it only changes how the model is viewed. Also see sortCol
and sortDir
. Table automatically refreshed.