java.lang.Object
is.codion.swing.common.ui.layout.Layouts

public final class Layouts extends Object
A utility class for layouts. All layouts created use the centrally configured hgap and vgap.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Value<Integer>
    Specifies the default horizontal and vertical component gap, used by the layout factory methods, by default this is 5
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a BorderLayout using the default vertical and horizontal gap value
    flexibleGridLayout(int rows, int columns)
    Creates a FlexibleGridLayout using the default vertical and horizontal gap value, with neither row heights nor column widths fixed.
    static FlowLayout
    flowLayout(int alignment)
    Creates a FlowLayout using the default vertical and horizontal gap value
    static GridLayout
    gridLayout(int rows, int columns)
    Creates a GridLayout using the default vertical and horizontal gap value

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • borderLayout

      public static BorderLayout borderLayout()
      Creates a BorderLayout using the default vertical and horizontal gap value
      Returns:
      a BorderLayout
      See Also:
    • flowLayout

      public static FlowLayout flowLayout(int alignment)
      Creates a FlowLayout using the default vertical and horizontal gap value
      Parameters:
      alignment - the alignment
      Returns:
      a FlowLayout
      See Also:
    • gridLayout

      public static GridLayout gridLayout(int rows, int columns)
      Creates a GridLayout using the default vertical and horizontal gap value
      Parameters:
      rows - the number of rows
      columns - the number of columns
      Returns:
      a GridLayout
      See Also:
    • flexibleGridLayout

      public static FlexibleGridLayout flexibleGridLayout(int rows, int columns)
      Creates a FlexibleGridLayout using the default vertical and horizontal gap value, with neither row heights nor column widths fixed.
      Parameters:
      rows - the number of rows
      columns - the number of columns
      Returns:
      a FlexibleGridLayout
      See Also: