Package org.albite.book.model.book

Examples of org.albite.book.model.book.Bookmark


                // write pre-action user code here
                bookmarkAdding = false;

                final Book book = bookCanvas.getCurrentBook();
                final int pos = getBookmarks().getSelectedIndex();
                final Bookmark bookmark =
                        book.getBookmarkManager().bookmarkAt(pos);

                if (bookmark != null) {
                    getBookmarkText().setString(bookmark.getText());
                }

                canEditBookmark();//GEN-LINE:|7-commandAction|24|920-postAction
                // write post-action user code here
            } else if (command == GO_COMMAND) {//GEN-LINE:|7-commandAction|25|916-preAction
View Full Code Here


        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
View Full Code Here

            goToBookmarkTask.setExecutable(new org.netbeans.microedition.util.Executable() {
                public void execute() throws Exception {//GEN-END:|1067-getter|1|1067-execute
                    // write task-execution user code here
                    final Book book = bookCanvas.getCurrentBook();
                    final int pos = getBookmarks().getSelectedIndex();
                    final Bookmark bookmark =
                            book.getBookmarkManager().bookmarkAt(pos);

                    bookCanvas.goToPosition(bookmark);
                }//GEN-BEGIN:|1067-getter|2|1067-postInit
            });//GEN-END:|1067-getter|2|1067-postInit
View Full Code Here

        final List l = getBookmarks();

        final BookmarkManager bm =
                bookCanvas.getCurrentBook().getBookmarkManager();

        Bookmark b = bm.getFirst();

        while (b != null) {
            l.append(b.getTextForList(), null);
            b = b.getNext();
        }
    }
View Full Code Here

TOP

Related Classes of org.albite.book.model.book.Bookmark

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.