Class Grid.FlowSizeSpec

  • Enclosing class:
    Grid

    private static final class Grid.FlowSizeSpec
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FlowSizeSpec​(int[][] sizes, ResizeConstraint[] resConstsInclGaps)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int expandSizes​(DimConstraint[] specs, java.lang.Float[] defGrow, int targetSize, int fromIx, int len, int sizeType, int eagerness)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sizes

        private final int[][] sizes
    • Constructor Detail

      • FlowSizeSpec

        private FlowSizeSpec​(int[][] sizes,
                             ResizeConstraint[] resConstsInclGaps)
    • Method Detail

      • expandSizes

        private int expandSizes​(DimConstraint[] specs,
                                java.lang.Float[] defGrow,
                                int targetSize,
                                int fromIx,
                                int len,
                                int sizeType,
                                int eagerness)
        Parameters:
        specs - The specs for the columns or rows. Last index will be used of fromIx + len is greater than this array's length.
        targetSize - The size to try to meet.
        defGrow - The default grow weight if the specs does not have anyone that will grow. Comes from "push" in the CC.
        fromIx -
        len -
        sizeType -
        eagerness - How eager the algorithm should be to try to expand the sizes.
        • 0 - Grow only rows/columns which have the sizeType set to be the containing components AND which has a grow weight > 0.
        • 1 - Grow only rows/columns which have the sizeType set to be the containing components AND which has a grow weight > 0 OR unspecified.
        • 2 - Grow all rows/columns that have a grow weight > 0.
        • 3 - Grow all rows/columns that have a grow weight > 0 OR unspecified.
        Returns:
        The new size.