Class Stack.Builder<B extends Stack.Builder<B>>

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

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

      public B setHhomogeneous(boolean hhomogeneous)
      true if the stack allocates the same width for all children.
      Parameters:
      hhomogeneous - the value for the hhomogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setInterpolateSize

      public B setInterpolateSize(boolean interpolateSize)
      Whether or not the size should smoothly change during the transition.
      Parameters:
      interpolateSize - the value for the interpolate-size property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTransitionDuration

      public B setTransitionDuration(int transitionDuration)
      The animation duration, in milliseconds.
      Parameters:
      transitionDuration - the value for the transition-duration property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTransitionType

      public B setTransitionType(StackTransitionType transitionType)
      The type of animation used to transition.
      Parameters:
      transitionType - the value for the transition-type property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVhomogeneous

      public B setVhomogeneous(boolean vhomogeneous)
      true if the stack allocates the same height for all children.
      Parameters:
      vhomogeneous - the value for the vhomogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleChild

      public B setVisibleChild(Widget visibleChild)
      The widget currently visible in the stack.
      Parameters:
      visibleChild - the value for the visible-child property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setVisibleChildName

      public B setVisibleChildName(String visibleChildName)
      The name of the widget currently visible in the stack.
      Parameters:
      visibleChildName - the value for the visible-child-name property
      Returns:
      the Builder instance is returned, to allow method chaining