Class TableWidths


  • final class TableWidths
    extends java.lang.Object
    • Field Detail

      • numberOfColumns

        private final int numberOfColumns
      • rightBorderMaxWidth

        private final float rightBorderMaxWidth
      • leftBorderMaxWidth

        private final float leftBorderMaxWidth
      • horizontalBorderSpacing

        private final float horizontalBorderSpacing
      • tableWidth

        private float tableWidth
      • fixedTableWidth

        private boolean fixedTableWidth
      • fixedTableLayout

        private boolean fixedTableLayout
      • layoutMinWidth

        private float layoutMinWidth
      • tableMinWidth

        private float tableMinWidth
      • tableMaxWidth

        private float tableMaxWidth
      • ZeroWidth

        private static final UnitValue ZeroWidth
    • Constructor Detail

      • TableWidths

        TableWidths​(TableRenderer tableRenderer,
                    float availableWidth,
                    boolean calculateTableMaxWidth,
                    float rightBorderMaxWidth,
                    float leftBorderMaxWidth)
    • Method Detail

      • hasFixedLayout

        boolean hasFixedLayout()
      • layout

        float[] layout()
      • getMinWidth

        float getMinWidth()
      • autoLayout

        float[] autoLayout()
      • processColumns

        void processColumns()
      • recalculate

        void recalculate​(float minSum)
      • fixedLayout

        float[] fixedLayout()
      • calculateTableWidth

        private void calculateTableWidth​(float availableWidth,
                                         boolean calculateTableMaxWidth)
      • retrieveTableWidth

        private java.lang.Float retrieveTableWidth​(UnitValue width,
                                                   float availableWidth)
      • retrieveTableWidth

        private float retrieveTableWidth​(float width)
      • getTable

        private Table getTable()
      • calculateMinMaxWidths

        private void calculateMinMaxWidths()
      • fillAndSortCells

        private void fillAndSortCells()
      • fillRendererCells

        private void fillRendererCells​(TableRenderer renderer,
                                       byte region)
      • warn100percent

        private void warn100percent()
      • extractWidths

        private float[] extractWidths()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getCellWidth

        private UnitValue getCellWidth​(CellRenderer cell,
                                       boolean zeroIsValid)
        Gets width of the cell, adding paddings and extra spacing if necessary.
        Parameters:
        cell - renderer from which width will be taken. Note that this method will not change original width of the element.
        zeroIsValid - defines if 0 width is valid
        Returns:
        increased width of the renderer