Class DynamicGridLayout

  • All Implemented Interfaces:
    java.awt.LayoutManager, java.io.Serializable

    public class DynamicGridLayout
    extends java.awt.GridLayout
    Grid layout implementation with support for cells with unequal size. See https://www.javaworld.com/article/2077486/core-java/java-tip-121--flex-your-grid-layout.html
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void layoutContainer​(java.awt.Container parent)  
      java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)  
      java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)  
      • Methods inherited from class java.awt.GridLayout

        addLayoutComponent, getColumns, getHgap, getRows, getVgap, removeLayoutComponent, setColumns, setHgap, setRows, setVgap, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DynamicGridLayout

        public DynamicGridLayout()
      • DynamicGridLayout

        public DynamicGridLayout​(int rows,
                                 int cols)
      • DynamicGridLayout

        public DynamicGridLayout​(int rows,
                                 int cols,
                                 int hgap,
                                 int vgap)
    • Method Detail

      • preferredLayoutSize

        public java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)
        Specified by:
        preferredLayoutSize in interface java.awt.LayoutManager
        Overrides:
        preferredLayoutSize in class java.awt.GridLayout
      • minimumLayoutSize

        public java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)
        Specified by:
        minimumLayoutSize in interface java.awt.LayoutManager
        Overrides:
        minimumLayoutSize in class java.awt.GridLayout
      • layoutContainer

        public void layoutContainer​(java.awt.Container parent)
        Specified by:
        layoutContainer in interface java.awt.LayoutManager
        Overrides:
        layoutContainer in class java.awt.GridLayout