Class FWPDFViewer

All Implemented Interfaces:
com.sun.pdfview.PageChangeListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class FWPDFViewer extends JPanel implements KeyListener, com.sun.pdfview.PageChangeListener
A PDF Viewer application that integrates with the Meeting Central project.
See Also:
  • Constructor Details

    • FWPDFViewer

      public FWPDFViewer(boolean useThumbs)
      Create a new PDFViewer based on a user, with or without a thumbnail panel.
      Parameters:
      useThumbs - true if the thumb panel should exist, false if not.
  • Method Details

    • init

      protected void init()
      Initialize this PDFViewer by creating the GUI.
    • gotoPage

      public void gotoPage(int pagenum)
      Changes the displayed page, desyncing if we're not on the same page as a presenter.
      Specified by:
      gotoPage in interface com.sun.pdfview.PageChangeListener
      Parameters:
      pagenum - the page to display
    • forceGotoPage

      public void forceGotoPage(int pagenum)
      Changes the displayed page.
      Parameters:
      pagenum - the page to display
    • setEnabling

      public void setEnabling()
      Enable or disable all of the actions based on the current state.
    • openFile

      public void openFile(File file) throws IOException
      Open a specific pdf file. Creates a DocumentInfo from the file, and opens that.
      Parameters:
      file - the file to open
      Throws:
      IOException
    • openError

      public void openError(String message)
      Display a dialog indicating an error.
    • doOpen

      public void doOpen()
      Ask the user for a PDF file to open from the local file system
    • doOpen

      public void doOpen(String name)
      Open a local file, given a string filename
      Parameters:
      name - the name of the file to open
    • doPageSetup

      public void doPageSetup()
      Posts the Page Setup dialog
    • doPrint

      public void doPrint()
      Print the current document.
    • doZoomTool

      public void doZoomTool()
      Turns on zooming
    • doFitInWindow

      public void doFitInWindow()
      Turns off zooming; makes the page fit in the window
    • doThumbs

      public void doThumbs(boolean show)
      Shows or hides the thumbnails by moving the split pane divider
    • doZoom

      public void doZoom(double factor)
    • doNext

      public void doNext()
      Goes to the next page
    • doPrev

      public void doPrev()
      Goes to the previous page
    • doFirst

      public void doFirst()
      Goes to the first page
    • doLast

      public void doLast()
      Goes to the last page
    • doPageTyped

      public void doPageTyped()
      Goes to the page that was typed in the page number text field
    • keyPressed

      public void keyPressed(KeyEvent evt)
      Handle a key press for navigation
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent evt)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent evt)
      gets key presses and tries to build a page if they're numeric
      Specified by:
      keyTyped in interface KeyListener