Class SimpleTable

    • Constructor Detail

      • SimpleTable

        public SimpleTable()
        A RectangleCell is always constructed without any dimensions. Dimensions are defined after creation.
    • Method Detail

      • tableLayout

        public void tableLayout​(PdfPTable table,
                                float[][] widths,
                                float[] heights,
                                int headerRows,
                                int rowStart,
                                PdfContentByte[] canvases)
        Description copied from interface: PdfPTableEvent
        This method is called at the end of the table rendering. The text or graphics are added to one of the 4 PdfContentByte contained in canvases.
        The indexes to canvases are:
        • PdfPTable.BASECANVAS - the original PdfContentByte. Anything placed here will be under the table.
        • PdfPTable.BACKGROUNDCANVAS - the layer where the background goes to.
        • PdfPTable.LINECANVAS - the layer where the lines go to.
        • PdfPTable.TEXTCANVAS - the layer where the text go to. Anything placed here will be over the table.
        The layers are placed in sequence on top of each other.

        The widths and heights have the coordinates of the cells.
        The size of the widths array is the number of rows. Each sub-array in widths corresponds to the x column border positions where the first element is the x coordinate of the left table border and the last element is the x coordinate of the right table border. If colspan is not used all the sub-arrays in widths are the same.
        For the heights the first element is the y coordinate of the top table border and the last element is the y coordinate of the bottom table border.

        Specified by:
        tableLayout in interface PdfPTableEvent
        Parameters:
        table - the PdfPTable in use
        widths - an array of arrays with the cells' x positions. It has the length of the number of rows
        heights - an array with the cells' y positions. It has a length of the number of rows + 1
        headerRows - the number of rows defined for the header.
        rowStart - the first row number after the header
        canvases - an array of PdfContentByte
        See Also:
        PdfPTableEvent.tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
      • getCellpadding

        public float getCellpadding()
        Returns:
        Returns the cellpadding.
      • setCellpadding

        public void setCellpadding​(float cellpadding)
        Parameters:
        cellpadding - The cellpadding to set.
      • getCellspacing

        public float getCellspacing()
        Returns:
        Returns the cellspacing.
      • setCellspacing

        public void setCellspacing​(float cellspacing)
        Parameters:
        cellspacing - The cellspacing to set.
      • getAlignment

        public int getAlignment()
        Returns:
        Returns the alignment.
      • setAlignment

        public void setAlignment​(int alignment)
        Parameters:
        alignment - The alignment to set.
      • getWidth

        public float getWidth()
        Description copied from class: Rectangle
        Returns the width of the rectangle.
        Overrides:
        getWidth in class Rectangle
        Returns:
        Returns the width.
      • setWidth

        public void setWidth​(float width)
        Parameters:
        width - The width to set.
      • getWidthpercentage

        public float getWidthpercentage()
        Returns:
        Returns the widthpercentage.
      • setWidthpercentage

        public void setWidthpercentage​(float widthpercentage)
        Parameters:
        widthpercentage - The widthpercentage to set.
      • isNestable

        public boolean isNestable()
        Description copied from interface: Element
        Checks if this element is nestable.
        Specified by:
        isNestable in interface Element
        Overrides:
        isNestable in class Rectangle
        Returns:
        true if this element can be nested inside other elements.
        Since:
        iText 2.0.8
        See Also:
        Element.isNestable()