Interface FlexibleGridLayout.Builder

Enclosing class:
FlexibleGridLayout

public static interface FlexibleGridLayout.Builder
Builds a FlexibleGridLayout instances.
  • Method Details

    • rows

      Sets the number of rows in the layout. If both rows and columns are zero, layout behavior is undefined.
      Parameters:
      rows - the number of rows
      Returns:
      this builder instance
    • columns

      FlexibleGridLayout.Builder columns(int columns)
      Sets the number of columns in the layout. If both rows and columns are zero, layout behavior is undefined.
      Parameters:
      columns - the number of columns
      Returns:
      this builder instance
    • rowsColumns

      FlexibleGridLayout.Builder rowsColumns(int rows, int columns)
      Sets both the number of rows and columns.
      Parameters:
      rows - the number of rows
      columns - the number of columns
      Returns:
      this builder instance
    • gap

      Sets both the horizontal and vertical gap between components.
      Parameters:
      gap - the number of pixels between components in both directions
      Returns:
      this builder instance
    • horizontalGap

      FlexibleGridLayout.Builder horizontalGap(int horizontalGap)
      Sets the horizontal gap between components.
      Parameters:
      horizontalGap - the number of pixels between columns
      Returns:
      this builder instance
    • verticalGap

      FlexibleGridLayout.Builder verticalGap(int verticalGap)
      Sets the vertical gap between components.
      Parameters:
      verticalGap - the number of pixels between rows
      Returns:
      this builder instance
    • fixRowHeights

      FlexibleGridLayout.Builder fixRowHeights(boolean fixRowHeights)
      Enables or disables uniform row heights based on the tallest component in each row.
      Parameters:
      fixRowHeights - true to use fixed row heights
      Returns:
      this builder instance
    • fixColumnWidths

      FlexibleGridLayout.Builder fixColumnWidths(boolean fixColumnWidths)
      Enables or disables uniform column widths based on the widest component in each column.
      Parameters:
      fixColumnWidths - true to use fixed column widths
      Returns:
      this builder instance
    • fixedRowHeight

      FlexibleGridLayout.Builder fixedRowHeight(int fixedRowHeight)
      Sets a specific fixed pixel height for all rows. Automatically implies fixRowHeights(boolean) with true.
      Parameters:
      fixedRowHeight - the fixed row height in pixels
      Returns:
      this builder instance
    • fixedColumnWidth

      FlexibleGridLayout.Builder fixedColumnWidth(int fixedColumnWidth)
      Sets a specific fixed pixel width for all columns. Automatically implies fixColumnWidths(boolean) with true.
      Parameters:
      fixedColumnWidth - the fixed column width in pixels
      Returns:
      this builder instance
    • build

      Builds a new FlexibleGridLayout instance with the current configuration.
      Returns:
      a configured layout manager