OnDemandComposition
A composition of Swing content under parent. It recomposes when parent snapshot state it reads changes. recompose drives its own synchronous pass on the caller's thread before returning, without waiting for the enclosing window's frame loop.
content's one top-level component is handed to the caller by recompose rather than added to a container - this composition places nothing of its own. Content that composes more than one top-level component is refused with IllegalStateException, since there would be no single component to hand back; composing it for the first time on construction is held to the same rule. Any later refusal disposes the composition before it is reported.
content shares parent's state and CompositionLocals.
Must be constructed, recomposed, and disposed on the Event Dispatch Thread.
Parameters
the composition context this composition joins.
content composed on construction and by recompose.
Functions
Runs update, then recomposes and applies this composition synchronously, so its Swing subtree is fully materialized before this returns. The write is recorded against this composition so the synchronous recompose sees the change; this takes no frame from a window recomposer.