Class PairLayout

  • All Implemented Interfaces:
    java.awt.LayoutManager

    public class PairLayout
    extends java.lang.Object
    implements java.awt.LayoutManager
    LayoutManger for arranging components into exactly two columns. The right column and the left column may have differing widths. Also, each row is the same height, which is the largest of all rows.
    • Constructor Summary

      Constructors 
      Constructor Description
      PairLayout()  
      PairLayout​(int vgap, int hgap)
      Constructs a new PairLayout.
      PairLayout​(int vgap, int hgap, int minimumRightColumnWidth)
      Constructs a new PairLayout.
    • Constructor Detail

      • PairLayout

        public PairLayout()
      • PairLayout

        public PairLayout​(int vgap,
                          int hgap)
        Constructs a new PairLayout.
        Parameters:
        vgap - the gap (in pixels) between rows.
        hgap - the gap (in pixels) between the two columns.
      • PairLayout

        public PairLayout​(int vgap,
                          int hgap,
                          int minimumRightColumnWidth)
        Constructs a new PairLayout.
        Parameters:
        vgap - the gap (in pixels) between rows.
        hgap - the gap (in pixels) between the two columns.
        minimumRightColumnWidth - specifies the minimum width of the second column.
    • 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
      • layoutContainer

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