bookmarksnavigator-ag凯发旗舰厅



com.spire.doc.documents
class bookmarksnavigator

java.lang.object
  extended by com.spire.doc.documents.bookmarksnavigator

public class bookmarksnavigator
extends java.lang.object

helper class for navigations in document bookmarks and editing bookmarks content.


constructor summary
bookmarksnavigator(idocument doc)
          initializes a new instance of the bookmarksnavigator class.
 
method summary
 void deletebookmarkcontent(boolean saveformatting)
          deletes the bookmark content.
 textbodypart getbookmarkcontent()
          gets the bookmark content2.
 bookmark getcurrentbookmark()
          gets the current bookmark.
 idocument getdocument()
          returns that this object is attached to.
 void insertparagraph(iparagraph paragraph)
          inserts the paragraph.
 iparagraphbase insertparagraphitem(paragraphitemtype itemtype)
          inserts the paragraph item to current position.
 void inserttable(itable table)
          inserts the table.
 itextrange inserttext(java.lang.string text)
          inserts the text.
 itextrange inserttext(java.lang.string text, boolean saveformatting)
          inserts the text range to current position.
 void inserttextbodypart(textbodypart bodypart)
          inserts the text body part.
 void movetobookmark(java.lang.string bookmarkname)
          moves the cursor to specified bookmark.
 void movetobookmark(java.lang.string bookmarkname, boolean isstart, boolean isafter)
          moves the cursor to specified bookmark.
 void replacebookmarkcontent(java.lang.string text, boolean saveformatting)
          replaces the content of the bookmark.
 void replacebookmarkcontent(textbodypart bodypart)
          replaces the bookmark content2.
 void replacebookmarkcontent(textbodypart bodypart, boolean iskeepsourcefirstparaformat)
          replaces the bookmark content2.
 void replacebookmarkcontent(textbodypart bodypart, boolean iskeepsourcefirstparaformat, boolean saveformatting)
          replaces the content of the bookmark.
 void setdocument(idocument value)
          setsdocument that this object is attached to.
 
constructor detail

bookmarksnavigator

public bookmarksnavigator(idocument doc)
initializes a new instance of the bookmarksnavigator class.
parameters:
doc - the doc.
method detail

getdocument

public idocument getdocument()
returns that this object is attached to.
returns:
the document

setdocument

public void setdocument(idocument value)
setsdocument that this object is attached to.
parameters:
value - the document

getcurrentbookmark

public bookmark getcurrentbookmark()
gets the current bookmark.
returns:
the current bookmark.

movetobookmark

public void movetobookmark(java.lang.string bookmarkname)
moves the cursor to specified bookmark.
parameters:
bookmarkname - name of the bookmark.

movetobookmark

public void movetobookmark(java.lang.string bookmarkname,
                           boolean isstart,
                           boolean isafter)
moves the cursor to specified bookmark.
parameters:
bookmarkname - name of the bookmark.
isstart - when true, moves the cursor to the beginning of the bookmark. when false, moves the cursor to the end of the bookmark
isafter - when true, moves the cursor to be after the bookmark start or end position. when false, moves the cursor to be before the bookmark start or end position.

inserttext

public itextrange inserttext(java.lang.string text)
inserts the text.
parameters:
text - the text.
returns:
itextrange

inserttext

public itextrange inserttext(java.lang.string text,
                             boolean saveformatting)
inserts the text range to current position.
parameters:
text - the text.
saveformatting - if it is save formatting, set to true
returns:
itextrange

inserttable

public void inserttable(itable table)
inserts the table.
parameters:
table - the table.

insertparagraphitem

public iparagraphbase insertparagraphitem(paragraphitemtype itemtype)
inserts the paragraph item to current position.
parameters:
itemtype - type of the item.
returns:
iparagraphbase object

insertparagraph

public void insertparagraph(iparagraph paragraph)
inserts the paragraph.
parameters:
paragraph - the paragraph.

inserttextbodypart

public void inserttextbodypart(textbodypart bodypart)
inserts the text body part.
parameters:
bodypart - >the text body part.

getbookmarkcontent

public textbodypart getbookmarkcontent()
gets the bookmark content2.
returns:
textbodypart

deletebookmarkcontent

public void deletebookmarkcontent(boolean saveformatting)
deletes the bookmark content.
parameters:
saveformatting - if its save com.spire.doc.formatting, set to true

replacebookmarkcontent

public void replacebookmarkcontent(textbodypart bodypart)
replaces the bookmark content2.
parameters:
bodypart - the body part.

replacebookmarkcontent

public void replacebookmarkcontent(textbodypart bodypart,
                                   boolean iskeepsourcefirstparaformat)
replaces the bookmark content2.
parameters:
bodypart - the body part.
iskeepsourcefirstparaformat - if it is keep the source first paragraph format, set to true

replacebookmarkcontent

public void replacebookmarkcontent(textbodypart bodypart,
                                   boolean iskeepsourcefirstparaformat,
                                   boolean saveformatting)
replaces the content of the bookmark.
parameters:
bodypart - the body part.
iskeepsourcefirstparaformat - if it is keep the source first paragraph format, set to true
saveformatting - if it is save formatting, set to true

replacebookmarkcontent

public void replacebookmarkcontent(java.lang.string text,
                                   boolean saveformatting)
replaces the content of the bookmark.
parameters:
text - the text.
saveformatting - if it is save formatting, set to true


网站地图