Class TabPage
- All Implemented Interfaces:
Proxy
,Accessible
TabView
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TabPage.Builder<B extends TabPage.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
Nested classes/interfaces inherited from interface org.gnome.gtk.Accessible
Accessible.AccessibleImpl, Accessible.AccessibleInterface
-
Constructor Summary
ConstructorDescriptionTabPage
(MemorySegment address) Create a TabPage proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected TabPage
asParent()
Returns this instance as if it were its parent type.static TabPage.Builder
<? extends TabPage.Builder> builder()
ATabPage.Builder
object constructs aTabPage
with the specified properties.getChild()
Gets the child of this TabPage.getIcon()
Gets the icon of this TabPage.boolean
Gets whether the indicator of this TabPage is activatable.Gets the indicator icon of this TabPage.Gets the tooltip of the indicator icon of this TabPage.Gets the search keyword of this TabPage.boolean
Gets whether to live thumbnail is enabled this TabPage.boolean
Gets whether this TabPage is loading.boolean
Gets whether this TabPage needs attention.Gets the parent page of this TabPage.boolean
Gets whether this TabPage is pinned.boolean
Gets whether this TabPage is selected.float
Gets the horizontal alignment of the thumbnail for this TabPage.float
Gets the vertical alignment of the thumbnail for this TabPage.getTitle()
Gets the title of this TabPage.Gets the tooltip of this TabPage.static Type
getType()
Get the GType of the TabPage classvoid
Invalidates thumbnail for this TabPage.void
Sets the icon of this TabPage.void
setIndicatorActivatable
(boolean activatable) Sets whether the indicator of this TabPage is activatable.void
setIndicatorIcon
(@Nullable Icon indicatorIcon) Sets the indicator icon of this TabPage.void
setIndicatorTooltip
(String tooltip) Sets the tooltip of the indicator icon of this TabPage.void
setKeyword
(String keyword) Sets the search keyword for this TabPage.void
setLiveThumbnail
(boolean liveThumbnail) Sets whether to enable live thumbnail for this TabPage.void
setLoading
(boolean loading) Sets whether this TabPage is loading.void
setNeedsAttention
(boolean needsAttention) Sets whether this TabPage needs attention.void
setThumbnailXalign
(float xalign) Sets the horizontal alignment of the thumbnail for this TabPage.void
setThumbnailYalign
(float yalign) Sets the vertical alignment of the thumbnail for this TabPage.void
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.void
setTooltip
(String tooltip) Sets the tooltip of this TabPage.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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible
announce, getAccessibleParent, getAccessibleRole, getAtContext, getBounds, getFirstAccessibleChild, getNextAccessibleSibling, getPlatformState, resetProperty, resetRelation, resetState, setAccessibleParent, updateNextAccessibleSibling, 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
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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 of this TabPage.- Returns:
- the indicator icon of this TabPage
-
getIndicatorTooltip
Gets the tooltip of the indicator icon of this TabPage.- Returns:
- the indicator tooltip of this TabPage
-
getKeyword
Gets the search keyword of this TabPage.- Returns:
- the search keyword of this TabPage
-
getLiveThumbnail
public boolean getLiveThumbnail()Gets whether to live thumbnail is enabled this TabPage.- Returns:
- whether live thumbnail is enabled
-
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 of this TabPage.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 for this TabPage.- Returns:
- the horizontal alignment
-
getThumbnailYalign
public float getThumbnailYalign()Gets the vertical alignment of the thumbnail for this TabPage.- Returns:
- the vertical alignment
-
getTitle
-
getTooltip
-
invalidateThumbnail
public void invalidateThumbnail()Invalidates thumbnail for this TabPage.If an
TabOverview
is open, the thumbnail representing this TabPage will be immediately updated. Otherwise it will be update when opening the overview.Does nothing if
TabPage:live-thumbnail
is set toTRUE
.See also
TabView.invalidateThumbnails()
. -
setIcon
Sets the icon of this TabPage.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 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-activated
will be emitted when the indicator icon is clicked.If
TabPage:indicator-icon
is not set, does nothing.- Parameters:
activatable
- whether the indicator is activatable
-
setIndicatorIcon
Sets the indicator icon of this TabPage.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 indicator icon of this TabPage
-
setIndicatorTooltip
Sets the tooltip of the indicator icon of this TabPage.The tooltip can be marked up with the Pango text markup language.
See
TabPage:indicator-icon
.- Parameters:
tooltip
- the indicator tooltip of this TabPage
-
setKeyword
Sets the search keyword for this TabPage.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 search keyword
-
setLiveThumbnail
public void setLiveThumbnail(boolean liveThumbnail) Sets whether to enable live thumbnail for this TabPage.When set to
TRUE
, this TabPage's thumbnail inTabOverview
will 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
-
setLoading
public void setLoading(boolean loading) Sets whether this TabPage 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
- whether this TabPage is loading
-
setNeedsAttention
public void setNeedsAttention(boolean needsAttention) Sets whether this TabPage 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 haveTabPage:needs-attention
set toTRUE
.- Parameters:
needsAttention
- whether this TabPage needs attention
-
setThumbnailXalign
public void setThumbnailXalign(float xalign) Sets the horizontal alignment of the thumbnail for this TabPage.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:
xalign
- the new value
-
setThumbnailYalign
public void setThumbnailYalign(float yalign) Sets the vertical alignment of the thumbnail for this TabPage.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:
yalign
- the new value
-
setTitle
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.Sets the title of this TabPage.
- Parameters:
title
- the title of this TabPage
-
setTooltip
Sets the tooltip of this TabPage.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 tooltip of this TabPage
-
builder
ATabPage.Builder
object constructs aTabPage
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withTabPage.Builder.build()
.
-