Class NavigationPage.Builder<B extends NavigationPage.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
NavigationPage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theNavigationPage
object.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, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theNavigationPage
object. 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:
build
in classWidget.Builder<B extends NavigationPage.Builder<B>>
- Returns:
- a new instance of
NavigationPage
with the properties that were set in the Builder object.
-
setCanPop
Whether the page can be popped from navigation stack.Set it to
FALSE
to disable shortcuts and gestures, as well as remove the back button fromHeaderBar
.Manually calling
NavigationView.pop()
or using thenavigation.pop
action will still work.See
HeaderBar:show-back-button
for removing only the back button, but not shortcuts.- Parameters:
canPop
- the value for thecan-pop
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
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.push
action.- Parameters:
tag
- the value for thetag
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitle
The page title.It's displayed in
HeaderBar
instead 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 thetitle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-