Interface NtxPageLifecycleEvent
public interface NtxPageLifecycleEvent
Event delivered to a node renderer's
NTxNodeRenderer.onPageShow(NtxPageLifecycleEvent) /
NTxNodeRenderer.onPageHide(NtxPageLifecycleEvent) hooks when the page
that contains node() starts or stops being shown.
Hooks are the counterpart of NtxPageLifecycle.requestFrame(): use them
for exactly-once side effects around a slide transition (start/stop an async
computation, reset a chronometer, release a resource), not for per-frame work.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleantruewhile handling an "about to be shown" transition,falsewhile handling a "just hidden" transition.The lifecycle of the page being shown or hidden.node()The node instance the owning renderer was resolving when the page transition happened.default intIndex of the page being shown or hidden.default voidrepaint()Convenience: ask for one more animation frame; seeNtxPageLifecycle.requestFrame().
-
Method Details
-
node
NTxNode node()The node instance the owning renderer was resolving when the page transition happened. -
lifecycle
NtxPageLifecycle lifecycle()The lifecycle of the page being shown or hidden. -
pageIndex
default int pageIndex()Index of the page being shown or hidden. -
isShowing
default boolean isShowing()truewhile handling an "about to be shown" transition,falsewhile handling a "just hidden" transition. -
repaint
default void repaint()Convenience: ask for one more animation frame; seeNtxPageLifecycle.requestFrame().
-