Class TabPage.Builder<B extends TabPage.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Enclosing class:
TabPage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theTabPageobject.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
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theTabPageobject. 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:
buildin classGObject.Builder<B extends TabPage.Builder<B>>- Returns:
- a new instance of
TabPagewith the properties that were set in the Builder object.
-
setChild
-
setIcon
The icon of the page.TabBarandTabOverviewdisplay the icon next to the title, unlessTabPage:loadingis set toTRUE.AdwTabBaralso won't show the icon if the page is pinned and [propertyTabPage:indicator-icon] is set.- Parameters:
icon- the value for theiconproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setIndicatorActivatable
Whether the indicator icon is activatable.If set to
TRUE,TabView::indicator-activatedwill be emitted when the indicator icon is clicked.If
TabPage:indicator-iconis not set, does nothing.- Parameters:
indicatorActivatable- the value for theindicator-activatableproperty- Returns:
- the
Builderinstance 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.
TabBarwill show it at the beginning of the tab, alongside icon representingTabPage:iconor loading spinner.If the page is pinned, the indicator will be shown instead of icon or spinner.
TabOverviewwill show it at the at the top part of the thumbnail.TabPage:indicator-tooltipcan be used to set the tooltip on the indicator icon.If
TabPage:indicator-activatableis set toTRUE, the indicator icon can act as a button.- Parameters:
indicatorIcon- the value for theindicator-iconproperty- Returns:
- the
Builderinstance 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-tooltipproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.2
-
setKeyword
The search keyboard of the page.TabOverviewcan 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 thekeywordproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.3
-
setLiveThumbnail
Whether to enable live thumbnail for this page.When set to
TRUE, the page's thumbnail inTabOverviewwill 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-thumbnailproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.3
-
setLoading
Whether the page is loading.If set to
TRUE,TabBarandTabOverviewwill display a spinner in place of icon.If the page is pinned and
TabPage:indicator-iconis set, loading status will not be visible withAdwTabBar.- Parameters:
loading- the value for theloadingproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setNeedsAttention
Whether the page needs attention.TabBarwill 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.TabOverviewwill display a dot in the corner of the thumbnail if set toTRUE.TabButtonwill display a dot if any of the pages that aren't selected have this property set toTRUE.- Parameters:
needsAttention- the value for theneeds-attentionproperty- Returns:
- the
Builderinstance 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 theparentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setThumbnailXalign
The horizontal alignment of the page thumbnail.If the page is so wide that
TabOverviewcan'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-xalignproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.3
-
setThumbnailYalign
The vertical alignment of the page thumbnail.If the page is so tall that
TabOverviewcan'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-yalignproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.3
-
setTitle
The title of the page.TabBarwill display it in the center of the tab unless it's pinned, and will use it as a tooltip unlessTabPage:tooltipis set.TabOverviewwill display it below the thumbnail unless it's pinned, or inside the card otherwise, and will use it as a tooltip unlessTabPage:tooltipis set.- Parameters:
title- the value for thetitleproperty- Returns:
- the
Builderinstance 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,
TabBarandTabOverviewwill useTabPage:titleas a tooltip instead.- Parameters:
tooltip- the value for thetooltipproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-