Package-level declarations
Types
Builds and presents the popup menu of a Tray. On each showMenu call it composes menu fresh into a JPopupMenu nested in parentContext, so the menu reflects the current composition state, then hands the populated popup to display. The menu composition is disposed when the popup closes, when a newer showMenu call replaces it, or when closeMenu closes it.
Functions
A composable that hands you the raw Graphics2D of a blank Swing surface so you can draw whatever you like.
A model-driven ComboBox driven by a raw ActionListener instead of an onSelectionChange lambda. The model owns its items and selection and is never mutated by the library. The actionListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn. Swapping the model instance installs the new model verbatim.
A ComboBox driven by a caller-owned ComboBoxModel. The model owns both the items and the selection, so this overload is observation-only: it renders the model and reports selection changes through onSelectionChange without ever writing the selection back into the model. Swapping the model instance installs the new model verbatim.
A ComboBox driven by a raw ActionListener instead of an onSelectionChange lambda. The actionListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn. Being attached as-is, it is notified of every action event the combo box fires, including the one that applies selectedItem. selectedItem is declared, applied and re-asserted as on the onSelectionChange-driven overload.
A JComboBox over items: it shows the item that is selected and drops the full list down in a popup for the user to choose from.
A JLabel showing text: non-interactive text, which the Tab focus cycle skips, though a focus request still lands on it.
A JProgressBar reporting the progress a caller-owned BoundedRangeModel holds. The model owns the value and the range, so nothing is declared over it: the bar renders whatever the model holds, and a model the caller mutates repaints the bar without a recomposition. Supplying a new model instance installs it on recomposition.
A JSeparator: the divider line that breaks the items of any container into groups. A tool bar takes its own divider - see org.jetbrains.compose.swing.components.layout.ToolBarSeparator.
A model-driven Slider driven by a raw ChangeListener instead of the onValueChange and onValueSettled lambdas. The model is rendered as-is and never written to by the library. The changeListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn, and read getValueIsAdjusting off the slider to tell the values a drag passes through from the one it settles on.
A Slider over a caller-owned BoundedRangeModel. The model owns the value and the range, so nothing is declared over it: the slider renders whatever the model holds, the library never writes to it, and a model the caller mutates repaints the slider without a recomposition. Supplying a new model instance installs it on recomposition.
A Slider driven by a raw ChangeListener instead of the onValueChange and onValueSettled lambdas. The changeListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid a detach/re-attach on every recomposition. Being attached as-is, it is notified of every change to the slider's value - the values a drag passes through as well as the one it settles on, and the change that applies value included - and reads getValueIsAdjusting off the slider to tell them apart.
A JSpinner over a caller-owned model, driven by a raw changeListener rather than by a value the spinner reports back. The changeListener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn. Swapping the model instance installs the new model verbatim.
A JSpinner over items: it shows the one selected value in an editable field beside a pair of arrows that step from one item to the next, without wrapping at either end. Text typed at the end of the field is completed to the next item starting with it, so a distinguishing prefix is enough to commit one.
A JSpinner over dates: it shows value in an editable field beside a pair of arrows that step it by one calendarField, through a SpinnerDateModel built from start and end.
A JSpinner over numbers: it shows value in an editable field beside a pair of arrows that step it by step, through a SpinnerNumberModel built from min, max and step. A value the user leaves the spinner on and the caller does not answer with a matching value is settled back onto the declared one, so the spinner shows what the composition holds.