Class DOCXTr

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

public class DOCXTr extends AbstractVisitable
Internal Use Only.

Table Row Definition.

Represents w:tr in xml.

Author:
Jamson Chan
  • Constructor Details

    • DOCXTr

      public DOCXTr(org.apache.poi.xwpf.usermodel.XWPFTableRow xwpfTableRow, DOCXTbl parent)
      Create a new TableRow by given XWPFTableRow.
      Parameters:
      xwpfTableRow - the XWPFTableRow object.
  • Method Details

    • getCT

      public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow 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.XWPFTableRow getXWPF()
      Description copied from interface: IXWPFElement
      Returns the XWPF object of current element.
    • getParent

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

      public DOCXTrPr getTrPr()
      Returns the table row properties of the table row.

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

      Returns:
      the table row properties of the table row.
    • getTrPr

      public DOCXTrPr getTrPr(boolean create)
      Returns the table row properties of the table row.

      If the create parameter is true, create a new table row properties if it is not set.

      Parameters:
      create - whether to create a new table row properties if it is not set.
      Returns:
      the table row properties of the table row.
    • setTrPr

      public void setTrPr(DOCXTrPr trPr)
      Sets the table row properties of the table row.

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

      Parameters:
      trPr - the table row properties of the table row.
    • isSetTrPr

      public boolean isSetTrPr()
      Returns whether the table row properties of the table row is set.
      Returns:
      whether the table row properties of the table row is set.
    • getTableCells

      public List<DOCXTc> getTableCells()
      Returns the table cells.

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

      Returns:
      the table cells.
    • createTableCell

      public DOCXTc createTableCell()
      Create a new TableCell under this TableRow.
      Returns:
      the new TableCell.
    • removeTableCell

      public void removeTableCell(int pos)
      Remove a TableCell by given position.
      Parameters:
      pos - the position of the TableCell.
    • clearTableCells

      public void clearTableCells()
      Clear all TableCells.