Class RowColumnLayout

  • All Implemented Interfaces:
    java.awt.LayoutManager

    public class RowColumnLayout
    extends java.lang.Object
    implements java.awt.LayoutManager
    This layout arranges components in rows, putting as many components as possible on a row and using as many rows as necessary. All components are sized the same, the largest width and the largest height of all components. The components prefer to be layout as close to a square as possible.
    • Constructor Summary

      Constructors 
      Constructor Description
      RowColumnLayout​(int hgap, int vgap, int orientation, int maxSize)
      Constructs a new RowColumnLayout
    • Constructor Detail

      • RowColumnLayout

        public RowColumnLayout​(int hgap,
                               int vgap,
                               int orientation,
                               int maxSize)
        Constructs a new RowColumnLayout
        Parameters:
        hgap - the gap (in pixels) between columns
        vgap - the gap (in pixels) between rows
        orientation - either ROW or COLUMN. If ROW, components are layed out in rows up to prefered width, using as many rows a necessary. If COLUMN, components are layed out in columns up to the prefered height, using as many columns as necessary.
        maxSize -
    • Method Detail

      • addLayoutComponent

        public void addLayoutComponent​(java.lang.String name,
                                       java.awt.Component comp)
        Specified by:
        addLayoutComponent in interface java.awt.LayoutManager
        See Also:
        LayoutManager.addLayoutComponent(String, Component)
      • removeLayoutComponent

        public void removeLayoutComponent​(java.awt.Component comp)
        Specified by:
        removeLayoutComponent in interface java.awt.LayoutManager
        See Also:
        LayoutManager.removeLayoutComponent(Component)
      • preferredLayoutSize

        public java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)
        Specified by:
        preferredLayoutSize in interface java.awt.LayoutManager
        See Also:
        LayoutManager.preferredLayoutSize(Container)
      • minimumLayoutSize

        public java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)
        Specified by:
        minimumLayoutSize in interface java.awt.LayoutManager
        See Also:
        LayoutManager.minimumLayoutSize(Container)
      • layoutContainer

        public void layoutContainer​(java.awt.Container parent)
        Specified by:
        layoutContainer in interface java.awt.LayoutManager
        See Also:
        LayoutManager.layoutContainer(Container)
      • setMaxSize

        public void setMaxSize​(int maxSize)
        Parameters:
        maxSize -