Class DOCXTc

All Implemented Interfaces:
ICTElement, IDOCXVisitable<Object>, IXWPFElement

public class DOCXTc extends AbstractBody
Internal Use Only.

Table Cell Definition.

Represents w:tc in xml.

Author:
Jamson Chan
  • Constructor Details

    • DOCXTc

      public DOCXTc(org.apache.poi.xwpf.usermodel.XWPFTableCell xwpfTableCell, DOCXTr parent)
      Create a new TableCell by given XWPFTableCell.
      Parameters:
      xwpfTableCell - the XWPFTableCell object.
  • Method Details

    • getCT

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

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

      public org.apache.poi.xwpf.usermodel.XWPFTableCell getXWPF()
      Description copied from interface: IXWPFElement
      Returns the XWPF object of current element.
      Specified by:
      getXWPF in interface IXWPFElement
      Overrides:
      getXWPF in class AbstractBody
    • getParent

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

      public DOCXTcPr getTcPr()
      Returns the table cell properties of the table cell.

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

      Returns:
      the table cell properties of the table cell.
    • getTcPr

      public DOCXTcPr getTcPr(boolean create)
      Returns the table cell properties of the table cell.

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

      Parameters:
      create - whether to create it if it does not exist.
      Returns:
      the table cell properties of the table cell.
    • setTcPr

      public void setTcPr(DOCXTcPr tcPr)
      Sets the table cell properties of the table cell.

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

      Parameters:
      tcPr - the table cell properties of the table cell.
    • isSetTcPr

      public boolean isSetTcPr()
      Returns whether the table cell properties of the table cell is set.
      Returns:
      whether the table cell properties of the table cell is set.
    • getParagraph

      public DOCXP getParagraph(int pos)
      Get the Paragraph by given position.
      Parameters:
      pos - the position.
      Returns:
      the Paragraph, or null if the position is out of range.
    • createParagraph

      public DOCXP createParagraph()
      Description copied from class: AbstractBody
      Create a new Paragraph.
      Specified by:
      createParagraph in class AbstractBody
      Returns:
      the new Paragraph.
    • getTable

      public DOCXTbl getTable(int pos)
      Get the Table by given position.
      Parameters:
      pos - the position.
      Returns:
      the Table, or null if the position is out of range.
    • createTable

      public DOCXTbl createTable()
      Description copied from class: AbstractBody
      Create a new Table.
      Specified by:
      createTable in class AbstractBody
      Returns:
      the new Table.