Class NavigationSplitView.Builder<B extends NavigationSplitView.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
NavigationSplitView
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theNavigationSplitView
object.setCollapsed
(boolean collapsed) Whether the split view is collapsed.setContent
(NavigationPage content) The content widget.setMaxSidebarWidth
(double maxSidebarWidth) The maximum sidebar width.setMinSidebarWidth
(double minSidebarWidth) The minimum sidebar width.setShowContent
(boolean showContent) Determines the visible page when collapsed.setSidebar
(NavigationPage sidebar) The sidebar widget.setSidebarWidthFraction
(double sidebarWidthFraction) The preferred sidebar width as a fraction of the total width.setSidebarWidthUnit
(LengthUnit sidebarWidthUnit) The length unit for minimum and maximum sidebar widths.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 theNavigationSplitView
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 toNavigationSplitView
.- Overrides:
build
in classWidget.Builder<B extends NavigationSplitView.Builder<B>>
- Returns:
- a new instance of
NavigationSplitView
with the properties that were set in the Builder object.
-
setCollapsed
Whether the split view is collapsed.When collapsed, the children are put inside an
NavigationView
, otherwise they are displayed side by side.The
NavigationSplitView:show-content
controls which child is visible while collapsed.- Parameters:
collapsed
- the value for thecollapsed
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxSidebarWidth
The maximum sidebar width.Maximum width is affected by
NavigationSplitView:sidebar-width-unit
.The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
- Parameters:
maxSidebarWidth
- the value for themax-sidebar-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMinSidebarWidth
The minimum sidebar width.Minimum width is affected by
NavigationSplitView:sidebar-width-unit
.The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.
- Parameters:
minSidebarWidth
- the value for themin-sidebar-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowContent
Determines the visible page when collapsed.If set to
TRUE
, the content widget will be the visible page whenNavigationSplitView:collapsed
isTRUE
; otherwise the sidebar widget will be visible.If the split view is already collapsed, the visible page changes immediately.
- Parameters:
showContent
- the value for theshow-content
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSidebarWidthFraction
The preferred sidebar width as a fraction of the total width.The preferred width is additionally limited by
NavigationSplitView:min-sidebar-width
andNavigationSplitView:max-sidebar-width
.The sidebar widget can be allocated with larger width if its own minimum width exceeds the preferred width.
- Parameters:
sidebarWidthFraction
- the value for thesidebar-width-fraction
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSidebarWidthUnit
The length unit for minimum and maximum sidebar widths.See
NavigationSplitView:min-sidebar-width
andNavigationSplitView:max-sidebar-width
.- Parameters:
sidebarWidthUnit
- the value for thesidebar-width-unit
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-