net.sf.jzeno.reporting.pdf
Class BookmarkHandler

java.lang.Object
  extended by com.lowagie.text.pdf.PdfPageEventHelper
      extended by net.sf.jzeno.reporting.pdf.BookmarkHandler
All Implemented Interfaces:
com.lowagie.text.pdf.PdfPageEvent

public class BookmarkHandler
extends com.lowagie.text.pdf.PdfPageEventHelper

PdfPageEvent which adds bookmarks onCloseDocument. Bookmarks are added through the static method addBookmark() which are then put in a ThreadLocal ArrayList. Bookmarks are automatically cleared after they are added.


Constructor Summary
BookmarkHandler()
           
 
Method Summary
static void addBookmark(java.lang.String reference, java.lang.String bookmarkTitle, Font font)
           
static void clearBookmarks()
           
 void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer, com.lowagie.text.Document document)
           
 
Methods inherited from class com.lowagie.text.pdf.PdfPageEventHelper
onChapter, onChapterEnd, onEndPage, onGenericTag, onOpenDocument, onParagraph, onParagraphEnd, onSection, onSectionEnd, onStartPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookmarkHandler

public BookmarkHandler()
Method Detail

onCloseDocument

public void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer,
                            com.lowagie.text.Document document)
Specified by:
onCloseDocument in interface com.lowagie.text.pdf.PdfPageEvent
Overrides:
onCloseDocument in class com.lowagie.text.pdf.PdfPageEventHelper

clearBookmarks

public static void clearBookmarks()

addBookmark

public static void addBookmark(java.lang.String reference,
                               java.lang.String bookmarkTitle,
                               Font font)