Class TabPage.Builder<B extends TabPage.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
TabPage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theTabPage
object.The child of the page.The icon of the page.setIndicatorActivatable
(boolean indicatorActivatable) Whether the indicator icon is activatable.setIndicatorIcon
(Icon indicatorIcon) An indicator icon for the page.setIndicatorTooltip
(String indicatorTooltip) The tooltip of the indicator icon.setKeyword
(String keyword) The search keyboard of the page.setLiveThumbnail
(boolean liveThumbnail) Whether to enable live thumbnail for this page.setLoading
(boolean loading) Whether the page is loading.setNeedsAttention
(boolean needsAttention) Whether the page needs attention.The parent page of the page.setThumbnailXalign
(float thumbnailXalign) The horizontal alignment of the page thumbnail.setThumbnailYalign
(float thumbnailYalign) The vertical alignment of the page thumbnail.The title of the page.setTooltip
(String tooltip) The tooltip of the page.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 theTabPage
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 toTabPage
.- Overrides:
build
in classGObject.Builder<B extends TabPage.Builder<B>>
- Returns:
- a new instance of
TabPage
with the properties that were set in the Builder object.
-
setChild
-
setIcon
The icon of the page.TabBar
andTabOverview
display the icon next to the title, unlessTabPage:loading
is set toTRUE
.AdwTabBar
also won't show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.- Parameters:
icon
- the value for theicon
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndicatorActivatable
Whether the indicator icon is activatable.If set to
TRUE
,TabView::indicator-activated
will be emitted when the indicator icon is clicked.If
TabPage:indicator-icon
is not set, does nothing.- Parameters:
indicatorActivatable
- the value for theindicator-activatable
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndicatorIcon
An indicator icon for the page.A common use case is an audio or camera indicator in a web browser.
TabBar
will show it at the beginning of the tab, alongside icon representingTabPage:icon
or loading spinner.If the page is pinned, the indicator will be shown instead of icon or spinner.
TabOverview
will show it at the at the top part of the thumbnail.TabPage:indicator-tooltip
can be used to set the tooltip on the indicator icon.If
TabPage:indicator-activatable
is set toTRUE
, the indicator icon can act as a button.- Parameters:
indicatorIcon
- the value for theindicator-icon
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndicatorTooltip
The tooltip of the indicator icon.The tooltip can be marked up with the Pango text markup language.
See
TabPage:indicator-icon
.- Parameters:
indicatorTooltip
- the value for theindicator-tooltip
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setKeyword
The search keyboard of the page.TabOverview
can search pages by their keywords in addition to their titles and tooltips.Keywords allow to include e.g. page URLs into tab search in a web browser.
- Parameters:
keyword
- the value for thekeyword
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLiveThumbnail
Whether to enable live thumbnail for this page.When set to
TRUE
, the page's thumbnail inTabOverview
will update immediately when the page is redrawn or resized.If it's set to
FALSE
, the thumbnail will only be live when the page is selected, and otherwise it will be static and will only update whenTabPage.invalidateThumbnail()
orTabView.invalidateThumbnails()
is called.- Parameters:
liveThumbnail
- the value for thelive-thumbnail
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLoading
Whether the page is loading.If set to
TRUE
,TabBar
andTabOverview
will display a spinner in place of icon.If the page is pinned and
TabPage:indicator-icon
is set, loading status will not be visible withAdwTabBar
.- Parameters:
loading
- the value for theloading
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setNeedsAttention
Whether the page needs attention.TabBar
will display a line under the tab representing the page if set toTRUE
. If the tab is not visible, the corresponding edge of the tab bar will be highlighted.TabOverview
will display a dot in the corner of the thumbnail if set toTRUE
.TabButton
will display a dot if any of the pages that aren't selected have this property set toTRUE
.- Parameters:
needsAttention
- the value for theneeds-attention
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setParent
The parent page of the page.See
TabView.addPage(org.gnome.gtk.Widget, org.gnome.adw.TabPage)
andTabView.closePage(org.gnome.adw.TabPage)
.- Parameters:
parent
- the value for theparent
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setThumbnailXalign
The horizontal alignment of the page thumbnail.If the page is so wide that
TabOverview
can't display it completely and has to crop it, horizontal alignment will determine which part of the page will be visible.For example, 0.5 means the center of the page will be visible, 0 means the start edge will be visible and 1 means the end edge will be visible.
The default horizontal alignment is 0.
- Parameters:
thumbnailXalign
- the value for thethumbnail-xalign
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setThumbnailYalign
The vertical alignment of the page thumbnail.If the page is so tall that
TabOverview
can't display it completely and has to crop it, vertical alignment will determine which part of the page will be visible.For example, 0.5 means the center of the page will be visible, 0 means the top edge will be visible and 1 means the bottom edge will be visible.
The default vertical alignment is 0.
- Parameters:
thumbnailYalign
- the value for thethumbnail-yalign
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitle
The title of the page.TabBar
will display it in the center of the tab unless it's pinned, and will use it as a tooltip unlessTabPage:tooltip
is set.TabOverview
will display it below the thumbnail unless it's pinned, or inside the card otherwise, and will use it as a tooltip unlessTabPage:tooltip
is set.- Parameters:
title
- the value for thetitle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTooltip
The tooltip of the page.The tooltip can be marked up with the Pango text markup language.
If not set,
TabBar
andTabOverview
will useTabPage:title
as a tooltip instead.- Parameters:
tooltip
- the value for thetooltip
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-