MenuNode

@Composable
inline fun <T : Component> MenuNode(noinline factory: () -> T, modifier: SwingModifier = SwingModifier, crossinline update: @DisallowComposableCalls SwingNodeUpdater<T>.() -> Unit = {}, content: @Composable () -> Unit = {})

Emits one menu node into the surrounding MenuApplier composition: factory builds the backing Swing widget, update maps composition state onto it, and content supplies any nested menu items (empty for a leaf such as a single item or separator).

Parameters

factory

builds the backing Swing widget, once, on the pass that creates the node.

modifier

the SwingModifier applied to the widget, after update has run, so a chain can override what the widget's own state declared. Forward the chain the enclosing composable took; defaults to SwingModifier, the empty chain.

update

typed update block; see SwingNodeUpdater. It runs on every pass and may make no composable calls of its own. Defaults to declaring nothing.

content

the nested menu items. Defaults to none, which is what a leaf declares.