Class PDFViewerPanel

    • Field Detail

      • m_Properties

        protected static Properties m_Properties
        the properties.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar, if used.
      • m_MenuItemFileOpen

        protected JMenuItem m_MenuItemFileOpen
        the "open" menu item.
      • m_MenuItemFileOpenRecent

        protected JMenu m_MenuItemFileOpenRecent
        the "load recent" submenu.
      • m_MenuItemFileClose

        protected JMenuItem m_MenuItemFileClose
        the "close" menu item.
      • m_MenuItemFilePrint

        protected JMenuItem m_MenuItemFilePrint
        the "print" menu item.
      • m_MenuItemFileExit

        protected JMenuItem m_MenuItemFileExit
        the "exit" menu item.
      • m_MenuItemToolsExtractPages

        protected AbstractPDFViewerAction m_MenuItemToolsExtractPages
        the "extract pages" menu item.
      • m_MenuItemToolsExtractText

        protected AbstractPDFViewerAction m_MenuItemToolsExtractText
        the "extract text" menu item.
      • m_MenuItemToolsExtractImages

        protected AbstractPDFViewerAction m_MenuItemToolsExtractImages
        the "extract images" menu item.
      • m_FileChooser

        protected transient BaseFileChooser m_FileChooser
        the filedialog for loading CSV files.
    • Constructor Detail

      • PDFViewerPanel

        public PDFViewerPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • getFileChooser

        protected BaseFileChooser getFileChooser()
        Returns the file chooser and creates it if necessary.
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface MenuBarProvider
        Returns:
        the menu bar
      • getCurrentPanel

        public PDFPanel getCurrentPanel()
        Returns the image panel in the currently selected tab.
        Returns:
        the image panel, null if none available
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • open

        protected void open()
        Opens one or more CSV files.
      • load

        public void load​(File file)
        Loads the specified PDF file.
        Parameters:
        file - the file to load
      • load

        public void load​(byte[] data)
        Loads the specified PDF document.
        Parameters:
        data - the data of the document to load
      • load

        public void load​(byte[] data,
                         String desc)
        Loads the specified PDF document.
        Parameters:
        data - the data of the document to load
        desc - the description for the document, can be null
      • closeFile

        protected void closeFile()
        Closes the current active tab.
      • printFile

        protected void printFile()
        Prints the current active tab.
      • close

        protected void close()
        Closes the dialog or frame.
      • zoom

        protected void zoom​(int zoom)
        Zooms in/out.
        Parameters:
        zoom - the zoom (in percent)
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the requested classes
        Returns:
        true if an object is available for sending
      • newDescriptionIfNecessary

        public static String newDescriptionIfNecessary​(String desc)
        Creates a new description if necessary (new+INT).
        Parameters:
        desc - the description, auto-generates one if null
        Returns:
        the potentially updated description