Composites
Larger widgets built from many smaller ones. Full method lists: Composites API.
DataTable
new DataTable(name, rowHeight). A table with a header, sortable and searchable columns, single or multi selection, a virtual scroll mode for large data sets, zebra striping and dividers.
| Area | Calls |
|---|---|
| Columns | addColumn(new DataTableColumn(key, header)), with weight, fixedWidth, sortable, searchable, sortType (SORT_ALPHA, SORT_NUMERIC, SORT_CUSTOM), clipMode (CLIP_ELLIPSIS, CLIP_MASK). Helpers: labelColumn, meterColumn, selectionColumn. |
| Data | setItems(rows) or bindItems(reactiveArray). Each row is any value; a column's key names the field it shows. |
| Selection | SELECTION_MODE_NONE, SELECTION_MODE_SINGLE, SELECTION_MODE_MULTI; bindSelectedIndexes(get, set); setRowClickSelects. |
| Search | bindSearchFilter(Ref<string>) or bindSearchInput(textInput). |
| Scrolling | SCROLL_MODE_VIRTUAL (the default) or SCROLL_MODE_STATIC; bindScrollPos; after a sort, ON_SORT_SCROLL_NONE, ON_SORT_SCROLL_TO_SELECTION or ON_SORT_SCROLL_TO_TOP. |
In XML, <DataTable> takes the table settings as attributes and one <Column> child per column (see the tag reference). Rows are always supplied in code.
GradientEditor
new GradientEditor(name, family, size). Edit a color gradient: add, move and recolor stops, and switch between horizontal, vertical and four-corner modes (GRADIENT_MODE_H, GRADIENT_MODE_V, GRADIENT_MODE_FOUR_CORNER). bindValue(Ref<Gradient>), setOnChange, setShowModeSelector.