A virtualized data table: a fixed header of columns above a UIList of rows, where each row
draws one text cell per column. Only on-screen rows exist as display objects (inherited from
UIList), so a table of any height stays cheap.
Data is provider-driven (setData(rowCount, cellProvider)): the grid never copies the source,
it just asks for cell(row, column) text on demand. Clicking a sortable column header sorts a
display-order permutation in place (the source is untouched); selection is reported and kept in
SOURCE row indices across sorts.
Constructor
new(width:Float, height:Float, rowHeight:Float = 0)
Parameters:
width | layout width |
|---|---|
height | total height (header + rows) |
rowHeight | base (unscaled) row height; 0 picks the platform default |
Variables
Methods
setColumns(columns:Array<UIDataColumn>):Void
Sets the columns and repaints the header.
Parameters:
columns | the column definitions (widths in base/unscaled units) |
|---|
setData(rowCount:Int, cell:(Int, Int) ‑> String):Void
Sets the row data source. cell(row, column) is asked for text lazily.
Parameters:
rowCount | the number of source rows |
|---|---|
cell | resolves a cell's text for a (source row, column) pair |
sortBy(column:Int):Void
Sorts by a column (toggles direction when already sorted by it).
Parameters:
column | the column index (ignored if not |
|---|