Class ToolbarView.Builder<B extends ToolbarView.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
ToolbarView
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theToolbarView
object.setBottomBarStyle
(ToolbarStyle bottomBarStyle) Appearance of the bottom bars.setContent
(Widget content) The content widget.setExtendContentToBottomEdge
(boolean extendContentToBottomEdge) Whether the content widget can extend behind bottom bars.setExtendContentToTopEdge
(boolean extendContentToTopEdge) Whether the content widget can extend behind top bars.setRevealBottomBars
(boolean revealBottomBars) Whether bottom bars are visible.setRevealTopBars
(boolean revealTopBars) Whether top bars are revealed.setTopBarStyle
(ToolbarStyle topBarStyle) Appearance of the top bars.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 theToolbarView
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 toToolbarView
.- Overrides:
build
in classWidget.Builder<B extends ToolbarView.Builder<B>>
- Returns:
- a new instance of
ToolbarView
with the properties that were set in the Builder object.
-
setBottomBarStyle
Appearance of the bottom bars.If set to
ADW_TOOLBAR_FLAT
, bottom bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the.undershoot-bottom
style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the bottom of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a bottom bar is actually present and visible. It is also never present if
ToolbarView:extend-content-to-bottom-edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, bottom bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the bottom bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
ToolbarView:top-bar-style
.- Parameters:
bottomBarStyle
- the value for thebottom-bar-style
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setContent
-
setExtendContentToBottomEdge
Whether the content widget can extend behind bottom bars.This can be used in combination with
ToolbarView:reveal-bottom-bars
to show and hide toolbars in fullscreen.See
ToolbarView:extend-content-to-top-edge
.- Parameters:
extendContentToBottomEdge
- the value for theextend-content-to-bottom-edge
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setExtendContentToTopEdge
Whether the content widget can extend behind top bars.This can be used in combination with
ToolbarView:reveal-top-bars
to show and hide toolbars in fullscreen.See
ToolbarView:extend-content-to-bottom-edge
.- Parameters:
extendContentToTopEdge
- the value for theextend-content-to-top-edge
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRevealBottomBars
Whether bottom bars are visible.The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-bottom-edge
to show and hide toolbars in fullscreen.See
ToolbarView:reveal-top-bars
.- Parameters:
revealBottomBars
- the value for thereveal-bottom-bars
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRevealTopBars
Whether top bars are revealed.The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-top-edge
to show and hide toolbars in fullscreen.See
ToolbarView:reveal-bottom-bars
.- Parameters:
revealTopBars
- the value for thereveal-top-bars
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTopBarStyle
Appearance of the top bars.If set to
ADW_TOOLBAR_FLAT
, top bars are flat and scrolling content has a subtle undershoot shadow when touching them, same as the.undershoot-top
style class. This works well for simple content, e.g.StatusPage
orPreferencesPage
, where the background at the top of the page is uniform. Additionally, windows with sidebars should always use this style.Undershoot shadow is only present if a top bar is actually present and visible. It is also never present if
ToolbarView:extend-content-to-top-edge
is set toTRUE
.If set to
ADW_TOOLBAR_RAISED
, top bars have an opaque background and a persistent shadow, this is suitable for content such as utility panes, where some elements are directly adjacent to the top bars, orTabView
, where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
is similar toADW_TOOLBAR_RAISED
, but the shadow is replaced with a more subtle border. This can be useful for applications like image viewers.See also
ToolbarView:bottom-bar-style
.- Parameters:
topBarStyle
- the value for thetop-bar-style
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-