Class NavigationPage.Builder<B extends NavigationPage.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Enclosing class:
NavigationPage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theNavigationPageobject.onHidden(NavigationPage.HiddenCallback handler) Emitted when the navigation view transition has been completed and the page is fully hidden.onHiding(NavigationPage.HidingCallback handler) Emitted when the page starts hiding at the beginning of the navigation view transition.onShowing(NavigationPage.ShowingCallback handler) Emitted when the page shows at the beginning of the navigation view transition.onShown(NavigationPage.ShownCallback handler) Emitted when the navigation view transition has been completed and the page is fully shown.setCanPop(boolean canPop) Whether the page can be popped from navigation stack.The child widget.The page tag.The page title.Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theNavigationPageobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toNavigationPage.- Overrides:
buildin classWidget.Builder<B extends NavigationPage.Builder<B>>- Returns:
- a new instance of
NavigationPagewith the properties that were set in the Builder object.
-
setCanPop
Whether the page can be popped from navigation stack.Set it to
FALSEto disable shortcuts and gestures, as well as remove the back button fromHeaderBar.Manually calling
NavigationView.pop()or using thenavigation.popaction will still work.See
HeaderBar:show-back-buttonfor removing only the back button, but not shortcuts.- Parameters:
canPop- the value for thecan-popproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setChild
-
setTag
The page tag.The tag can be used to retrieve the page with
NavigationView.findPage(java.lang.String), as well as withNavigationView.pushByTag(java.lang.String),NavigationView.popToTag(java.lang.String)orNavigationView.replaceWithTags(java.lang.String[]).Tags must be unique within each
NavigationView.The tag also must be set to use the
navigation.pushaction.- Parameters:
tag- the value for thetagproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setTitle
The page title.It's displayed in
HeaderBarinstead of the window title, and used as the tooltip on the next page's back button, as well as by screen reader.- Parameters:
title- the value for thetitleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-