Class TabPage

All Implemented Interfaces:
PointerInterface

public class TabPage extends Object
  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getChild

      public Widget getChild()
      Gets the child of @self.
      Returns:
      the child of @self
    • getIcon

      public Icon getIcon()
      Gets the icon of @self.
      Returns:
      the icon of @self
    • getIndicatorActivatable

      public boolean getIndicatorActivatable()
      Gets whether the indicator of @self is activatable.
      Returns:
      whether the indicator is activatable
    • getIndicatorIcon

      public Icon getIndicatorIcon()
      Gets the indicator icon of @self.
      Returns:
      the indicator icon of @self
    • getIndicatorTooltip

      public Str getIndicatorTooltip()
      Gets the tooltip of the indicator icon of @self.
      Returns:
      the indicator tooltip of @self
    • getLoading

      public boolean getLoading()
      Gets whether @self is loading.
      Returns:
      whether @self is loading
    • getNeedsAttention

      public boolean getNeedsAttention()
      Gets whether @self needs attention.
      Returns:
      whether @self needs attention
    • getParent

      public TabPage getParent()
      Gets the parent page of @self.

      See [method@TabView.add_page] and [method@TabView.close_page].
      Returns:
      the parent page
    • getPinned

      public boolean getPinned()
      Gets whether @self is pinned.

      See [method@TabView.set_page_pinned].
      Returns:
      whether @self is pinned
    • getSelected

      public boolean getSelected()
      Gets whether @self is selected.
      Returns:
      whether @self is selected
    • getTitle

      public Str getTitle()
      Gets the title of @self.
      Returns:
      the title of @self
    • getTooltip

      public Str getTooltip()
      Gets the tooltip of @self.
      Returns:
      the tooltip of @self
    • setIcon

      public void setIcon(@Nullable Icon icon)
      Sets the icon of @self.

      [class@TabBar] displays the icon next to the title.

      It will not show the icon if [property@TabPage:loading] is set to `TRUE`,
      or if the page is pinned and [propertyTabPage:indicator-icon] is set.
      Parameters:
      icon - the icon of @self
    • setIndicatorActivatable

      public void setIndicatorActivatable(boolean activatable)
      Sets whether the indicator of @self is activatable.

      If set to `TRUE`, [signal@TabView::indicator-activated] will be emitted
      when the indicator icon is clicked.

      If [property@TabPage:indicator-icon] is not set, does nothing.
      Parameters:
      activatable - whether the indicator is activatable
    • setIndicatorIcon

      public void setIndicatorIcon(@Nullable Icon indicator_icon)
      Sets the indicator icon of @self.

      A common use case is an audio or camera indicator in a web browser.

      [class@TabBar] will show it at the beginning of the tab, alongside icon
      representing [property@TabPage:icon] or loading spinner.

      If the page is pinned, the indicator will be shown instead of icon or
      spinner.

      [property@TabPage:indicator-tooltip] can be used to set the tooltip on the
      indicator icon.

      If [property@TabPage:indicator-activatable] is set to `TRUE`, the
      indicator icon can act as a button.
      Parameters:
      indicator_icon - the indicator icon of @self
    • setIndicatorTooltip

      public void setIndicatorTooltip(@Nonnull Str tooltip)
      Sets the tooltip of the indicator icon of @self.

      The tooltip can be marked up with the Pango text markup language.

      See [property@TabPage:indicator-icon].
      Parameters:
      tooltip - the indicator tooltip of @self
    • setIndicatorTooltip

      public void setIndicatorTooltip(String tooltip)
      Sets the tooltip of the indicator icon of @self.

      The tooltip can be marked up with the Pango text markup language.

      See [property@TabPage:indicator-icon].
      Parameters:
      tooltip - the indicator tooltip of @self
    • setLoading

      public void setLoading(boolean loading)
      Sets whether @self is loading.

      If set to `TRUE`, [class@TabBar] will display a spinner in place of icon.

      If the page is pinned and [property@TabPage:indicator-icon] is set, the
      loading status will not be visible.
      Parameters:
      loading - whether @self is loading
    • setNeedsAttention

      public void setNeedsAttention(boolean needs_attention)
      Sets whether @self needs attention.

      [class@TabBar] will display a line under the tab representing the page if
      set to `TRUE`. If the tab is not visible, the corresponding edge of the tab
      bar will be highlighted.
      Parameters:
      needs_attention - whether @self needs attention
    • setTitle

      public void setTitle(@Nonnull Str title)
      [class@TabBar] will display it in the center of the tab unless it's pinned,
      and will use it as a tooltip unless [property@TabPage:tooltip] is set.

      Sets the title of @self.
      Parameters:
      title - the title of @self
    • setTitle

      public void setTitle(String title)
      [class@TabBar] will display it in the center of the tab unless it's pinned,
      and will use it as a tooltip unless [property@TabPage:tooltip] is set.

      Sets the title of @self.
      Parameters:
      title - the title of @self
    • setTooltip

      public void setTooltip(@Nonnull Str tooltip)
      Sets the tooltip of @self.

      The tooltip can be marked up with the Pango text markup language.

      If not set, [class@TabBar] will use [property@TabPage:title] as a tooltip
      instead.
      Parameters:
      tooltip - the tooltip of @self
    • setTooltip

      public void setTooltip(String tooltip)
      Sets the tooltip of @self.

      The tooltip can be marked up with the Pango text markup language.

      If not set, [class@TabBar] will use [property@TabPage:title] as a tooltip
      instead.
      Parameters:
      tooltip - the tooltip of @self
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()