com.spire.doc
Class Body

java.lang.Object
  extended by com.spire.doc.OwnerHolder
      extended by com.spire.doc.documents.xml.DocumentSerializable
          extended by com.spire.doc.DocumentObject
              extended by com.spire.doc.DocumentBase
                  extended by com.spire.doc.DocumentContainer
                      extended by com.spire.doc.Body
All Implemented Interfaces:
IBody, ICompositeObject, IDocumentObject, IDocumentSerializable
Direct Known Subclasses:
HeaderFooter, SDTContent, TableCell

public class Body
extends DocumentContainer
implements IBody


Method Summary
 Paragraph addParagraph()
          Adds paragraph at end of section.
 Table addTable()
          Adds the table.
 Table addTable(boolean showBorder)
          Adds the table.
 void ensureMinimum()
          If the text body has no paragraphs, creates and appends one Paragraph.
 DocumentObjectCollection getChildObjects()
          Gets the child entities.
 DocumentObjectType getDocumentObjectType()
          Gets the type of the document object.
 IParagraph getFirstParagraph()
          Gets the First paragraph.
 FormFieldCollection getFormFields()
          Gets the form fields.
 IParagraph getLastParagraph()
          Gets the last paragraph.
 ParagraphCollection getParagraphs()
          Gets inner paragraphs
 TableCollection getTables()
          Gets inner tables
 void insertXHTML(java.lang.String html)
          Inserts html at end of text body.
 void insertXHTML(java.lang.String html, int paragraphIndex)
          Inserts html.
 void insertXHTML(java.lang.String html, int paragraphIndex, int paragraphItemIndex)
          Inserts html.
 boolean isValidXHTML(java.lang.String html, XHTMLValidationType type)
          Validates the XHTML.
 boolean isValidXHTML(java.lang.String html, XHTMLValidationType type, java.lang.String[] exceptionMessage)
          Validates the XHTML.
 
Methods inherited from class com.spire.doc.DocumentContainer
getCount, getIndex
 
Methods inherited from class com.spire.doc.DocumentObject
deepClone, getFirstChild, getLastChild, getNextSibling, getNextWidgetSibling, getOwner, getPreviousSibling, getPreviousWidgetSibling, isComposite, prependChild, toString
 
Methods inherited from class com.spire.doc.OwnerHolder
getDocument
 
Methods inherited from interface com.spire.doc.interfaces.IDocumentObject
deepClone, getDocument, getNextSibling, getOwner, getPreviousSibling, isComposite
 

Method Detail

getDocumentObjectType

public DocumentObjectType getDocumentObjectType()
Gets the type of the document object.

Specified by:
getDocumentObjectType in interface IDocumentObject
Specified by:
getDocumentObjectType in class DocumentObject
Returns:
DocumentObjectType

getParagraphs

public ParagraphCollection getParagraphs()
Gets inner paragraphs

Specified by:
getParagraphs in interface IBody
Returns:
ParagraphCollection

getTables

public TableCollection getTables()
Gets inner tables

Specified by:
getTables in interface IBody
Returns:
TableCollection

getFormFields

public FormFieldCollection getFormFields()
Gets the form fields.

Specified by:
getFormFields in interface IBody
Returns:
FormFieldCollection

getLastParagraph

public IParagraph getLastParagraph()
Gets the last paragraph.

Specified by:
getLastParagraph in interface IBody
Returns:
IParagraph

getFirstParagraph

public IParagraph getFirstParagraph()
Gets the First paragraph.

Returns:
IParagraph

getChildObjects

public DocumentObjectCollection getChildObjects()
Gets the child entities.

Specified by:
getChildObjects in interface ICompositeObject
Specified by:
getChildObjects in class DocumentObject
Returns:
DocumentObjectCollection

addParagraph

public Paragraph addParagraph()
Adds paragraph at end of section.

Specified by:
addParagraph in interface IBody
Returns:

addTable

public Table addTable()
Adds the table.

Specified by:
addTable in interface IBody
Returns:
Table

addTable

public Table addTable(boolean showBorder)
Adds the table.

Parameters:
showBorder - Is Show Border
Returns:
Table

insertXHTML

public void insertXHTML(java.lang.String html)
Inserts html at end of text body.

Specified by:
insertXHTML in interface IBody
Parameters:
html -

insertXHTML

public void insertXHTML(java.lang.String html,
                        int paragraphIndex)
Inserts html. Inserting begins from paragraph specified by paragraphIndex

Specified by:
insertXHTML in interface IBody
Parameters:
html -
paragraphIndex -

insertXHTML

public void insertXHTML(java.lang.String html,
                        int paragraphIndex,
                        int paragraphItemIndex)
Inserts html. Inserting begins from paragraph specified by paragraphIndex, and paragraph item specified by paragraphItemIndex

Specified by:
insertXHTML in interface IBody
Parameters:
html -
paragraphIndex -
paragraphItemIndex -

isValidXHTML

public boolean isValidXHTML(java.lang.String html,
                            XHTMLValidationType type)
Validates the XHTML. if it is valid XHTML, set to true.

Parameters:
html - The HTML.
type - The validation type.
Returns:
boolean

isValidXHTML

public boolean isValidXHTML(java.lang.String html,
                            XHTMLValidationType type,
                            java.lang.String[] exceptionMessage)
Validates the XHTML. if it is valid XHTML, set to true.

Parameters:
html - The HTML.
type - The validation type.
exceptionMessage - The exception message.
Returns:
boolean

ensureMinimum

public void ensureMinimum()
If the text body has no paragraphs, creates and appends one Paragraph.

Specified by:
ensureMinimum in interface IBody