|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |
java.lang.objectcom.spire.doc.ownerholder
com.spire.doc.documents.xml.documentserializable
com.spire.doc.documentobject
com.spire.doc.documentbase
com.spire.doc.bodyregion
com.spire.doc.documents.paragraph
public class paragraph
represents a paragraph of text.
constructor summary | |
---|---|
paragraph(idocument doc)
initializes a new instance of the paragraph class. |
method summary | |
---|---|
bookmarkend |
appendbookmarkend(java.lang.string name)
appends end of the bookmark with specified name into paragraph. |
bookmarkstart |
appendbookmarkstart(java.lang.string name)
appends start of the bookmark with specified name into paragraph. |
break |
appendbreak(breaktype breaktype)
appends break to end of paragraph. |
checkboxformfield |
appendcheckbox()
appends the check box form field. |
checkboxformfield |
appendcheckbox(java.lang.string checkboxname,
boolean defaultcheckboxvalue)
appends the check box. |
comment |
appendcomment(java.lang.string text)
appends the comment. |
commentmark |
appendcommentmark(commentmarktype type)
appends the comment mark. |
dropdownformfield |
appenddropdownformfield()
appends the drop down form field. |
dropdownformfield |
appenddropdownformfield(java.lang.string dropdropdownname)
appends the drop down form field. |
field |
appendfield(java.lang.string fieldname,
fieldtype fieldtype)
appends the field. |
fieldmark |
appendfieldmark(fieldmarktype type)
appends the field mark. |
footnote |
appendfootnote(footnotetype type)
appends the footnote. |
footnote |
appendfootnote(footnotetype type,
boolean bisautonumbered)
appends the footnote. |
void |
appendhtml(java.lang.string html)
appends the html. |
field |
appendhyperlink(java.lang.string link,
docpicture picture,
hyperlinktype type)
appends the hyperlink. |
field |
appendhyperlink(java.lang.string link,
java.lang.string text,
hyperlinktype type)
appends the hyperlink. |
docoleobject |
appendoleobject(byte[] olebytes,
docpicture olepicture,
olelinktype olelinktype)
appends the ole object. |
docoleobject |
appendoleobject(byte[] olebytes,
docpicture olepicture,
oleobjecttype type)
appends the ole object into paragraph. |
docoleobject |
appendoleobject(byte[] olebytes,
docpicture olepicture,
java.lang.string fileextension)
appends the openpackage ole object (ole object without specified type). |
docoleobject |
appendoleobject(java.io.inputstream olestream,
docpicture olepicture,
olelinktype olelinktype)
appends the ole object into paragraph. |
docoleobject |
appendoleobject(java.io.inputstream olestream,
docpicture olepicture,
oleobjecttype type)
appends the ole object. |
docoleobject |
appendoleobject(java.io.inputstream olestream,
docpicture olepicture,
java.lang.string fileextension)
appends the openpackage ole object (ole object without specified type). |
docoleobject |
appendoleobject(java.lang.string pathtofile,
docpicture olepicture)
appends the ole object. |
docoleobject |
appendoleobject(java.lang.string linkfile,
docpicture olepicture,
olelinktype olelinktype)
appends the ole object. |
docoleobject |
appendoleobject(java.lang.string pathtofile,
docpicture olepicture,
oleobjecttype type)
appends the ole object into paragraph. |
permissionend |
appendpermend(java.lang.string id)
appends end of the permission with specified id into paragraph. |
permissionstart |
appendpermstart(java.lang.string id)
appends start of the permission with specified id into paragraph. |
docpicture |
appendpicture(byte[] imagebytes)
appends image to end of paragraph. |
docpicture |
appendpicture(java.io.inputstream inputstream)
appends the picture |
docpicture |
appendpicture(java.lang.string filepath)
appends the picture |
void |
appendrtf(java.lang.string rtfcode)
appends the rtf. |
void |
appendrtf(java.lang.string rtfcode,
boolean addtolastsection)
appends the rtf. |
shapeobject |
appendshape(float width,
float height,
shapetype shapetype)
append shape to the end of the paragraph. |
shapegroup |
appendshapegroup(float width,
float height)
append shape group to the end of the paragraph. |
symbol |
appendsymbol(byte charactercode)
appends special symbol to end of paragraph. |
textrange |
appendtext(java.lang.string text)
appends text to end of document. |
textbox |
appendtextbox(float width,
float height)
append textbox to the end of the paragraph |
textformfield |
appendtextformfield(java.lang.string defaulttext)
appends the text form field. |
textformfield |
appendtextformfield(java.lang.string formfieldname,
java.lang.string defaulttext)
appends the text form field. |
tableofcontent |
appendtoc(int lowerlevel,
int upperlevel)
appends the table of content. |
void |
applystyle(builtinstyle builtinstyle)
applies the built-in style. |
void |
applystyle(java.lang.string stylename)
applies the specified style. |
void |
clearrunattrs()
clears run attributes. |
java.lang.object |
fetchinheritedrunattr(int key)
gets the attribute from one of the parents or from global defaults. |
textselection |
find(java.util.regex.pattern pattern)
returns first entry of matchstring regex. |
textselection |
find(java.lang.string given,
boolean casesensitive,
boolean wholeword)
returns first entry of matchstring string, taking into consideration casesensitive and wholeword options. |
paragraphbase |
get(int index)
gets paragraph item by index. |
characterformat |
getbreakcharacterformat()
gets character format for the break symbol. |
int |
getcharcount()
gets the char count,whtout spaces. |
int |
getcharcountincludespace()
gets the char count of the include spaces. |
documentobjectcollection |
getchildobjects()
gets the child objects. |
java.lang.object |
getdirectrunattr(int key)
gets the attribute specified directly on the source or null by the key. |
void |
getdirectrunattrbyindex(int index,
int[] key,
java.lang.object[] value)
gets the attribute specified directly on the source by the index. |
int |
getdirectrunattrscount()
count of attribute records in direct formatting. |
documentobjecttype |
getdocumentobjecttype()
gets the type of the document object. |
paragraphformat |
getformat()
gets paragraph format. |
paragraphitemcollection |
getitems()
gets paragraph items. |
listformat |
getlistformat()
gets format of the list for the paragraph. |
listformat |
getlistformatforapplystyle()
gets the list format for apply style. |
java.lang.string |
getlisttext()
gets the list text. |
paragraphstyle |
getstyle()
gets related style. |
java.lang.string |
getstylename()
gets paragraph style name. |
java.lang.string |
gettext()
returns paragraph text. |
int |
getwordcount()
gets the word count. |
section |
insertsectionbreak()
inserts the section break. |
section |
insertsectionbreak(sectionbreaktype breaktype)
inserts the section break. |
boolean |
isendofdocument()
gets a value indicating whether this paragraph is end of document. |
boolean |
isendofsection()
gets a value indicating whether this paragraph is end of section. |
boolean |
isincell()
gets a value indicating whether this paragraph is in cell. |
void |
removeabsposition()
removes the absolute position data. |
void |
removeframe()
remove a frame. |
int |
replace(java.util.regex.pattern pattern,
java.lang.string replace)
replaces all entries of matchstring regular expression with newvalue string. |
int |
replace(java.util.regex.pattern pattern,
textselection textselection)
replaces all entries of matchstring regular expression with textrangesholder. |
int |
replace(java.util.regex.pattern pattern,
textselection textselection,
boolean saveformatting)
replaces all entries of matchstring regular expression with textrangesholder. |
int |
replace(java.lang.string given,
java.lang.string replace,
boolean casesensitive,
boolean wholeword)
replaces all entries of matchstring string with newvalue string, taking into consideration casesensitive and wholeword options. |
int |
replace(java.lang.string given,
textselection textselection,
boolean casesensitive,
boolean wholeword)
replaces all entries of matchstring string with textrangesholder, taking into consideration casesensitive and wholeword options. |
int |
replace(java.lang.string given,
textselection textselection,
boolean casesensitive,
boolean wholeword,
boolean saveformatting)
replaces all entries of matchstring string with textrangesholder, taking into consideration casesensitive and wholeword options. |
void |
setrunattr(int key,
java.lang.object value)
sets run attribute. |
void |
settext(java.lang.string value)
sets paragraph text. |
java.lang.string |
updatelistvalue()
updates the list value. |
void |
updatewordcount(char[] splitchar,
boolean includetb)
calculate word count and character count of the paragraph. |
methods inherited from class com.spire.doc.bodyregion |
---|
isdeleterevision, isinsertrevision, ownertextbody |
methods inherited from class com.spire.doc.documentobject |
---|
deepclone, getfirstchild, getlastchild, getnextsibling, getowner, getprevioussibling, iscomposite, 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 |
constructor detail |
---|
public paragraph(idocument doc)
doc
- docmethod detail |
---|
public java.lang.string getlisttext()
public documentobjecttype getdocumentobjecttype()
getdocumentobjecttype
in interface idocumentobject
getdocumentobjecttype
in class documentobject
public documentobjectcollection getchildobjects()
getchildobjects
in interface icompositeobject
getchildobjects
in class documentobject
public java.lang.string getstylename()
getstylename
in interface istyleholder
public java.lang.string gettext()
gettext
in interface iparagraph
public void settext(java.lang.string value)
settext
in interface iparagraph
value
- stringpublic paragraphbase get(int index)
get
in interface iparagraph
index
- index
public paragraphitemcollection getitems()
getitems
in interface iparagraph
public paragraphformat getformat()
getformat
in interface iparagraph
public characterformat getbreakcharacterformat()
getbreakcharacterformat
in interface iparagraph
public listformat getlistformat()
getlistformat
in interface iparagraph
public boolean isincell()
isincell
in interface iparagraph
public boolean isendofsection()
isendofsection
in interface iparagraph
public boolean isendofdocument()
isendofdocument
in interface iparagraph
public int getwordcount()
public int getcharcount()
public int getcharcountincludespace()
public void applystyle(java.lang.string stylename)
applystyle
in interface istyleholder
stylename
- style namepublic void applystyle(builtinstyle builtinstyle)
applystyle
in interface istyleholder
builtinstyle
- the built-in style.public paragraphstyle getstyle()
getstyle
in interface iparagraph
public void removeabsposition()
removeabsposition
in interface iparagraph
public textrange appendtext(java.lang.string text)
appendtext
in interface iparagraph
text
- string
public docpicture appendpicture(byte[] imagebytes)
appendpicture
in interface iparagraph
imagebytes
- imagebytes
public field appendfield(java.lang.string fieldname, fieldtype fieldtype)
appendfield
in interface iparagraph
fieldname
- fieldnamefieldtype
- fieldtype
public fieldmark appendfieldmark(fieldmarktype type)
type
- the type.
public field appendhyperlink(java.lang.string link, java.lang.string text, hyperlinktype type)
appendhyperlink
in interface iparagraph
link
- the link.text
- the text to display.type
- the hyperlink type.
public field appendhyperlink(java.lang.string link, docpicture picture, hyperlinktype type)
appendhyperlink
in interface iparagraph
link
- the link.picture
- the picture to display.type
- the type of hyperlink.
public bookmarkstart appendbookmarkstart(java.lang.string name)
appendbookmarkstart
in interface iparagraph
name
- name
public bookmarkend appendbookmarkend(java.lang.string name)
appendbookmarkend
in interface iparagraph
name
- name
public permissionstart appendpermstart(java.lang.string id)
id
- id
public permissionend appendpermend(java.lang.string id)
id
- id
public comment appendcomment(java.lang.string text)
appendcomment
in interface iparagraph
text
- the string.
public commentmark appendcommentmark(commentmarktype type)
type
- the type.
public footnote appendfootnote(footnotetype type)
appendfootnote
in interface iparagraph
type
- the type.
public footnote appendfootnote(footnotetype type, boolean bisautonumbered)
type
- the type.bisautonumbered
- is auto numbered.
public textbox appendtextbox(float width, float height)
appendtextbox
in interface iparagraph
width
- textbox widthheight
- textbox height
public checkboxformfield appendcheckbox()
appendcheckbox
in interface iparagraph
public checkboxformfield appendcheckbox(java.lang.string checkboxname, boolean defaultcheckboxvalue)
appendcheckbox
in interface iparagraph
checkboxname
- name of the check box.defaultcheckboxvalue
- default checkbox value
public textformfield appendtextformfield(java.lang.string defaulttext)
appendtextformfield
in interface iparagraph
defaulttext
- the default text. pass "null" to insert default word text
public textformfield appendtextformfield(java.lang.string formfieldname, java.lang.string defaulttext)
appendtextformfield
in interface iparagraph
formfieldname
- name of the form field.defaulttext
- the default text. pass "null" to insert default word text
public dropdownformfield appenddropdownformfield()
appenddropdownformfield
in interface iparagraph
public dropdownformfield appenddropdownformfield(java.lang.string dropdropdownname)
appenddropdownformfield
in interface iparagraph
dropdropdownname
- name of the drop drop down.
public symbol appendsymbol(byte charactercode)
appendsymbol
in interface iparagraph
charactercode
- the character code.
public shapeobject appendshape(float width, float height, shapetype shapetype)
width
- shape widthheight
- shape heightshapetype
- shape type
public shapegroup appendshapegroup(float width, float height)
width
- the width.height
- the height.
public break appendbreak(breaktype breaktype)
appendbreak
in interface iparagraph
breaktype
- the break type.
public tableofcontent appendtoc(int lowerlevel, int upperlevel)
appendtoc
in interface iparagraph
lowerlevel
- the starting heading level of the table of content.upperlevel
- the ending heading level of the table of content.
public docoleobject appendoleobject(java.io.inputstream olestream, docpicture olepicture, oleobjecttype type)
appendoleobject
in interface iparagraph
olestream
- the ole object (file) stream.olepicture
- the ole picture.type
- the type of ole object.
public docpicture appendpicture(java.io.inputstream inputstream)
appendpicture
in interface iparagraph
inputstream
- the image input stream
public docpicture appendpicture(java.lang.string filepath)
appendpicture
in interface iparagraph
filepath
- the image file path
public void appendhtml(java.lang.string html)
appendhtml
in interface iparagraph
html
- the html.public void appendrtf(java.lang.string rtfcode, boolean addtolastsection)
rtfcode
- the rtf code.addtolastsection
- when is true, added to the last section of the document.public void appendrtf(java.lang.string rtfcode)
rtfcode
- the rtf code.public docoleobject appendoleobject(byte[] olebytes, docpicture olepicture, oleobjecttype type)
appendoleobject
in interface iparagraph
olebytes
- the ole object (file) bytes.olepicture
- the ole picture.type
- the type of ole object.
public docoleobject appendoleobject(java.lang.string pathtofile, docpicture olepicture, oleobjecttype type)
appendoleobject
in interface iparagraph
pathtofile
- the path to file.olepicture
- the ole picture.type
- the type of ole object.
public docoleobject appendoleobject(java.lang.string pathtofile, docpicture olepicture)
appendoleobject
in interface iparagraph
pathtofile
- the path to file.olepicture
- the ole picture.
public docoleobject appendoleobject(java.io.inputstream olestream, docpicture olepicture, olelinktype olelinktype)
appendoleobject
in interface iparagraph
olestream
- the ole storage.olepicture
- the ole picture.olelinktype
- the type of ole object link type.
public docoleobject appendoleobject(byte[] olebytes, docpicture olepicture, olelinktype olelinktype)
appendoleobject
in interface iparagraph
olebytes
- the ole storage bytes.olepicture
- the ole picture.olelinktype
- type of the ole link.
public docoleobject appendoleobject(java.lang.string linkfile, docpicture olepicture, olelinktype olelinktype)
linkfile
- the link file.olepicture
- the ole picture.olelinktype
- type of the ole link.
public docoleobject appendoleobject(byte[] olebytes, docpicture olepicture, java.lang.string fileextension)
appendoleobject
in interface iparagraph
olebytes
- the ole object bytes.olepicture
- the ole picture.fileextension
- the file extension.
public docoleobject appendoleobject(java.io.inputstream olestream, docpicture olepicture, java.lang.string fileextension)
appendoleobject
in interface iparagraph
olestream
- the ole file stream.olepicture
- the ole picture.fileextension
- the file extension.
public void removeframe()
public textselection find(java.util.regex.pattern pattern)
find
in class bodyregion
pattern
- the pattern.
public textselection find(java.lang.string given, boolean casesensitive, boolean wholeword)
given
- the matchstring.casesensitive
- if it is case sensitive, set to truewholeword
- if it specifies to search a whole word, set to true
public int replace(java.util.regex.pattern pattern, java.lang.string replace)
replace
in interface ibodyregion
replace
in class bodyregion
pattern
- the pattern.replace
- the newvalue.
public int replace(java.lang.string given, java.lang.string replace, boolean casesensitive, boolean wholeword)
replace
in interface ibodyregion
replace
in class bodyregion
given
- the matchstring text to newvaluereplace
- the newvalue text .casesensitive
- if specifies case sensitive, set to truewholeword
- if it specifies to search a whole word, set to true
public int replace(java.util.regex.pattern pattern, textselection textselection)
replace
in interface ibodyregion
replace
in class bodyregion
pattern
- the pattern.textselection
- the text selection.
public int replace(java.util.regex.pattern pattern, textselection textselection, boolean saveformatting)
replace
in class bodyregion
pattern
- the pattern.textselection
- the text selection.saveformatting
- if it specifies save source formatting, set to true
public int replace(java.lang.string given, textselection textselection, boolean casesensitive, boolean wholeword)
replace
in interface iparagraph
given
- the matchstring.textselection
- the text selection.casesensitive
- if it specifies case sensitive, set to truewholeword
- if it specifies to check whole word, set to true
public int replace(java.lang.string given, textselection textselection, boolean casesensitive, boolean wholeword, boolean saveformatting)
given
- the matchstring.textselection
- the text selection.casesensitive
- if it specifies case sensitive, set to truewholeword
- if it specifies to search a whole word, set to truesaveformatting
- if it specifies save source formatting, set to true
public section insertsectionbreak()
public section insertsectionbreak(sectionbreaktype breaktype)
breaktype
- type of the break.
public void updatewordcount(char[] splitchar, boolean includetb)
splitchar
- splitcharincludetb
- includetbpublic java.lang.string updatelistvalue()
public listformat getlistformatforapplystyle()
public java.lang.object getdirectrunattr(int key)
irunattrsource
getdirectrunattr
in interface irunattrsource
key
- key
public int getdirectrunattrscount()
irunattrsource
getdirectrunattrscount
in interface irunattrsource
public void getdirectrunattrbyindex(int index, int[] key, java.lang.object[] value)
irunattrsource
getdirectrunattrbyindex
in interface irunattrsource
index
- intkey
- leysvalue
- objectspublic java.lang.object fetchinheritedrunattr(int key)
irunattrsource
fetchinheritedrunattr
in interface irunattrsource
key
- key
public void setrunattr(int key, java.lang.object value)
irunattrsource
setrunattr
in interface irunattrsource
key
- keyvalue
- objectpublic void clearrunattrs()
irunattrsource
clearrunattrs
in interface irunattrsource
|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |