Class TabBar.Builder<B extends TabBar.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
TabBar

public static class TabBar.Builder<B extends TabBar.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public TabBar build()
      Finish building the TabBar object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to TabBar.
      Overrides:
      build in class Widget.Builder<B extends TabBar.Builder<B>>
      Returns:
      a new instance of TabBar with the properties that were set in the Builder object.
    • setAutohide

      public B setAutohide(boolean autohide)

      Whether the tabs automatically hide.

      If set to TRUE, the tab bar disappears when TabBar:view has 0 or 1 tab, no pinned tabs, and no tab is being transferred.

      See TabBar:tabs-revealed.

      Parameters:
      autohide - the value for the autohide property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setEndActionWidget

      public B setEndActionWidget(Widget endActionWidget)
      The widget shown after the tabs.
      Parameters:
      endActionWidget - the value for the end-action-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExpandTabs

      public B setExpandTabs(boolean expandTabs)

      Whether tabs expand to full width.

      If set to TRUE, the tabs will always vary width filling the whole width when possible, otherwise tabs will always have the minimum possible size.

      Parameters:
      expandTabs - the value for the expand-tabs property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setExtraDragPreload

      public B setExtraDragPreload(boolean extraDragPreload)

      Whether the drop data should be preloaded on hover.

      See Gtk.DropTarget:preload.

      Parameters:
      extraDragPreload - the value for the extra-drag-preload property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
    • setInverted

      public B setInverted(boolean inverted)

      Whether tabs use inverted layout.

      If set to TRUE, non-pinned tabs will have the close button at the beginning and the indicator at the end rather than the opposite.

      Parameters:
      inverted - the value for the inverted property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setStartActionWidget

      public B setStartActionWidget(Widget startActionWidget)
      The widget shown before the tabs.
      Parameters:
      startActionWidget - the value for the start-action-widget property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setView

      public B setView(TabView view)
      The tab view the tab bar controls.
      Parameters:
      view - the value for the view property
      Returns:
      the Builder instance is returned, to allow method chaining
    • onExtraDragDrop

      public B onExtraDragDrop(TabBar.ExtraDragDropCallback handler)

      Emitted when content is dropped onto a tab.

      The content must be of one of the types set up via TabBar.setupExtraDropTarget(Set, Type[]).

      See Gtk.DropTarget::drop.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also:
    • onExtraDragValue

      public B onExtraDragValue(TabBar.ExtraDragValueCallback handler)

      Emitted when the dropped content is preloaded.

      In order for data to be preloaded, TabBar:extra-drag-preload must be set to TRUE.

      The content must be of one of the types set up via TabBar.setupExtraDropTarget(Set, Type[]).

      See Gtk.DropTarget:value.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.3
      See Also: