com.spire.doc
Class BodyRegion

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.BodyRegion
All Implemented Interfaces:
IBodyRegion, IDocumentObject, IDocumentSerializable
Direct Known Subclasses:
Paragraph, StructureDocumentTag, Table

public abstract class BodyRegion
extends DocumentBase
implements IBodyRegion


Constructor Summary
BodyRegion(Document doc)
           
 
Method Summary
abstract  TextSelection find(java.util.regex.Pattern pattern)
          Finds text by specified pattern.
 EditRevision getDeleteRevision()
          Gets the delete revision for this objects.
 EditRevision getInsertRevision()
          Gets the insert revision for this objects.
 Body getOwnerTextBody()
          Gets the owner text body.
 boolean isDeleteRevision()
          Gets a value indicating whether this item was deleted from the document.
 boolean isInsertRevision()
          Gets a value indicating whether this item was inserted to the document.
abstract  int replace(java.util.regex.Pattern pattern, java.lang.String replace)
          Replaces all entries of matchString regular expression with newValue string.
abstract  int replace(java.util.regex.Pattern pattern, TextSelection textSelection)
          Replaces by specified pattern.
abstract  int replace(java.util.regex.Pattern pattern, TextSelection textSelection, boolean saveFormatting)
          Replaces by specified pattern.
abstract  int replace(java.lang.String given, java.lang.String replace, boolean caseSensitive, boolean wholeWord)
          Replaces by specified matchString string.
 
Methods inherited from class com.spire.doc.DocumentObject
deepClone, getChildObjects, getDocumentObjectType, 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, getDocumentObjectType, getNextSibling, getOwner, getPreviousSibling, isComposite
 

Constructor Detail

BodyRegion

public BodyRegion(Document doc)
Method Detail

getOwnerTextBody

public Body getOwnerTextBody()
Gets the owner text body.

Returns:
Body

isInsertRevision

public boolean isInsertRevision()
Gets a value indicating whether this item was inserted to the document.

Returns:
boolean

getInsertRevision

public EditRevision getInsertRevision()
Gets the insert revision for this objects. Note this can be null. If null does not have insert revision.

Returns:
EditRevision

isDeleteRevision

public boolean isDeleteRevision()
Gets a value indicating whether this item was deleted from the document.

Returns:
boolean

getDeleteRevision

public EditRevision getDeleteRevision()
Gets the delete revision for this objects. Note this can be null. If null does not have delete revision.

Returns:
EditRevision

find

public abstract TextSelection find(java.util.regex.Pattern pattern)
Finds text by specified pattern.

Parameters:
pattern - The pattern.
Returns:
TextSelection

replace

public abstract int replace(java.util.regex.Pattern pattern,
                            java.lang.String replace)
Replaces all entries of matchString regular expression with newValue string.

Specified by:
replace in interface IBodyRegion
Parameters:
pattern - Pattern
replace - Replace text
Returns:
int

replace

public abstract int replace(java.lang.String given,
                            java.lang.String replace,
                            boolean caseSensitive,
                            boolean wholeWord)
Replaces by specified matchString string.

Parameters:
given - The matchString text.
replace - The newValue text.
caseSensitive - if set to true case sensitive newValue.
wholeWord - if it replaces only whole word, set to true.
Returns:

replace

public abstract int replace(java.util.regex.Pattern pattern,
                            TextSelection textSelection)
Replaces by specified pattern.

Specified by:
replace in interface IBodyRegion
Parameters:
pattern - The pattern.
textSelection - The text selection.
Returns:
int

replace

public abstract int replace(java.util.regex.Pattern pattern,
                            TextSelection textSelection,
                            boolean saveFormatting)
Replaces by specified pattern.

Parameters:
pattern - The pattern.
textSelection - The text selection.
saveFormatting - if save source formatting, set to true
Returns:
int