Class PDFDebugger

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Callable<Integer>, EventListener, Accessible, HyperlinkListener, RootPaneContainer, WindowConstants

public class PDFDebugger extends JFrame implements Callable<Integer>, HyperlinkListener
PDF Debugger.
Author:
wurtz, Ben Litchfield, Khyrul Bashar
See Also:
  • Field Details

    • configuration

      public static final Properties configuration
  • Constructor Details

    • PDFDebugger

      public PDFDebugger()
      Constructor.
    • PDFDebugger

      public PDFDebugger(String initialViewMode)
      Constructor.
      Parameters:
      initialViewMode - initial view mode for the tree view on the left hand side.
  • Method Details

    • main

      public static void main(String[] args)
      Entry point.
      Parameters:
      args - the command line arguments
    • call

      public Integer call()
      Specified by:
      call in interface Callable<Integer>
    • getTreeViewMode

      public String getTreeViewMode()
      Provide the current view mode of the tree view. see TreeViewMenu for valid values
    • setTreeViewMode

      public void setTreeViewMode(String viewMode)
      Set the current view mode of the tree view. see TreeViewMenu for valid values
      Parameters:
      viewMode - the view mode to be set
    • hasDocument

      public boolean hasDocument()
    • initGlobalEventHandlers

      protected void initGlobalEventHandlers()
      Initialize application global event handlers. Protected to allow subclasses to override this method if they don't want the global event handler overridden.
    • getFindMenu

      public JMenu getFindMenu()
      Returns the File menu.
      Returns:
      the File menu
    • getFindMenuItem

      public JMenuItem getFindMenuItem()
      Returns the Edit > Find > Find menu item.
      Returns:
      the Find menu
    • getFindNextMenuItem

      public JMenuItem getFindNextMenuItem()
      Returns the Edit > Find > Find Next menu item.
      Returns:
      the FindNext menu
    • getFindPreviousMenuItem

      public JMenuItem getFindPreviousMenuItem()
      Returns the Edit > Find > Find Previous menu item.
      Returns:
      the FindPrevious menu
    • performApplicationExit

      protected void performApplicationExit()
      Exit the application after the window is closed. This is protected to let subclasses override the behavior.
    • initTree

      public void initTree()
    • getPageLabel

      public static String getPageLabel(org.apache.pdfbox.pdmodel.PDDocument document, int pageIndex)
      Convenience method to get the page label if available.
      Parameters:
      document - the current document
      pageIndex - 0-based page number.
      Returns:
      a page label or null if not available.
    • hyperlinkUpdate

      public void hyperlinkUpdate(HyperlinkEvent he)
      Specified by:
      hyperlinkUpdate in interface HyperlinkListener