com.qoppa.pdfNotes
Interface IPDFListener


public interface IPDFListener

This interface is used to notify a host application of PDF document loading and saving.

Author:
Qoppa Software

Method Summary
 void afterDocClosed(PDFNotesBean notesBean)
          This method is called by PDFNotesBean after the current document was closed (after the close method in the PDFNotesBean is called).
 void afterDocOpened(PDFNotesBean notesBean, String docName, File pdfFile)
          This method is called by PDFNotesBean when a new document is loaded into the viewer.
 void afterDocSaved(PDFNotesBean notesBean, String docName, File pdfFile)
          This method is called by PDFNotesBean after the current document has been saved.
 void annotAdded(PDFNotesBean notesBean, Annotation newAnnot, IPDFPage pdfPage, int pageIndex)
          This method is called by PDFNotesBean after a new annotation was added.
 void annotDeleted(PDFNotesBean notesBean, Annotation annot, int pageIndex)
          This method is called by PDFNotesBean after an annotation was deleted.
 void annotModified(PDFNotesBean notesBean, Annotation annot, int pageIndex)
          This method is called by PDFNotesBean after an annotation was modified.
 

Method Detail

afterDocOpened

public void afterDocOpened(PDFNotesBean notesBean,
                           String docName,
                           File pdfFile)
This method is called by PDFNotesBean when a new document is loaded into the viewer. This interface is useful when the host application displays additional information about the current document, such as the name of the file in the title bar or a status bar.

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.
docName - The name of the PDF document. The meaning of this name differs according to how the document was opened.
  • If the document was opened from a file, the document name is the name of the file.
  • If the document was opened from a URL, the document name is the URL string.
  • If the document was opened from an InputStream, the document name is set to ""
pdfFile - If the document was opened from a file, this is a reference to the File object. This parameter is null if the document was opened from a URL or from an InputStream

afterDocSaved

public void afterDocSaved(PDFNotesBean notesBean,
                          String docName,
                          File pdfFile)
This method is called by PDFNotesBean after the current document has been saved.

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.
docName - The name of the PDF document. The meaning of this name differs according to how the document was opened.
  • If the document was opened from a file, the document name is the name of the file.
  • If the document was opened from a URL, the document name is the URL string.
  • If the document was opened from an InputStream, the document name is set to ""
pdfFile - The file that the document was saved to.

afterDocClosed

public void afterDocClosed(PDFNotesBean notesBean)
This method is called by PDFNotesBean after the current document was closed (after the close method in the PDFNotesBean is called).

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.

annotAdded

public void annotAdded(PDFNotesBean notesBean,
                       Annotation newAnnot,
                       IPDFPage pdfPage,
                       int pageIndex)
This method is called by PDFNotesBean after a new annotation was added.

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.
newAnnot - the new annotation
pdfPage - the page where the new annotation was added
pageIndex - the index of the page where the new annotation was added starting at 0

annotDeleted

public void annotDeleted(PDFNotesBean notesBean,
                         Annotation annot,
                         int pageIndex)
This method is called by PDFNotesBean after an annotation was deleted.

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.
annot - the annotation that was deleted

annotModified

public void annotModified(PDFNotesBean notesBean,
                          Annotation annot,
                          int pageIndex)
This method is called by PDFNotesBean after an annotation was modified. An annotation is considered modified if it was moved or resized on the page or if users opened the annotation properties dialog and hit save to close the dialog. Note that it is possible that no property was actually edited.

Parameters:
notesBean - A reference to the PDFNotesBean object that holds the document.
annot - the annotation that was modified