Class StackPage.Builder<B extends StackPage.Builder<B>>

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

public static class StackPage.Builder<B extends StackPage.Builder<B>> extends GObject.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 StackPage build()
      Finish building the StackPage object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to StackPage.
      Overrides:
      build in class GObject.Builder<B extends StackPage.Builder<B>>
      Returns:
      a new instance of StackPage with the properties that were set in the Builder object.
    • setChild

      public B setChild(Widget child)
      The child that this page is for.
      Parameters:
      child - the value for the child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setIconName

      public B setIconName(String iconName)
      The icon name of the child page.
      Parameters:
      iconName - the value for the icon-name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setName

      public B setName(String name)
      The name of the child page.
      Parameters:
      name - the value for the name property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setNeedsAttention

      public B setNeedsAttention(boolean needsAttention)

      Whether the page requires the user attention.

      This is used by the StackSwitcher to change the appearance of the corresponding button when a page needs attention and it is not the current one.

      Parameters:
      needsAttention - the value for the needs-attention property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTitle

      public B setTitle(String title)
      The title of the child page.
      Parameters:
      title - the value for the title property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setUseUnderline

      public B setUseUnderline(boolean useUnderline)
      If set, an underline in the title indicates a mnemonic.
      Parameters:
      useUnderline - the value for the use-underline property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisible

      public B setVisible(boolean visible)
      Whether this page is visible.
      Parameters:
      visible - the value for the visible property
      Returns:
      the Builder instance is returned, to allow method chaining