Class DOCXP

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

public class DOCXP extends AbstractBodyElement implements IDOCXRPrHolder
Internal Use Only.

Paragraph Definition.

Represents w:p in xml.

Author:
Jamson Chan
  • Constructor Details

    • DOCXP

      public DOCXP(org.apache.poi.xwpf.usermodel.XWPFParagraph xwpfParagraph, AbstractBody parent)
      Create a new Paragraph by given XWPFParagraph.
      Parameters:
      xwpfParagraph - the XWPFParagraph object.
  • Method Details

    • getCT

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

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

      public DOCXPPr getPPr()
      Returns the ParagraphProperties of this Paragraph.

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

      Returns:
      the ParagraphProperties of this Paragraph.
    • getPPr

      public DOCXPPr getPPr(boolean create)
      Returns the ParagraphProperties of this Paragraph.

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

      Parameters:
      create - whether to create a new ParagraphProperties if it doesn't exist.
      Returns:
      the ParagraphProperties of this Paragraph.
    • setPPr

      public void setPPr(DOCXPPr pPr)
      Sets the ParagraphProperties of this Paragraph.

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

      Parameters:
      pPr - the ParagraphProperties to set.
    • isSetPPr

      public boolean isSetPPr()
      Returns whether the ParagraphProperties of this Paragraph is set.
      Returns:
      whether the ParagraphProperties of this Paragraph is set.
    • getRuns

      public List<DOCXR> getRuns()
      Returns the Runs under this Paragraph.

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

      Returns:
      the Runs under this Paragraph.
    • createRun

      public DOCXR createRun()
      Create a new Run under this Paragraph.
      Returns:
      the new Run.