Esempio n. 1
0
 public void gotoBookmark(Bookmark bookmark) {
   final String modelId = bookmark.ModelId;
   if (modelId == null) {
     addInvisibleBookmark();
     BookTextView.gotoPosition(bookmark);
     setView(BookTextView);
   } else {
     FootnoteView.setModel(Model.getFootnoteModel(modelId));
     FootnoteView.gotoPosition(bookmark);
     setView(FootnoteView);
   }
   getViewWidget().repaint();
 }
Esempio n. 2
0
 public void tryOpenFootnote(String id) {
   if (Model != null) {
     myJumpEndPosition = null;
     myJumpTimeStamp = null;
     BookModel.Label label = Model.getLabel(id);
     if (label != null) {
       if (label.ModelId == null) {
         if (getTextView() == BookTextView) {
           addInvisibleBookmark();
           myJumpEndPosition = new ZLTextFixedPosition(label.ParagraphIndex, 0, 0);
           myJumpTimeStamp = new Date();
         }
         BookTextView.gotoPosition(label.ParagraphIndex, 0, 0);
         setView(BookTextView);
       } else {
         FootnoteView.setModel(Model.getFootnoteModel(label.ModelId));
         setView(FootnoteView);
         FootnoteView.gotoPosition(label.ParagraphIndex, 0, 0);
       }
       getViewWidget().repaint();
     }
   }
 }