Class GridBagLayoutUtil


  • public class GridBagLayoutUtil
    extends Object
    Klasse die das Verwenden vom GridBagLayout vereinfacht
    • Constructor Detail

      • GridBagLayoutUtil

        public GridBagLayoutUtil()
        Konstruktor
      • GridBagLayoutUtil

        public GridBagLayoutUtil​(int inseta,
                                 int insetb,
                                 int insetc,
                                 int insetd)
        Konstruktor
        Parameters:
        inseta - Inset
        insetb - Inset
        insetc - Inset
        insetd - Inset
    • Method Detail

      • getGBC

        public GridBagConstraints getGBC​(int x,
                                         int y)
        Constraints erstellen
        Parameters:
        x - X-Position
        y - Y-Position
        Returns:
        Constraints
      • getGBC

        public GridBagConstraints getGBC​(int x,
                                         int y,
                                         int w,
                                         int h)
        Constraints erstellen
        Parameters:
        x - X-Position
        y - Y-Position
        w - Width
        h - Height
        Returns:
        Constraints
      • getGBC

        public GridBagConstraints getGBC​(int x,
                                         int y,
                                         int w,
                                         int h,
                                         double weightx,
                                         double weighty)
        Constraints erstellen
        Parameters:
        x - X-Position
        y - Y-Position
        w - Width
        h - Height
        weightx - X-Weight
        weighty - Y-Weight
        Returns:
        Constraints
      • getGBC

        public GridBagConstraints getGBC​(int x,
                                         int y,
                                         int w,
                                         int h,
                                         double weightx,
                                         double weighty,
                                         int fill)
        Constraints erstellen
        Parameters:
        x - X-Position
        y - Y-Position
        w - Width
        h - Height
        weightx - X-Weight
        weighty - Y-Weight
        fill - Fill
        Returns:
        Constraints
      • addItemToFrame

        public static void addItemToFrame​(GridBagLayout gbl,
                                          GridBagConstraints gbc,
                                          Component c,
                                          JFrame frm)
        Fuegt eine Komponente einem Frame hinzu
        Parameters:
        gbl - Layout
        gbc - Constraints
        c - Komponente
        frm - Frame
      • addItemToDialog

        public static void addItemToDialog​(GridBagLayout gbl,
                                           GridBagConstraints gbc,
                                           Component c,
                                           JDialog dlg)
        Fuegt eine Komponente einem Dialog hinzu
        Parameters:
        gbl - Layout
        gbc - Constraints
        c - Komponente
        dlg - Dialog
      • addItemToPanel

        public static void addItemToPanel​(GridBagLayout gbl,
                                          GridBagConstraints gbc,
                                          Component c,
                                          JPanel pnl)
        Fuegt eine Komponente einem Panel hinzu
        Parameters:
        gbl - Layout
        gbc - Constraints
        c - Komponente
        pnl - Panel