This chapter describes how you can change the following settings and annotations on a document:
The interface PageBookmarkable provides the functionality to add, get or remove bookmarks. For details on type PageBookmark, refer to the JavaDoc of org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.PageBookmark.
Method
void addBookmark(PageBookmark bookmark);
adds a given bookmark to the document.
To get bookmarks of a document, you can either use the method
PageBookmark getBookmark(String id);
to retrieve a specific bookmark with a given id, or
Set<PageBookmark> getBookmarks();
to get all bookmarks as a set of bookmarks.
In case you like to get the default bookmark for a document, use the method:
PageBookmark getDefaultBookmark();
This returns the default bookmark of the document.
To move a bookmark, use the following method:
void moveBookmark(int sourceOrder, int targetOrder);
Hereby, the parameter sourceOrder determines the order
to be replaced by the given targetOrder parameter.
To remove a specific bookmark, use:
void removeBookmark(String id);
The bookmark with the given id is deleted.
To set the default bookmark, use:
void setDefaultBookmark(String id);
The bookmark with the given id is marked as default bookmark.
The interface org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.NoteCapable provides methods for adding, retrieving and removing notes on a document. For details on type Note, refer to the JavaDoc of org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.Note.
To add a note, use the method:
void addNote(Note note);
To get notes you can either use the method
Note getNote(String id);
to receive a note with a specific id, or
Set<Note> getNotes();
to get a set of all notes.
To delete a note with a specific id, use:
void removeNote(String id);
The interface org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.HighlightCapable provides methods for adding, retrieving and removing highlights on a document. For details on type Highlight, refer to the JavaDoc of org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.Highlight.
To add a highlight to a document, use the method:
void addHighlight(Highlight highlight);
To get highlights set on a document, you can either use the method
Highlight getHighlight(String id);
to retrieve the highlight with a specific id, or
Set<Highlight> getHighlights();
to get all highlights set on a document.
Use method
void removeHighlight(String id);
to remove a highlight with a specific id.
The interface org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.StampAware provides methods for adding, retrieving and removing stamps on a document. For details on type Stamp, refer to the JavaDoc of org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.Stamp.
To add a stamp to a document, use the following method:
void addStamp(Stamp stamp);
To get a stamp added to a document, you can either use
Stamp getStamp(String id);
to receive a stamp with a specific id, or
Set<Stamp> getStamps();
to receive all stamps set on the document.
Use
void removeStamp(String id);
to remove a stamp with a specific id.
The interface org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.PageOrientationAware provides methods for adding, retrieving and removing the page orientation of a document. For details on type PageOrientation, refer to the JavaDoc of org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.PageOrientation.
To add a page orientation to a document, use the following method:
void addPageOrientation(PageOrientation pageOrientation);
To get page orientation that is set on a document, you can either use
PageOrientation getPageOrientation(int pageNumber);
to receive a page orientation with a specific page number, or
Set<PageOrientation> getPageOrientations();
to receive all page orientations set on the document.
Use
void removePageOrientation(int pageNumber);
to remove a page orientation with a specific page number from the document.
The interface org.eclipse.stardust.engine.extensions.dms.data.annotations.printdocument.PageSequenceAware provides methods for adding, getting and moving page sequences on a document.
To get a list with the sequence of pages of a document, use the following method:
List<Integer> getPageSequence();
You can move a single page in the page sequence by using method:
void movePage(int sourcePosition, int targetPosition);
Here, parameter sourcePosition determines the position of the page to move
and targetPosition the position where it should be placed
in the sequence.
To move several pages, use:
void movePages(int pageCount, int sourcePosition, int targetPosition);
Parameter pageCount determines the number of pages to move in the
sequence from sourcePosition to targetPosition.
To set a list with Integer values determining the sequence of pages, use:
void setPageSequence(List<Integer> pageSequence);