Package-level declarations

Types

Link copied to clipboard

A caller-supplied failure the library contained rather than letting end the composition, handed to the thread's uncaught-exception handler in its place. cause is the original failure the caller's code raised.

Link copied to clipboard

Governs animations that run until something stops them rather than towards a target.

Link copied to clipboard

Scales how long motion takes, for callers who want animations slowed, drawn out or switched off.

Link copied to clipboard

The debug-only checks the compositions on one recomposer are held to, installed as an element of the coroutine context that recomposer was built over.

Link copied to clipboard

What a composition is driven by: a single Recomposer, the frame clock it recomposes on, and the CoroutineScope they run on. Every content composition nested into one of these recomposes on one recomposer and one frame clock.

Link copied to clipboard

What this library reads from system properties to configure itself for a whole process.

Functions

Link copied to clipboard
fun Component.findLifecycleOwner(): LifecycleOwner?

Finds the LifecycleOwner of the composition root this component stands under, by walking the Swing component tree and reading the LIFECYCLE_OWNER_KEY client property off each JComponent. It answers null where nothing on the way up carries one - for a component in no window, and for a top-level window's content pane, whose ancestors end at a java.awt.Window that is no JComponent.

Link copied to clipboard
fun Component.findRecomposer(): Recomposer?

The Recomposer driving this component's composed content, or null where nothing this library mounted drives it.

Link copied to clipboard
fun JComponent.setLifecycleOwner(owner: LifecycleOwner?)

Sets owner as the LifecycleOwner that composition roots mounted at or under this component read, in place of one following the component itself, and clears it again when passed null.