All Implemented Interfaces:
LayoutManager, LayoutManager2

public class GridLayoutPlus extends BasicGridLayout
  • Field Details

    • rowWeights

      protected int[] rowWeights
    • colWeights

      protected int[] colWeights
    • colFlags

      protected int[] colFlags
  • Constructor Details

    • GridLayoutPlus

      public GridLayoutPlus()
    • GridLayoutPlus

      public GridLayoutPlus(int rows, int cols)
    • GridLayoutPlus

      public GridLayoutPlus(int rows, int cols, int hGap, int vGap)
    • GridLayoutPlus

      public GridLayoutPlus(int rows, int cols, int hGap, int vGap, int hMargin, int vMargin)
  • Method Details

    • setRowWeight

      public void setRowWeight(int row, int weight)
    • setColWeight

      public void setColWeight(int col, int weight)
    • setColAlignment

      public void setColAlignment(int col, int v)
    • getRowWeight

      protected int getRowWeight(int row)
      Description copied from class: BasicGridLayout
      Override this to set weights on a per-row basis.
      Overrides:
      getRowWeight in class BasicGridLayout
    • getColWeight

      protected int getColWeight(int col)
      Description copied from class: BasicGridLayout
      Override this to set weights on a per-column basis.
      Overrides:
      getColWeight in class BasicGridLayout
    • getColAlignment

      protected int getColAlignment(int col)
    • addLayoutComponent

      public void addLayoutComponent(String name, Component comp)
      Adds the specified named component to the layout.
      Specified by:
      addLayoutComponent in interface LayoutManager
      Overrides:
      addLayoutComponent in class ConstraintLayout
      Parameters:
      name - the String name
      comp - the component to be added
    • removeLayoutComponent

      public void removeLayoutComponent(Component comp)
      Removes the specified component from the layout.
      Specified by:
      removeLayoutComponent in interface LayoutManager
      Overrides:
      removeLayoutComponent in class ConstraintLayout
      Parameters:
      comp - the component to be removed
    • alignmentFor

      protected int alignmentFor(Component c, int row, int col)
      Description copied from class: BasicGridLayout
      Override this to set alignment on a per-component basis.
      Overrides:
      alignmentFor in class BasicGridLayout
    • fillFor

      protected int fillFor(Component c, int row, int col)
      Description copied from class: BasicGridLayout
      Override this to set fill on a per-component basis.
      Overrides:
      fillFor in class BasicGridLayout
    • weightForColumn

      protected int weightForColumn(int col)
    • weightForColumn

      protected int weightForColumn(int row, int col)