Package-level declarations
Types
A hoistable handle naming the component a menu opens against, bound to one with popupAnchor.
Declarative choices of a RadioButtonMenuGroup. Each option call appends one radio button menu item, in call order; its position is the index reported to RadioButtonMenuGroup's onSelectionChange and matched against selectedIndex.
Functions
A JCheckBoxMenuItem driven by a raw ActionListener instead of an onCheckedChange lambda. The listener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.
A menu item carrying a checkmark: a JCheckBoxMenuItem that shows checked and reports the user's toggle through onCheckedChange.
The menu the platform's popup gesture opens over the component anchor is bound to - a right-click, or whatever else the look and feel gives that gesture, the keyboard binding included.
Variant of ContextMenu that lets the caller decide how the populated JPopupMenu is presented, instead of the default of showing it over the component at the trigger point.
An item that opens onto other items instead of acting itself: a JMenu, a pull-down in a menu bar or a submenu of another menu.
A JMenuItem driven by a raw ActionListener instead of an onClick lambda. The listener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.
An item that performs an action when the user picks it: a JMenuItem reporting the pick through onClick.
The rule a menu draws between groups of items: a JPopupMenu.Separator, which shows no text and is not one of the items the menu's navigation moves through.
Binds anchor to this component, so a menu declared against that anchor opens over it. The binding follows the modifier: it ends when the modifier leaves the chain or the component leaves the composition, and a different anchor declared on a later recomposition takes the binding over from the previous one.
A menu the application opens itself - a drop-down button, an overflow menu, a shortcut - shown over the component anchor is bound to.
Variant of PopupMenu that lets the caller decide how the populated JPopupMenu is presented, instead of the default of showing it at the anchor point under the bound component.
A set of mutually exclusive choices in a menu, backed by a shared ButtonGroup, so at most one option is selected at a time.
A JRadioButtonMenuItem driven by a raw ActionListener instead of an onSelectedChange lambda. The listener is attached as-is and removed on the same instance; pass a stable instance (e.g. remember {}) to avoid churn.
A menu item carrying a radio mark: a JRadioButtonMenuItem that shows selected and reports the user's activation through onSelectedChange. The item stands on its own, so activating it toggles the mark; for a set of items where at most one is marked, use RadioButtonMenuGroup.
Creates and remembers a PopupAnchor for the composition it is called in.