Class NavigationView.Builder<B extends NavigationView.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
NavigationView

public static class NavigationView.Builder<B extends NavigationView.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.4
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public NavigationView build()
      Finish building the NavigationView object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to NavigationView.
      Overrides:
      build in class Widget.Builder<B extends NavigationView.Builder<B>>
      Returns:
      a new instance of NavigationView with the properties that were set in the Builder object.
    • setAnimateTransitions

      public B setAnimateTransitions(boolean animateTransitions)

      Whether to animate page transitions.

      Gesture-based transitions are always animated.

      Parameters:
      animateTransitions - the value for the animate-transitions property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
    • setHhomogeneous

      public B setHhomogeneous(boolean hhomogeneous)

      Whether the view is horizontally homogeneous.

      If the view is horizontally homogeneous, it allocates the same width for all pages.

      If it's not, the page may change width when a different page becomes visible.

      Parameters:
      hhomogeneous - the value for the hhomogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • setPopOnEscape

      public B setPopOnEscape(boolean popOnEscape)

      Whether pressing Escape pops the current page.

      Applications using AdwNavigationView to implement a browser may want to disable it.

      Parameters:
      popOnEscape - the value for the pop-on-escape property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
    • setVhomogeneous

      public B setVhomogeneous(boolean vhomogeneous)

      Whether the view is vertically homogeneous.

      If the view is vertically homogeneous, it allocates the same height for all pages.

      If it's not, the view may change height when a different page becomes visible.

      Parameters:
      vhomogeneous - the value for the vhomogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • onGetNextPage

      public B onGetNextPage(NavigationView.GetNextPageCallback handler)

      Emitted when a push shortcut or a gesture is triggered.

      To support the push shortcuts and gestures, the application is expected to return the page to push in the handler.

      This signal can be emitted multiple times for the gestures, for example when the gesture is cancelled by the user. As such, the application must not make any irreversible changes in the handler, such as removing the page from a forward stack.

      Instead, it should be done in the NavigationView::pushed handler.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
      See Also:
    • onPopped

      public B onPopped(NavigationView.PoppedCallback handler)

      Emitted after page has been popped from the navigation stack.

      See NavigationView.pop().

      When using NavigationView.popToPage(NavigationPage) or NavigationView.popToTag(String), this signal is emitted for each of the popped pages.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
      See Also:
    • onPushed

      public B onPushed(NavigationView.PushedCallback handler)

      Emitted after a page has been pushed to the navigation stack.

      See NavigationView.push(NavigationPage).

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
      See Also:
    • onReplaced

      public B onReplaced(NavigationView.ReplacedCallback handler)

      Emitted after the navigation stack has been replaced.

      See NavigationView.replace(NavigationPage[]).

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.4
      See Also: