Class Grid.Builder<B extends Grid.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:
Grid

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

      public B setBaselineRow(int baselineRow)
      The row to align to the baseline when valign is using baseline alignment.
      Parameters:
      baselineRow - the value for the baseline-row property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setColumnHomogeneous

      public B setColumnHomogeneous(boolean columnHomogeneous)
      If true, the columns are all the same width.
      Parameters:
      columnHomogeneous - the value for the column-homogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setColumnSpacing

      public B setColumnSpacing(int columnSpacing)
      The amount of space between two consecutive columns.
      Parameters:
      columnSpacing - the value for the column-spacing property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRowHomogeneous

      public B setRowHomogeneous(boolean rowHomogeneous)
      If true, the rows are all the same height.
      Parameters:
      rowHomogeneous - the value for the row-homogeneous property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setRowSpacing

      public B setRowSpacing(int rowSpacing)
      The amount of space between two consecutive rows.
      Parameters:
      rowSpacing - the value for the row-spacing property
      Returns:
      the Builder instance is returned, to allow method chaining