Class DumbGridBagLayout

java.lang.Object
java.awt.GridBagLayout
net.thevpc.common.swing.layout.DumbGridBagLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable

public class DumbGridBagLayout extends GridBagLayout
Author:
Taha BEN SALAH (taha.bensalah@gmail.com) %creationtime 5 mai 2006 00:52:57
See Also:
  • Constructor Details

    • DumbGridBagLayout

      public DumbGridBagLayout()
      -               fill=HORIZONTAL
      |               fill=VERTICAL
      +               fill=BOTH
      *               gridheight++
      :               gridwidth ++
      .               gridwidth=REMAINDER
      ..              gridwidth=RELATIVE
      ;               gridheight=REMAINDER
      ;;              gridheight=RELATIVE
      <               anchor=LINE_START
      >               anchor=LINE_END
      _               anchor=PAGE_END
      ~ ou ^          anchor=PAGE_START
      =               weightx++
      $               weighty++
      #               weightx++ && weighty++
      ' '             do nothing just allowed for formatting
      Identifier      position identifier to use in component.add(something,"Identifier")
      [ and ]         define x position (next column)
      \n              define y position (next row)
      

      example :

      JPanel p=new JPanel(new DumbGridBagLayout()
                 .addLine("[<~titleBarStyle  :               ]")
                 .addLine("[<~enableClose  ] [<~freezeLayout ]")
                 .addLine("[<~]")
                 .addLine("[<~verticalSpanExample *]")
                 .addLine("[+#                        ]")
         );
      p.add(new JLabel("Hello"),"titleBarStyle");
      
    • DumbGridBagLayout

      public DumbGridBagLayout(String pattern)
  • Method Details