Class CenterLayout.Builder<B extends CenterLayout.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
CenterLayout

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

      public B setShrinkCenterLast(boolean shrinkCenterLast)

      Whether to shrink the center widget after other children.

      By default, when there's no space to give all three children their natural widths, the start and end widgets start shrinking and the center child keeps natural width until they reach minimum width.

      If set to FALSE, start and end widgets keep natural width and the center widget starts shrinking instead.

      Parameters:
      shrinkCenterLast - the value for the shrink-center-last property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      4.12