Class TabPage
- All Implemented Interfaces:
Accessible,Proxy
TabView.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTabPage.Builder<B extends TabPage.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface org.gnome.gtk.Accessible
Accessible.Accessible$Impl, Accessible.AccessibleInterface -
Constructor Summary
ConstructorsConstructorDescriptionTabPage()Creates a new TabPage.TabPage(MemorySegment address) Create a TabPage proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected TabPageasParent()Returns this instance as if it were its parent type.static TabPage.Builder<? extends TabPage.Builder> builder()ATabPage.Builderobject constructs aTabPagewith the specified properties.getChild()Gets the child ofself.@Nullable IcongetIcon()Gets the icon ofself.booleanGets whether the indicator of this TabPage is activatable.@Nullable IconGets the indicator icon ofself.Gets the tooltip of the indicator icon ofself.@Nullable StringGets the search keyword ofself.booleanGets whether to live thumbnail is enabledself.booleanGets whether this TabPage is loading.booleanGets whether this TabPage needs attention.@Nullable TabPageGets the parent page ofself.booleanGets whether this TabPage is pinned.booleanGets whether this TabPage is selected.floatGets the horizontal alignment of the thumbnail forself.floatGets the vertical alignment of the thumbnail forself.getTitle()Gets the title ofself.@Nullable StringGets the tooltip ofself.static @Nullable TypegetType()Get the GType of the TabPage classvoidInvalidates thumbnail forself.voidSets the icon ofself.voidsetIndicatorActivatable(boolean activatable) Sets whether the indicator of this TabPage is activatable.voidsetIndicatorIcon(@Nullable Icon indicatorIcon) Sets the indicator icon ofself.voidsetIndicatorTooltip(String tooltip) Sets the tooltip of the indicator icon ofself.voidsetKeyword(String keyword) Sets the search keyword forself.voidsetLiveThumbnail(boolean liveThumbnail) Sets whether to enable live thumbnail forself.voidsetLoading(boolean loading) Sets whether this TabPage is loading.voidsetNeedsAttention(boolean needsAttention) Sets whether this TabPage needs attention.voidsetThumbnailXalign(float xalign) Sets the horizontal alignment of the thumbnail forself.voidsetThumbnailYalign(float yalign) Sets the vertical alignment of the thumbnail forself.voidTabBarwill display it in the center of the tab unless it's pinned, and will use it as a tooltip unlessTabPage:tooltipis set.voidsetTooltip(String tooltip) Sets the tooltip ofself.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible
announce, getAccessibleParent, getAccessibleRole, getAtContext, getBounds, getFirstAccessibleChild, getNextAccessibleSibling, getPlatformState, resetProperty, resetRelation, resetState, setAccessibleParent, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState
-
Constructor Details
-
TabPage
Create a TabPage proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TabPage
public TabPage()Creates a new TabPage.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getChild
-
getIcon
-
getIndicatorActivatable
public boolean getIndicatorActivatable()Gets whether the indicator of this TabPage is activatable.- Returns:
- whether the indicator is activatable
-
getIndicatorIcon
Gets the indicator icon ofself.- Returns:
- the indicator icon of this TabPage
-
getIndicatorTooltip
Gets the tooltip of the indicator icon ofself.- Returns:
- the indicator tooltip of this TabPage
- Since:
- 1.2
-
getKeyword
Gets the search keyword ofself.- Returns:
- the search keyword of this TabPage
- Since:
- 1.3
-
getLiveThumbnail
public boolean getLiveThumbnail()Gets whether to live thumbnail is enabledself.- Returns:
- whether live thumbnail is enabled
- Since:
- 1.3
-
getLoading
public boolean getLoading()Gets whether this TabPage is loading.- Returns:
- whether this TabPage is loading
-
getNeedsAttention
public boolean getNeedsAttention()Gets whether this TabPage needs attention.- Returns:
- whether this TabPage needs attention
-
getParent
Gets the parent page ofself.See
TabView.addPage(org.gnome.gtk.Widget, org.gnome.adw.TabPage)andTabView.closePage(org.gnome.adw.TabPage).- Returns:
- the parent page
-
getPinned
public boolean getPinned()Gets whether this TabPage is pinned.- Returns:
- whether this TabPage is pinned
-
getSelected
public boolean getSelected()Gets whether this TabPage is selected.- Returns:
- whether this TabPage is selected
-
getThumbnailXalign
public float getThumbnailXalign()Gets the horizontal alignment of the thumbnail forself.- Returns:
- the horizontal alignment
- Since:
- 1.3
-
getThumbnailYalign
public float getThumbnailYalign()Gets the vertical alignment of the thumbnail forself.- Returns:
- the vertical alignment
- Since:
- 1.3
-
getTitle
-
getTooltip
-
invalidateThumbnail
public void invalidateThumbnail()Invalidates thumbnail forself.If an
TabOverviewis open, the thumbnail representing this TabPage will be immediately updated. Otherwise it will be update when opening the overview.Does nothing if
TabPage:live-thumbnailis set toTRUE.See also
TabView.invalidateThumbnails().- Since:
- 1.3
-
setIcon
Sets the icon ofself.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 icon of this TabPage
-
setIndicatorActivatable
public void setIndicatorActivatable(boolean activatable) Sets whether the indicator of this TabPage 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:
activatable- whether the indicator is activatable
-
setIndicatorIcon
Sets the indicator icon ofself.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 indicator icon of this TabPage
-
setIndicatorTooltip
Sets the tooltip of the indicator icon ofself.The tooltip can be marked up with the Pango text markup language.
See
TabPage:indicator-icon.- Parameters:
tooltip- the indicator tooltip of this TabPage- Since:
- 1.2
-
setKeyword
Sets the search keyword forself.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 search keyword- Since:
- 1.3
-
setLiveThumbnail
public void setLiveThumbnail(boolean liveThumbnail) Sets whether to enable live thumbnail forself.When set to
TRUE,self'sthumbnail inTabOverviewwill update immediately when this TabPage is redrawn or resized.If it's set to
FALSE, the thumbnail will only be live when the this TabPage is selected, and otherwise it will be static and will only update wheninvalidateThumbnail()orTabView.invalidateThumbnails()is called.- Parameters:
liveThumbnail- whether to enable live thumbnail- Since:
- 1.3
-
setLoading
public void setLoading(boolean loading) Sets whether this TabPage 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- whether this TabPage is loading
-
setNeedsAttention
public void setNeedsAttention(boolean needsAttention) Sets whether this TabPage 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 haveTabPage:needs-attentionset toTRUE.- Parameters:
needsAttention- whether this TabPage needs attention
-
setThumbnailXalign
public void setThumbnailXalign(float xalign) Sets the horizontal alignment of the thumbnail forself.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:
xalign- the new value- Since:
- 1.3
-
setThumbnailYalign
public void setThumbnailYalign(float yalign) Sets the vertical alignment of the thumbnail forself.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:
yalign- the new value- Since:
- 1.3
-
setTitle
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.Sets the title of
self.- Parameters:
title- the title of this TabPage
-
setTooltip
Sets the tooltip ofself.The tooltip can be marked up with the Pango text markup language.
If not set,
TabBarandTabOverviewwill useTabPage:titleas a tooltip instead.- Parameters:
tooltip- the tooltip of this TabPage
-
builder
ATabPage.Builderobject constructs aTabPagewith the specified properties. Use the variousset...()methods to set properties, and finish construction withTabPage.Builder.build().- Returns:
- the builder object
-