Class InlineViewSwitcher.Builder<B extends InlineViewSwitcher.Builder<B>>

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

public static class InlineViewSwitcher.Builder<B extends InlineViewSwitcher.Builder<B>> extends Widget.Builder<B> implements Accessible.Builder<B>, Orientable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.7
  • Constructor Details

    • Builder

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

    • build

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

      public B setCanShrink(boolean canShrink)

      Whether the toggles can be smaller than the natural size of their contents.

      If set to TRUE, the toggle labels will ellipsize.

      See ToggleGroup:can-shrink.

      Parameters:
      canShrink - the value for the can-shrink property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • setDisplayMode

      public B setDisplayMode(InlineViewSwitcherDisplayMode displayMode)

      The display mode.

      Determines what the toggles display: a label, an icon or both.

      inline-view-switcher-display-modes
      Parameters:
      displayMode - the value for the display-mode property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • setHomogeneous

      public B setHomogeneous(boolean homogeneous)
      Whether all toggles take the same size.
      Parameters:
      homogeneous - the value for the homogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7
    • setStack

      public B setStack(ViewStack stack)
      The stack the view switcher controls.
      Parameters:
      stack - the value for the stack property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.7