Package-level declarations
Types
The receiver of the composable cell body a ListCellRenderer stamps a row through: the three values the widget hands a ListCellRenderer for the row being stamped, exposed as read-only composition state so the cell can lay itself out by index, selection, and focus. A ListBox or ComboBox item cell is one such body, as is one a caller writes over their own JList or JComboBox with rememberListItemRenderer.
Declarative choices of a RadioGroup. Each option call appends one radio button, in call order; its position is the index reported to RadioGroup's onSelectionChange and matched against selectedIndex.
The receiver a Table cell composes against: the inputs the table hands a TableCellRenderer for the cell being stamped, exposed as read-only composition state so the cell can lay itself out by row, column, selection and focus.
A hoistable state holder for what a Table has selected, carrying the gesture that brings one of its rows into view.
The receiver a Tree node composes against: the row inputs the tree hands a TreeCellRenderer for the node being stamped, exposed as read-only composition state so the node can lay itself out by position, selection, expansion and focus.
Functions
Declares one column of columnClass values.
A model-driven ListBox driven by a ListState instead of a declared selectedIndices and an onSelectionChange lambda. The state owns the selection: the rows it holds are what the list shows selected, the user's own selecting is written back into it, and it is where a row is revealed from.
A ListBox driven by a ListState instead of a declared selectedIndices and an onSelectionChange lambda. The state owns the selection: the rows it holds are what the list shows selected, the user's own selecting is written back into it, and it is where a row is revealed from.
A model-driven ListBox driven by a raw ListSelectionListener instead of an onSelectionChange lambda. The listener sees the adjusting events of a drag as well as the settled one, and is notified of the user's selection changes only; the latest declared instance is the one notified, so the listener may be declared inline.
A ListBox driven by a caller-owned ListModel instead of a declarative items list. The model is installed as-is and observed only: the library never mutates it, so element changes are the caller's responsibility. Selection is declared with selectedIndices and reported through onSelectionChange, and survives a model swap whether declared or not.
A ListBox driven by a raw ListSelectionListener instead of an onSelectionChange lambda. The listener sees the adjusting events of a drag as well as the settled one, and is notified of the user's selection changes only; the latest declared instance is the one notified, so the listener may be declared inline.
A column of rows the user picks from: a JList showing one row per item, reporting what the user selects.
Renders the items of the component this modifier applies to through renderer.
A set of mutually exclusive choices, backed by a shared ButtonGroup, so at most one option is selected at a time.
Remembers the renderer that stamps content for every item of a component it is installed on, captured against the enclosing composition so the cell sees the state and androidx.compose.runtime.CompositionLocals around this call.
Creates and remembers a ListState starting on initialSelectedIndices.
Creates and remembers a TableState starting on initialSelectedRowIndices.
Creates and remembers a TreeState starting on initialSelectedPaths and initialExpandedPaths.
A model-driven Table driven by a TableState instead of a declared selectedRowIndices and an onSelectionChange lambda. The state owns the selection: the rows it holds are what the table shows selected, the user's own selecting is written back into it, and it is where a row is revealed from.
A model-driven Table driven by raw listeners instead of the onSelectionChange/onSortChange/onColumnLayoutChange lambdas. The selection listener observes the table's selectionModel, so it sees the adjusting events of a drag as well as the settled one. A listener is notified of the user's own changes only, and of what a model swap took away from the user; each is removed on the same instance, so pass a stable one (e.g. remember {}) to avoid churn.
A grid the user reads, sorts, and selects in, over a TableModel the caller owns: a JTable reporting the selection, the sort order, and the column layout the user leaves it in.
A Table driven by a TableState instead of a declared selectedRowIndices and an onSelectionChange lambda. The state owns the selection: the rows it holds are what the table shows selected, the user's own selecting is written back into it, and it is where a row is revealed from.
A Table driven by raw listeners instead of the onSelectionChange/onSortChange/onColumnLayoutChange lambdas. The selection listener observes the table's selectionModel, so it sees the adjusting events of a drag as well as the settled one. A listener is notified of the user's own changes only, and of what a rebuild of the rows or the columns took away from the user; each is removed on the same instance, so pass a stable one (e.g. remember {}) to avoid churn.
A grid the user reads, sorts, and selects in: a JTable reporting the selection, the sort order, and the column layout the user leaves it in.
A model-driven Tree driven by a TreeState instead of declared selectedPaths/expandedPaths and the onSelectionChange/onExpansionChange lambdas. The state owns both facets: the nodes it holds are what the tree shows selected and open, the user's own selecting and opening is written back into it, and it is where a node is revealed from.
A model-driven Tree driven by raw listeners instead of the onSelectionChange/onExpansionChange lambdas. A listener is notified of the user's changes only - the selection listener also of a selection a new model took away from the user - and is removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.
A hierarchy the user opens and selects in, over a TreeModel the caller owns: a JTree reporting what the user selects and opens.
A Tree driven by a TreeState instead of declared selectedPaths/expandedPaths and the onSelectionChange/onExpansionChange lambdas. The state owns both facets: the nodes it holds are what the tree shows selected and open, the user's own selecting and opening is written back into it, and it is where a node is revealed from.
A Tree driven by raw listeners instead of the onSelectionChange/onExpansionChange/onWillExpand lambdas. A listener is notified of the user's changes only - the selection listener also of a selection a new structure took away from the user - and is removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn. The will-expand listener hears more than the user: it is announced every expansion and every collapse, the ones a declaration applies as much as the ones the user asks for, and vetoes the one it refuses by throwing an ExpandVetoException.
A hierarchy the user opens and selects in: a JTree built from data, reporting what the user selects, opens, and edits.