Class GBC


  • public class GBC
    extends GridBagConstraints
    Utility object to simplify the use of the GridBagConstraints object
    Author:
    gianpiero.diblasi
    • Constructor Detail

      • GBC

        public GBC​(int gridx,
                   int gridy)
        Creates the object
        Parameters:
        gridx - The gridx
        gridy - The gridy
    • Method Detail

      • w

        public GBC w​(int gridwidth)
        Sets the grid width
        Parameters:
        gridwidth - The grid width
        Returns:
        This object
      • h

        public GBC h​(int gridheight)
        Sets the grid height
        Parameters:
        gridheight - The grid height
        Returns:
        This object
      • wh

        public GBC wh​(int gridwidth,
                      int gridheight)
        Sets the grid size
        Parameters:
        gridwidth - The grid width
        gridheight - The grid height
        Returns:
        This object
      • wx

        public GBC wx​(int weightx)
        Sets the x weight
        Parameters:
        weightx - The x weight
        Returns:
        This object
      • wy

        public GBC wy​(int weighty)
        Sets the y weight
        Parameters:
        weighty - The y weight
        Returns:
        This object
      • wxy

        public GBC wxy​(int weightx,
                       int weighty)
        Sets the weight
        Parameters:
        weightx - The x weight
        weighty - The y weight
        Returns:
        This object
      • a

        public GBC a​(int anchor)
        Sets the anchor
        Parameters:
        anchor - The anchor
        Returns:
        This object
      • f

        public GBC f​(int fill)
        Sets the fill direction
        Parameters:
        fill - The fill direction
        Returns:
        This object
      • i

        public GBC i​(int top,
                     int left,
                     int bottom,
                     int right)
        Sets the insets
        Parameters:
        top - The spacing to use on top
        left - The spacing to use to the left
        bottom - The spacing to use on the bottom
        right - The spacing to use to the right
        Returns:
        This object