Class DOCXTbl

    • Constructor Summary

      Constructors 
      Constructor Description
      DOCXTbl​(org.apache.poi.xwpf.usermodel.XWPFTable xwpfTable, AbstractBody parent)
      Create a new Table by given XWPFTable.
    • Constructor Detail

      • DOCXTbl

        public DOCXTbl​(org.apache.poi.xwpf.usermodel.XWPFTable xwpfTable,
                       AbstractBody parent)
        Create a new Table by given XWPFTable.
        Parameters:
        xwpfTable - the XWPFTable object.
    • Method Detail

      • getCT

        public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl getCT()
        Description copied from interface: ICTElement
        Returns the CT object of current element.
      • accept

        public java.lang.Object accept​(IDOCXVisitor visitor)
        Description copied from interface: IDOCXVisitable
        Accepts a visitor.
      • getXWPF

        public org.apache.poi.xwpf.usermodel.XWPFTable getXWPF()
        Description copied from interface: IXWPFElement
        Returns the XWPF object of current element.
      • getParent

        public AbstractBody getParent()
        Description copied from interface: IXWPFElement
        Returns the parent element of current element.
      • getTblPr

        public DOCXTblPr getTblPr()
        Returns the table properties.

        Represents the following element tag in the schema: w:tblPr.

        Returns:
        the table properties.
      • getTblPr

        public DOCXTblPr getTblPr​(boolean create)
        Returns the table properties.

        Represents the following element tag in the schema: w:tblPr.

        Parameters:
        create - whether to create a new table properties if it doesn't exist.
        Returns:
        the table properties.
      • setTblPr

        public void setTblPr​(DOCXTblPr tblPr)
        Sets the table properties.

        Represents the following element tag in the schema: w:tblPr.

        Parameters:
        tblPr - the table properties.
      • isSetTblPr

        public boolean isSetTblPr()
        Returns whether the table properties is set.
        Returns:
        whether the table properties is set.
      • getTableRows

        public java.util.List<DOCXTr> getTableRows()
        Returns the table rows.

        Represents the following element tag in the schema: w:tr.

        Returns:
        the table rows.
      • getTableRow

        public DOCXTr getTableRow​(int pos)
        Returns the TableRow at the specified position.
        Parameters:
        pos - the position of the TableRow.
        Returns:
        the TableRow at the specified position.
      • createTableRow

        public DOCXTr createTableRow()
        Create a new TableRow under this Table.
        Returns:
        the new TableRow.
      • getWidths

        public java.lang.Double[] getWidths()
        Returns the widths of the columns.
        Returns:
        the widths of the columns.
      • setWidths

        public void setWidths​(java.lang.Double[] widths)
        Sets the widths of the columns.
        Parameters:
        widths - the widths of the columns.