Class Box.Builder<B extends Box.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, Orientable.Builder<B>, BuilderInterface
Direct Known Subclasses:
ShortcutsGroup.Builder, ShortcutsSection.Builder
Enclosing class:
Box

public static class Box.Builder<B extends Box.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.
  • Constructor Details

    • Builder

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

    • build

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

      public B setBaselineChild(int baselineChild)

      The position of the child that determines the baseline.

      This is only relevant if the box is in vertical orientation.

      Parameters:
      baselineChild - the value for the baseline-child property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12
    • setBaselinePosition

      public B setBaselinePosition(BaselinePosition baselinePosition)
      How to position baseline-aligned widgets if extra space is available.
      Parameters:
      baselinePosition - the value for the baseline-position property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setHomogeneous

      public B setHomogeneous(boolean homogeneous)
      Whether the children should all be the same size.
      Parameters:
      homogeneous - the value for the homogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSpacing

      public B setSpacing(int spacing)
      The amount of space between children.
      Parameters:
      spacing - the value for the spacing property
      Returns:
      the Builder instance is returned, to allow method chaining