Class DOCXR

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

public class DOCXR extends AbstractVisitable implements IDOCXRPrHolder
Internal Use Only.

Run Definition.

Represents w:r in xml.

Author:
Jamson Chan
  • Constructor Details

    • DOCXR

      public DOCXR(org.apache.poi.xwpf.usermodel.XWPFRun xwpfRun, DOCXP parent)
      Create a new Run by given XWPFRun.
      Parameters:
      xwpfRun - the XWPFRun object.
  • Method Details

    • getCT

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

      public Object accept(IDOCXVisitor visitor)
      Description copied from interface: IDOCXVisitable
      Accepts a visitor.
      Specified by:
      accept in interface IDOCXVisitable<Object>
    • getXWPF

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

      public DOCXP getParent()
      Description copied from interface: IXWPFElement
      Returns the parent element of current element.
      Specified by:
      getParent in interface IXWPFElement
    • getRPr

      public DOCXRPr getRPr()
      Returns the run properties.

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

      Returns:
      the run properties.
    • getRPr

      public DOCXRPr getRPr(boolean create)
      Returns the run properties.

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

      Parameters:
      create - whether to create it if it does not exist.
      Returns:
      the run properties.
    • setRPr

      public void setRPr(DOCXRPr rPr)
      Sets the run properties.

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

      Parameters:
      rPr - the run properties.
    • isSetRPr

      public boolean isSetRPr()
      Returns whether the run properties is set.

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

      Returns:
      whether the run properties is set.
    • getText

      public String getText()
      Returns the text.

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

      Returns:
      the text.
    • getText

      public String getText(int index)
      Returns the text.

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

      Parameters:
      index - the index of the text.
      Returns:
      the text.
    • setText

      public void setText(String text)
      Sets the text.

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

      Parameters:
      text - the text.