Class TableGridLayout

  • All Implemented Interfaces:
    java.awt.LayoutManager, java.awt.LayoutManager2

    public class TableGridLayout
    extends java.lang.Object
    implements java.awt.LayoutManager2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int cols  
      static java.lang.String CONSTRAINT_KEY
      Components should store their TableGridLayoutConstraint object as a user object with this key
      protected int fakeRows  
      protected int rows  
      protected int rowTicks  
      protected int x1offset  
      protected int x2offset  
      protected int y1offset  
      protected int y2offset  
    • Constructor Summary

      Constructors 
      Constructor Description
      TableGridLayout()  
      TableGridLayout​(int rows, int cols, int x1offset, int y1offset, int x2offset, int y2offset, int rowTicks, int fakeRows)  
    • Field Detail

      • CONSTRAINT_KEY

        public static final java.lang.String CONSTRAINT_KEY
        Components should store their TableGridLayoutConstraint object as a user object with this key
        See Also:
        Constant Field Values
      • rows

        protected int rows
      • cols

        protected int cols
      • x1offset

        protected int x1offset
      • y1offset

        protected int y1offset
      • x2offset

        protected int x2offset
      • y2offset

        protected int y2offset
      • rowTicks

        protected int rowTicks
      • fakeRows

        protected int fakeRows
    • Constructor Detail

      • TableGridLayout

        public TableGridLayout()
      • TableGridLayout

        public TableGridLayout​(int rows,
                               int cols,
                               int x1offset,
                               int y1offset,
                               int x2offset,
                               int y2offset,
                               int rowTicks,
                               int fakeRows)
    • Method Detail

      • preferredLayoutSize

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

        public java.awt.Dimension minimumLayoutSize​(java.awt.Container target)
        Specified by:
        minimumLayoutSize in interface java.awt.LayoutManager
      • maximumLayoutSize

        public java.awt.Dimension maximumLayoutSize​(java.awt.Container target)
        Specified by:
        maximumLayoutSize in interface java.awt.LayoutManager2
      • layoutContainer

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

        protected com.google.common.collect.Multimap<java.lang.Integer,​TableGridLayout.Entry> getLayers​(java.util.List<java.awt.Component> components)
        Returns a map of Layer indices to Entries for the supplied list of components. These components should have TableGridLayoutConstraints to determine what layer they belong to.
        Parameters:
        components - A List of Components with TableGridLayoutConstraints. May be empty, but not null.
        Returns:
        A MultiMap of Layer indices to Entries. May be empty
      • addLayoutComponent

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

        public void addLayoutComponent​(java.awt.Component component,
                                       java.lang.Object constraint)
        Specified by:
        addLayoutComponent in interface java.awt.LayoutManager2
      • getLayoutAlignmentX

        public float getLayoutAlignmentX​(java.awt.Container target)
        Specified by:
        getLayoutAlignmentX in interface java.awt.LayoutManager2
      • getLayoutAlignmentY

        public float getLayoutAlignmentY​(java.awt.Container target)
        Specified by:
        getLayoutAlignmentY in interface java.awt.LayoutManager2
      • invalidateLayout

        public void invalidateLayout​(java.awt.Container target)
        Specified by:
        invalidateLayout in interface java.awt.LayoutManager2
      • removeLayoutComponent

        public void removeLayoutComponent​(java.awt.Component component)
        Specified by:
        removeLayoutComponent in interface java.awt.LayoutManager