if (bookmarkAdding) {
/*
* Adding a new bookmark
*/
final Bookmark bookmark =
new Bookmark(book.getCurrentChapter(), bookmarkPosition, s);
final int pos = book.getBookmarkManager().addBookmark(bookmark);
/*
* Insert the new bookmark into the list
*/
getBookmarks().insert(pos, bookmark.getTextForList(), null);
} else {
/*
* Eding the selected bookmark
*/
final int pos = getBookmarks().getSelectedIndex();
final Bookmark bookmark =
book.getBookmarkManager().bookmarkAt(pos);
if (bookmark != null) {
/*
* Update the bookmark
*/
bookmark.setText(s);
/*
* Update the list
*/
bookmarks.set(pos, bookmark.getTextForList(), null);
}
}
bookCanvas.saveBookmarks();
proceedToBookmarks();//GEN-LINE:|898-entry|1|899-postAction
// write post-action user code here