Class OverlaySplitView.Builder<B extends OverlaySplitView.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
OverlaySplitView
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theOverlaySplitView
object.setCollapsed
(boolean collapsed) Whether the split view is collapsed.setContent
(Widget content) The content widget.setEnableHideGesture
(boolean enableHideGesture) Whether the sidebar can be closed with a swipe gesture.setEnableShowGesture
(boolean enableShowGesture) Whether the sidebar can be opened with an edge swipe gesture.setMaxSidebarWidth
(double maxSidebarWidth) The maximum sidebar width.setMinSidebarWidth
(double minSidebarWidth) The minimum sidebar width.setPinSidebar
(boolean pinSidebar) Whether the sidebar widget is pinned.setShowSidebar
(boolean showSidebar) Whether the sidebar widget is shown.setSidebar
(Widget sidebar) The sidebar widget.setSidebarPosition
(PackType sidebarPosition) The sidebar position.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 theOverlaySplitView
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 toOverlaySplitView
.- Overrides:
build
in classWidget.Builder<B extends OverlaySplitView.Builder<B>>
- Returns:
- a new instance of
OverlaySplitView
with the properties that were set in the Builder object.
-
setCollapsed
Whether the split view is collapsed.When collapsed, the sidebar widget is presented as an overlay above the content widget, otherwise they are displayed side by side.
- Parameters:
collapsed
- the value for thecollapsed
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setContent
-
setEnableHideGesture
Whether the sidebar can be closed with a swipe gesture.Only touchscreen swipes are supported.
- Parameters:
enableHideGesture
- the value for theenable-hide-gesture
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEnableShowGesture
Whether the sidebar can be opened with an edge swipe gesture.Only touchscreen swipes are supported.
- Parameters:
enableShowGesture
- the value for theenable-show-gesture
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxSidebarWidth
The maximum sidebar width.Maximum width is affected by
OverlaySplitView: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
OverlaySplitView: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
-
setPinSidebar
Whether the sidebar widget is pinned.By default, collapsing
self
automatically hides the sidebar widget, and uncollapsing it shows the sidebar. If set toTRUE
, sidebar visibility never changes on its own.- Parameters:
pinSidebar
- the value for thepin-sidebar
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowSidebar
Whether the sidebar widget is shown.- Parameters:
showSidebar
- the value for theshow-sidebar
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSidebar
-
setSidebarPosition
The sidebar position.If it's set to
GTK_PACK_START
, the sidebar is displayed before the content, ifGTK_PACK_END
, it's displayed after the content.- Parameters:
sidebarPosition
- the value for thesidebar-position
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
OverlaySplitView:min-sidebar-width
andOverlaySplitView: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
OverlaySplitView:min-sidebar-width
andOverlaySplitView:max-sidebar-width
.- Parameters:
sidebarWidthUnit
- the value for thesidebar-width-unit
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-