Class GuiViewTransition
start(Runnable) snapshots the currently laid-out retained tree
and captures the current framebuffer pixels, performs the mutation
synchronously, and captures the new tree on the next layout. The old pixel
texture is remapped over morphing bounds; retained box paint is the
allocation-failure fallback.
Starting another transition cancels the prior run and uses its current composited
geometry as the new old state. Retained component identity is matched first,
followed by an explicit transition name or component ID. Anonymous recreated
nodes are never paired merely because they occupy the same structural path.
Retained or stably identified nodes morph between their old and new bounds;
genuinely new nodes fade in and removed nodes fade out.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordInspectable snapshot metadata.static enumstatic enumTransition lifecycle state. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()duration(double seconds) Selects the transition duration.Selects the progress easing.finished()Completes when the current run finishes or is skipped.ready()Completes when both old and new snapshots exist.voidEnds the active transition immediately.Returns inspectable immutable snapshot geometry.Captures the old retained state and framebuffer texture, then applies the state mutation.state()
-
Method Details
-
duration
Selects the transition duration.- Parameters:
seconds- non-negative seconds- Returns:
- this transition controller
-
easing
Selects the progress easing.- Parameters:
easing- easing function- Returns:
- this transition controller
-
start
Captures the old retained state and framebuffer texture, then applies the state mutation.Only one transition can run per host. A replacement begins from the currently composited geometry of the active transition. Unchanged retained components remain continuously painted by the live tree. Retained instances and recreated components with a matching ID morph between bounds; anonymous entrants fade in and removed nodes fade out.
- Parameters:
mutation- synchronous retained-tree mutation- Returns:
- this transition controller
-
skipTransition
public void skipTransition()Ends the active transition immediately. -
state
-
active
public boolean active() -
failureReason
-
ready
Completes when both old and new snapshots exist.- Returns:
- readiness stage for the current run
-
finished
Completes when the current run finishes or is skipped.- Returns:
- completion stage for the current run
-
snapshots
Returns inspectable immutable snapshot geometry.- Returns:
- old and new snapshot records
-