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 Type
    Method
    Description
    default boolean
    true while handling an "about to be shown" transition, false while handling a "just hidden" transition.
    The lifecycle of the page being shown or hidden.
    The node instance the owning renderer was resolving when the page transition happened.
    default int
    Index of the page being shown or hidden.
    default void
    Convenience: ask for one more animation frame; see NtxPageLifecycle.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()
      true while handling an "about to be shown" transition, false while handling a "just hidden" transition.
    • repaint

      default void repaint()
      Convenience: ask for one more animation frame; see NtxPageLifecycle.requestFrame().