org.icepdf.ri.common
Class SwingController

java.lang.Object
  extended by org.icepdf.ri.common.SwingController
All Implemented Interfaces:
java.awt.dnd.DropTargetListener, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.WindowListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.TreeSelectionListener, org.icepdf.core.Controller

public class SwingController
extends java.lang.Object
implements org.icepdf.core.Controller, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, javax.swing.event.TreeSelectionListener, java.awt.event.WindowListener, java.awt.dnd.DropTargetListener, java.awt.event.KeyListener, java.beans.PropertyChangeListener

SwingController is the meat of a PDF viewing application. It is the Controller aspect of the Model-View-Controller (MVC) framework.

SwingController acts as a bridge between a Swing user interface, as built by SwingViewerBuilder; the Document class, which is the root accessor to the PDF content; and the ViewerModel, which maintains the state of the user's perspective of said Document.

Since:
2.0
Author:
Mark Collette
See Also:
SwingViewBuilder, Document, ViewModel

Field Summary
static int CURSOR_CLOSE_HAND
           
static int CURSOR_DEFAULT
           
static int CURSOR_OPEN_HAND
           
static int CURSOR_SELECT
           
static int CURSOR_WAIT
           
static int CURSOR_ZOOM_IN
           
static int CURSOR_ZOOM_OUT
           
 
Constructor Summary
SwingController()
          Create a SwingController object, and its associated ViewerModel
SwingController(java.util.ResourceBundle messageBundle)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
protected  void applyViewerPreferences(org.icepdf.core.pobjects.Catalog catalog, PropertiesManager propertiesManager)
          Method to try to read any ViewerPreferences present in the document, and apply them Otherwise we will try to check the properties file for any overriding to these values
 void closeDocument()
          Close the currently opened PDF Document.
 void dispose()
          Way to dispose of all memory references, and clean up the Document resources

Note: If you create several SwingControllers to manipulate a single Document, and each SwingController would be disposed of at a different time, while the others continue to use that same shared Document, then you should not call Document.dispose() inside of here.
 void doCommonZoomUIUpdates(boolean becauseOfValidFitMode)
           
 void dragEnter(java.awt.dnd.DropTargetDragEvent event)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void dragExit(java.awt.dnd.DropTargetEvent event)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void dragOver(java.awt.dnd.DropTargetDragEvent event)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void drop(java.awt.dnd.DropTargetDropEvent event)
          Handle drop event when a user drags and drops one or more files onto the viewer frame.
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void exit()
          If there is a WindowManagementCallback in place, then this will invoke its quit method
 void exportSVG()
          Utility method for exporting the current page of the Document to an SVG file.
 void exportText()
          Utility method for exporting all of a Document's text to a text file.
 void focusGained(java.awt.event.FocusEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void focusLost(java.awt.event.FocusEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void followOutlineItem(org.icepdf.core.pobjects.OutlineItem o)
          When the user selects an OutlineItem from the Outlines (Bookmarks) JTree, this displays the relevant target portion of the PDF Document
protected  java.lang.String generateNewSaveName(java.lang.String fileName)
          Generates a file name based on the original file name but appends "-new".
 int getCurrentPageNumber()
          When viewing a PDF file, one or more pages may be viewed at a single time, but this is the single page which is most predominantly being displayed.
 org.icepdf.core.pobjects.Document getDocument()
          A Document is the root of the object hierarchy, giving access to the contents of a PDF file.
 org.icepdf.core.search.DocumentSearchController getDocumentSearchController()
          Gets controller responsible for the document text searches.
 org.icepdf.core.views.DocumentViewController getDocumentViewController()
          Gets controller responsible for the page multiple page views.
 int getDocumentViewToolMode()
          Gets the current display tool value for the display panel.
 java.util.ResourceBundle getMessageBundle()
          Gets the message bundle used by this class.
 org.icepdf.core.pobjects.PageTree getPageTree()
          Gives access to the currently openned Document's Catalog's PageTree
 float getUserRotation()
          Each Page may have its own rotation, but on top of that, the user may select to have the Page further rotated, by 0, 90, 180, 270 degrees
 float getUserZoom()
          The Page being shown may be zoomed in or out, to show more detail, or provide an overview.
 javax.swing.JFrame getViewerFrame()
          Not all uses of SwingController would result in there existing a Viewer Frame, so this may well return null.
 ViewModel getViewModel()
          Gives access to this SwingController's ViewerModel
 WindowManagementCallback getWindowManagementCallback()
          The WindowManagementCallback is used for creating new Document windows, and quitting the application
 void goToDeltaPage(int delta)
          Adds delta to the ViewerModel's current page index, and updates the display to show the newly selected page.
 boolean havePermissionToExtractContent()
           
 boolean havePermissionToModifyDocument()
           
 boolean havePermissionToPrint()
           
 boolean isCurrentPage()
          Returns tree if there is a current page associated with this controller.
 boolean isDocumentFitMode(int fitMode)
           
 boolean isDocumentViewMode(int viewMode)
           
 boolean isUtilityPaneVisible()
          If the utility pane is currently visible
 void itemStateChanged(java.awt.event.ItemEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void keyPressed(java.awt.event.KeyEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void keyReleased(java.awt.event.KeyEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void keyTyped(java.awt.event.KeyEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void openDocument(byte[] data, int offset, int length, java.lang.String description, java.lang.String pathOrURL)
          Opens a Document via the specified byte array.
 void openDocument(java.io.InputStream inputStream, java.lang.String description, java.lang.String pathOrURL)
          Opens a Document via the specified InputStream.
 void openDocument(java.lang.String pathname)
          Open a file specified by the given path name.
 void openDocument(java.net.URL location)
          Open a URL specifed by the location variable.
 void openFile()
          Utility method for opening a file.
 void openFileInSomeViewer(java.lang.String filename)
           
 void openURL()
          Utility method for opening a URL.
 void print(boolean withDialog)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Listen for property change events from the page view.
 void reflectUndoCommands()
          Method to determine if the Undo and Redo menu items can be enabled This will query the UndoCaretaker for the status of the queue first
 void rotateLeft()
          Rotates the page visualization by 90 degrees in a counter-clockwise direction.
 void rotateRight()
          Rotates the page visualization by 90 degrees in a clockwise direction.
protected  boolean safelySelectUtilityPanel(java.awt.Component comp)
          Method to select the currently visible tab in the utility pane Because tabs can be hidden via the properties file, we'll want to check first whether the desired panel even exists
 void saveFile()
          Utility method for saving a copy of the currently opened PDF to a file.
 void setAboutMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setAnnotationPanel(AnnotationPanel lp)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setBringAllToFrontMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setCloseMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setCompleteToolBar(javax.swing.JToolBar toolbar)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setCopyMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setCurrentPageNumberTextField(javax.swing.JTextField textField)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setDeleteMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setDisplayTool(int argToolName)
          Sets the display tool used when the document is viewed in interactive mode.
 void setDocumentToolMode(int toolType)
           
 void setDselectAllMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setExitMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setExportSVGMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setExportTextMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFirstPageButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFirstPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitActualSizeButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitActualSizeMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitHeightButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitWidthButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFitWidthMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setFontEngineButton(javax.swing.JToggleButton btn)
          Called by SwingViewBuilder, so that SwingController can setup event handling
 void setGoToPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setInformationMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setIsEmbeddedComponent(boolean embeddableComponent)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setLastPageButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setLastPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setLinkAnnotationToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setMinimiseAllMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setNextPageButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setNextPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setNumberOfPagesLabel(javax.swing.JLabel lbl)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setOpenFileButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setOpenFileMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setOpenURLMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setOutlineComponents(javax.swing.JTree tree, javax.swing.JScrollPane scroll)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPageFitMode(int fitMode, boolean refresh)
          Set the ViewerModel's fit setting to fit the whole page, and update the display
 void setPageViewFacingPageConButton(javax.swing.JToggleButton btn)
           
 void setPageViewFacingPageNonConButton(javax.swing.JToggleButton btn)
           
 void setPageViewMode(int viewMode, boolean refresh)
           
 void setPageViewSinglePageConButton(javax.swing.JToggleButton btn)
           
 void setPageViewSinglePageNonConButton(javax.swing.JToggleButton btn)
           
 void setPanToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPermissionsMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPreviousPageButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPreviousPageMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPrintButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPrintMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPrintSetupMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setPropertiesManager(PropertiesManager propertiesManager)
          Called by SwingViewerBuilder, so that SwingController has access to all properties
 void setReduMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setRotateLeftButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setRotateLeftMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setRotateRightButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setRotateRightMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSaveAsFileButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSaveAsFileMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSearchButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSearchMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSearchPanel(SearchPanel sp)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSelectAllMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setSelectToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setShowHideToolBarMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setShowHideUtilityPaneButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setShowHideUtilityPaneMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setStatusLabel(javax.swing.JLabel lbl)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setTextSelectToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setToolBarVisible(boolean show)
          Sets the visibility of the toolbar
 void setUndoMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setUtilityAndDocumentSplitPane(javax.swing.JSplitPane splitPane)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setUtilityPaneVisible(boolean visible)
          Makes the component visible or invisible.
 void setUtilityTabbedPane(javax.swing.JTabbedPane util)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setViewerFrame(javax.swing.JFrame v)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setWindowListMenuItems(java.util.List menuItems)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setWindowManagementCallback(WindowManagementCallback wm)
          The WindowManagementCallback is used for creating new Document windows, and quitting the application
 void setZoom(float zoom)
          Zoom to a new zoom level, without centering on any new specific point
 void setZoomComboBox(javax.swing.JComboBox zcb, float[] zl)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomInButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomInMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomInToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomOutButton(javax.swing.JButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomOutMenuItem(javax.swing.JMenuItem mi)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void setZoomOutToolButton(javax.swing.JToggleButton btn)
          Called by SwingViewerBuilder, so that SwingController can setup event handling
 void showAboutDialog()
          Show the About dialog.
 void showAnnotationPanel(org.icepdf.core.views.swing.AnnotationComponentImpl selectedAnnotation)
          Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses it
 void showDocumentInformationDialog()
          Show information about the PDF file's Document, such as the title, subject, author, keywords, creator, producer, creation date, and last modification date
 void showDocumentPermissionsDialog()
          Show the permissions set in the PDF file's Document, as relates to encryption, altering, or extracting information from, the Document
 void showPage(int nPage)
          Sets the ViewerModel's current page index, and updates the display to show the newly selected page
 void showPageFromTextField()
          Takes the page number that the user has typed into the text field, converts it into a page index, and then displays that page
 void showPageSelectionDialog()
          Show a dialog, listing every page in the PDF Document, for the user to select which page to show.
 void showPrintSetupDialog()
          Show a print setup dialog, to alter the ViewerModel's PageFormat
 void showSearchPanel()
          Make the Search pane visible, and if necessary, the utility pane that encloses it
 void toggleToolBarVisibility()
          Flips the visibility of the toolbar to the opposite of what it was
 void toggleUtilityPaneVisibility()
          Flips the visibility of the utility pane to the opposite of what it was
 void updateDocumentView()
           
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowActivated(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowClosed(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowClosing(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowDeactivated(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowDeiconified(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowIconified(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void windowOpened(java.awt.event.WindowEvent e)
          SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation
 void zoomIn()
          Increases the current page visualization zoom factor by 20%.
 void zoomOut()
          Decreases the current page visualization zoom factor by 20%.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURSOR_OPEN_HAND

public static final int CURSOR_OPEN_HAND
See Also:
Constant Field Values

CURSOR_CLOSE_HAND

public static final int CURSOR_CLOSE_HAND
See Also:
Constant Field Values

CURSOR_ZOOM_IN

public static final int CURSOR_ZOOM_IN
See Also:
Constant Field Values

CURSOR_ZOOM_OUT

public static final int CURSOR_ZOOM_OUT
See Also:
Constant Field Values

CURSOR_WAIT

public static final int CURSOR_WAIT
See Also:
Constant Field Values

CURSOR_SELECT

public static final int CURSOR_SELECT
See Also:
Constant Field Values

CURSOR_DEFAULT

public static final int CURSOR_DEFAULT
See Also:
Constant Field Values
Constructor Detail

SwingController

public SwingController()
Create a SwingController object, and its associated ViewerModel

See Also:
ViewModel

SwingController

public SwingController(java.util.ResourceBundle messageBundle)
Method Detail

getDocumentViewController

public org.icepdf.core.views.DocumentViewController getDocumentViewController()
Gets controller responsible for the page multiple page views.

Specified by:
getDocumentViewController in interface org.icepdf.core.Controller
Returns:
page view controller.

getDocumentSearchController

public org.icepdf.core.search.DocumentSearchController getDocumentSearchController()
Gets controller responsible for the document text searches.

Specified by:
getDocumentSearchController in interface org.icepdf.core.Controller
Returns:
page view controller.

getMessageBundle

public java.util.ResourceBundle getMessageBundle()
Gets the message bundle used by this class. Message bundle resources are loaded via the JVM default locale.

Returns:
message bundle used by this class.

setWindowManagementCallback

public void setWindowManagementCallback(WindowManagementCallback wm)
The WindowManagementCallback is used for creating new Document windows, and quitting the application

Parameters:
wm - The new WindowManagementCallback
See Also:
getWindowManagementCallback()

getWindowManagementCallback

public WindowManagementCallback getWindowManagementCallback()
The WindowManagementCallback is used for creating new Document windows, and quitting the application

Returns:
The current WindowManagementCallback
See Also:
setWindowManagementCallback(org.icepdf.ri.common.WindowManagementCallback)

setPropertiesManager

public void setPropertiesManager(PropertiesManager propertiesManager)
Called by SwingViewerBuilder, so that SwingController has access to all properties


setOpenFileMenuItem

public void setOpenFileMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setOpenURLMenuItem

public void setOpenURLMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setCloseMenuItem

public void setCloseMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSaveAsFileMenuItem

public void setSaveAsFileMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setExportTextMenuItem

public void setExportTextMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setExportSVGMenuItem

public void setExportSVGMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPermissionsMenuItem

public void setPermissionsMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setInformationMenuItem

public void setInformationMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPrintSetupMenuItem

public void setPrintSetupMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPrintMenuItem

public void setPrintMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setExitMenuItem

public void setExitMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setUndoMenuItem

public void setUndoMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setReduMenuItem

public void setReduMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setCopyMenuItem

public void setCopyMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setDeleteMenuItem

public void setDeleteMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSelectAllMenuItem

public void setSelectAllMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setDselectAllMenuItem

public void setDselectAllMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFitActualSizeMenuItem

public void setFitActualSizeMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFitPageMenuItem

public void setFitPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFitWidthMenuItem

public void setFitWidthMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomInMenuItem

public void setZoomInMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomOutMenuItem

public void setZoomOutMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setRotateLeftMenuItem

public void setRotateLeftMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setRotateRightMenuItem

public void setRotateRightMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setShowHideToolBarMenuItem

public void setShowHideToolBarMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setShowHideUtilityPaneMenuItem

public void setShowHideUtilityPaneMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFirstPageMenuItem

public void setFirstPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPreviousPageMenuItem

public void setPreviousPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setNextPageMenuItem

public void setNextPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setLastPageMenuItem

public void setLastPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSearchMenuItem

public void setSearchMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setGoToPageMenuItem

public void setGoToPageMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setMinimiseAllMenuItem

public void setMinimiseAllMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setBringAllToFrontMenuItem

public void setBringAllToFrontMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setWindowListMenuItems

public void setWindowListMenuItems(java.util.List menuItems)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setAboutMenuItem

public void setAboutMenuItem(javax.swing.JMenuItem mi)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setOpenFileButton

public void setOpenFileButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSaveAsFileButton

public void setSaveAsFileButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPrintButton

public void setPrintButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSearchButton

public void setSearchButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setShowHideUtilityPaneButton

public void setShowHideUtilityPaneButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFirstPageButton

public void setFirstPageButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPreviousPageButton

public void setPreviousPageButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setNextPageButton

public void setNextPageButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setLastPageButton

public void setLastPageButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setCurrentPageNumberTextField

public void setCurrentPageNumberTextField(javax.swing.JTextField textField)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setNumberOfPagesLabel

public void setNumberOfPagesLabel(javax.swing.JLabel lbl)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomOutButton

public void setZoomOutButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomComboBox

public void setZoomComboBox(javax.swing.JComboBox zcb,
                            float[] zl)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomInButton

public void setZoomInButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFitActualSizeButton

public void setFitActualSizeButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFitHeightButton

public void setFitHeightButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setFontEngineButton

public void setFontEngineButton(javax.swing.JToggleButton btn)
Called by SwingViewBuilder, so that SwingController can setup event handling


setFitWidthButton

public void setFitWidthButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setRotateLeftButton

public void setRotateLeftButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setRotateRightButton

public void setRotateRightButton(javax.swing.JButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setPanToolButton

public void setPanToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomInToolButton

public void setZoomInToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setTextSelectToolButton

public void setTextSelectToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSelectToolButton

public void setSelectToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setLinkAnnotationToolButton

public void setLinkAnnotationToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setZoomOutToolButton

public void setZoomOutToolButton(javax.swing.JToggleButton btn)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setCompleteToolBar

public void setCompleteToolBar(javax.swing.JToolBar toolbar)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setOutlineComponents

public void setOutlineComponents(javax.swing.JTree tree,
                                 javax.swing.JScrollPane scroll)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setSearchPanel

public void setSearchPanel(SearchPanel sp)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setAnnotationPanel

public void setAnnotationPanel(AnnotationPanel lp)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setUtilityTabbedPane

public void setUtilityTabbedPane(javax.swing.JTabbedPane util)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setIsEmbeddedComponent

public void setIsEmbeddedComponent(boolean embeddableComponent)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setUtilityAndDocumentSplitPane

public void setUtilityAndDocumentSplitPane(javax.swing.JSplitPane splitPane)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setStatusLabel

public void setStatusLabel(javax.swing.JLabel lbl)
Called by SwingViewerBuilder, so that SwingController can setup event handling


setViewerFrame

public void setViewerFrame(javax.swing.JFrame v)
Called by SwingViewerBuilder, so that SwingController can setup event handling


getViewerFrame

public javax.swing.JFrame getViewerFrame()
Not all uses of SwingController would result in there existing a Viewer Frame, so this may well return null.


havePermissionToPrint

public boolean havePermissionToPrint()

havePermissionToExtractContent

public boolean havePermissionToExtractContent()

havePermissionToModifyDocument

public boolean havePermissionToModifyDocument()

reflectUndoCommands

public void reflectUndoCommands()
Method to determine if the Undo and Redo menu items can be enabled This will query the UndoCaretaker for the status of the queue first


getDocumentViewToolMode

public int getDocumentViewToolMode()
Gets the current display tool value for the display panel.

Returns:
constant representing the state of the display tool for the display panel.
See Also:
setDisplayTool(int)

setDisplayTool

public void setDisplayTool(int argToolName)
Sets the display tool used when the document is viewed in interactive mode. A display changes the icon of the mouse when it is over the panel that displays a document page. There are currently four possible tool modes:

See Also:
getDocumentViewToolMode()

openFile

public void openFile()
Utility method for opening a file. Shows a dialog for the user to select which file to open.


openFileInSomeViewer

public void openFileInSomeViewer(java.lang.String filename)

openDocument

public void openDocument(java.lang.String pathname)
Open a file specified by the given path name.

Parameters:
pathname - String representing a valid file path

openURL

public void openURL()
Utility method for opening a URL. Shows a dialog for the user to type what URL to open.


openDocument

public void openDocument(java.net.URL location)
Open a URL specifed by the location variable.

Parameters:
location - location of a valid PDF document

openDocument

public void openDocument(java.io.InputStream inputStream,
                         java.lang.String description,
                         java.lang.String pathOrURL)
Opens a Document via the specified InputStream. This method is a convenience method provided for backwards compatibility.

Note: This method is less efficient than #openDocument(Stringpathname) or #openDocument(URLlocation) as it may have to do intermediary data copying, using more memory.

Parameters:
inputStream - InputStream containing a valid PDF document.
description - When in the GUI for describing this document.
pathOrURL - Either a file path, or file name, or URL, describing the origin of the PDF file. This is typically null. If non-null, it is used to populate the default file name in the File..Save a Copy dialog summoned in saveFile()

openDocument

public void openDocument(byte[] data,
                         int offset,
                         int length,
                         java.lang.String description,
                         java.lang.String pathOrURL)
Opens a Document via the specified byte array.

Parameters:
data - Byte array containing a valid PDF document.
offset - the index into the byte array where the PDF data begins
length - the number of bytes in the byte array belonging to the PDF data
description - When in the GUI for describing this document.
pathOrURL - Either a file path, or file name, or URL, describing the origin of the PDF file. This is typically null. If non-null, it is used to populate the default file name in the File..Save a Copy dialog summoned in saveFile()

closeDocument

public void closeDocument()
Close the currently opened PDF Document. The toolbar component's states are also changed to their default values and made inactive.

Note: If you create several SwingControllers to manipulate a single Document, and each SwingController would be disposed of at a different time, while the others continue to use that same shared Document, then you should not call Document.dispose() inside of here, or alternatively implement reference counting, so that only the last SwingController would call Document.dispose()

See Also:
Document

dispose

public void dispose()
Way to dispose of all memory references, and clean up the Document resources

Note: If you create several SwingControllers to manipulate a single Document, and each SwingController would be disposed of at a different time, while the others continue to use that same shared Document, then you should not call Document.dispose() inside of here. Alternatively, implement reference counting, so that only the last SwingController would call Document.dispose()


saveFile

public void saveFile()
Utility method for saving a copy of the currently opened PDF to a file. This will check all valid permissions and show a file save dialog for the user to select where to save the file to, and what name to give it.


generateNewSaveName

protected java.lang.String generateNewSaveName(java.lang.String fileName)
Generates a file name based on the original file name but appends "-new". If new file extsion exists a ".pdf" is automatically added.

Parameters:
fileName - file name that new file name is dirived from.
Returns:
original file name with the "-new" appended to it.

exportText

public void exportText()
Utility method for exporting all of a Document's text to a text file. Shows a file save dialog for the user to select where to save the exported text file to, and what name to give that file.


exportSVG

public void exportSVG()
Utility method for exporting the current page of the Document to an SVG file. Shows a file save dialog for the user to select where to save the exported SVG file to, and what name to give that file.


exit

public void exit()
If there is a WindowManagementCallback in place, then this will invoke its quit method

See Also:
setWindowManagementCallback(org.icepdf.ri.common.WindowManagementCallback), getWindowManagementCallback()

toggleToolBarVisibility

public void toggleToolBarVisibility()
Flips the visibility of the toolbar to the opposite of what it was

See Also:
setToolBarVisible(boolean)

setToolBarVisible

public void setToolBarVisible(boolean show)
Sets the visibility of the toolbar

Parameters:
show - The new visibility of the toolbar

showAboutDialog

public void showAboutDialog()
Show the About dialog. Subclasses may override this method to show an alternate About dialog


showDocumentPermissionsDialog

public void showDocumentPermissionsDialog()
Show the permissions set in the PDF file's Document, as relates to encryption, altering, or extracting information from, the Document


showDocumentInformationDialog

public void showDocumentInformationDialog()
Show information about the PDF file's Document, such as the title, subject, author, keywords, creator, producer, creation date, and last modification date


showPrintSetupDialog

public void showPrintSetupDialog()
Show a print setup dialog, to alter the ViewerModel's PageFormat

See Also:
ViewModel

print

public void print(boolean withDialog)
Parameters:
withDialog - If should show a print dialog before starting to print

showPageFromTextField

public void showPageFromTextField()
Takes the page number that the user has typed into the text field, converts it into a page index, and then displays that page


followOutlineItem

public void followOutlineItem(org.icepdf.core.pobjects.OutlineItem o)
When the user selects an OutlineItem from the Outlines (Bookmarks) JTree, this displays the relevant target portion of the PDF Document


zoomIn

public void zoomIn()
Increases the current page visualization zoom factor by 20%.


zoomOut

public void zoomOut()
Decreases the current page visualization zoom factor by 20%.


setZoom

public void setZoom(float zoom)
Zoom to a new zoom level, without centering on any new specific point

Parameters:
zoom -

doCommonZoomUIUpdates

public void doCommonZoomUIUpdates(boolean becauseOfValidFitMode)

isCurrentPage

public boolean isCurrentPage()
Returns tree if there is a current page associated with this controller.

Returns:
true if their is a currentpage, otherwise false.

getPageTree

public org.icepdf.core.pobjects.PageTree getPageTree()
Gives access to the currently openned Document's Catalog's PageTree

Returns:
PageTree

showPage

public void showPage(int nPage)
Sets the ViewerModel's current page index, and updates the display to show the newly selected page

Parameters:
nPage - Index of the Page to show
See Also:
DocumentViewControllerImpl.setCurrentPageIndex(int)

goToDeltaPage

public void goToDeltaPage(int delta)
Adds delta to the ViewerModel's current page index, and updates the display to show the newly selected page. A positive delta indicates moving to later pages, and a negative delta would move to a previous page

Parameters:
delta - Signed integer that's added to the current page index
See Also:
DocumentViewControllerImpl.getCurrentPageIndex(), DocumentViewControllerImpl.setCurrentPageIndex(int)

updateDocumentView

public void updateDocumentView()

rotateLeft

public void rotateLeft()
Rotates the page visualization by 90 degrees in a counter-clockwise direction.


rotateRight

public void rotateRight()
Rotates the page visualization by 90 degrees in a clockwise direction.


isDocumentFitMode

public boolean isDocumentFitMode(int fitMode)

isDocumentViewMode

public boolean isDocumentViewMode(int viewMode)

setPageViewSinglePageConButton

public void setPageViewSinglePageConButton(javax.swing.JToggleButton btn)

setPageViewFacingPageConButton

public void setPageViewFacingPageConButton(javax.swing.JToggleButton btn)

setPageViewSinglePageNonConButton

public void setPageViewSinglePageNonConButton(javax.swing.JToggleButton btn)

setPageViewFacingPageNonConButton

public void setPageViewFacingPageNonConButton(javax.swing.JToggleButton btn)

setPageFitMode

public void setPageFitMode(int fitMode,
                           boolean refresh)
Set the ViewerModel's fit setting to fit the whole page, and update the display


setPageViewMode

public void setPageViewMode(int viewMode,
                            boolean refresh)

setDocumentToolMode

public void setDocumentToolMode(int toolType)
Specified by:
setDocumentToolMode in interface org.icepdf.core.Controller

isUtilityPaneVisible

public boolean isUtilityPaneVisible()
If the utility pane is currently visible

Returns:
true if pane is visilbe false otherwise.

setUtilityPaneVisible

public void setUtilityPaneVisible(boolean visible)
Makes the component visible or invisible.

Parameters:
visible - true to make the component visible; false to make it invisible.

toggleUtilityPaneVisibility

public void toggleUtilityPaneVisibility()
Flips the visibility of the utility pane to the opposite of what it was

See Also:
setUtilityPaneVisible(boolean)

safelySelectUtilityPanel

protected boolean safelySelectUtilityPanel(java.awt.Component comp)
Method to select the currently visible tab in the utility pane Because tabs can be hidden via the properties file, we'll want to check first whether the desired panel even exists

Parameters:
comp - to select
Returns:
true on successful selection

showSearchPanel

public void showSearchPanel()
Make the Search pane visible, and if necessary, the utility pane that encloses it

See Also:
setUtilityPaneVisible(boolean)

showAnnotationPanel

public void showAnnotationPanel(org.icepdf.core.views.swing.AnnotationComponentImpl selectedAnnotation)
Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses it

Parameters:
selectedAnnotation - the annotation to show in the panel
See Also:
setUtilityPaneVisible(boolean)

showPageSelectionDialog

public void showPageSelectionDialog()
Show a dialog, listing every page in the PDF Document, for the user to select which page to show.

See Also:
showPage(int)

applyViewerPreferences

protected void applyViewerPreferences(org.icepdf.core.pobjects.Catalog catalog,
                                      PropertiesManager propertiesManager)
Method to try to read any ViewerPreferences present in the document, and apply them Otherwise we will try to check the properties file for any overriding to these values

Parameters:
catalog - to lookup view preferences from
propertiesManager - to check properties in

getViewModel

public ViewModel getViewModel()
Gives access to this SwingController's ViewerModel

Returns:
The SwingController's ViewerModel
See Also:
ViewModel

getDocument

public org.icepdf.core.pobjects.Document getDocument()
A Document is the root of the object hierarchy, giving access to the contents of a PDF file. Significantly: getDocument().getCatalog().getPageTree().getPage(int pageIndex) gives access to each Page, so that it might be drawn.

Specified by:
getDocument in interface org.icepdf.core.Controller
Returns:
Document root of the PDF file

getCurrentPageNumber

public int getCurrentPageNumber()
When viewing a PDF file, one or more pages may be viewed at a single time, but this is the single page which is most predominantly being displayed.

Specified by:
getCurrentPageNumber in interface org.icepdf.core.Controller
Returns:
The zero-based index of the current Page being displayed

getUserRotation

public float getUserRotation()
Each Page may have its own rotation, but on top of that, the user may select to have the Page further rotated, by 0, 90, 180, 270 degrees

Specified by:
getUserRotation in interface org.icepdf.core.Controller
Returns:
The user's requested rotation

getUserZoom

public float getUserZoom()
The Page being shown may be zoomed in or out, to show more detail, or provide an overview.

Specified by:
getUserZoom in interface org.icepdf.core.Controller
Returns:
The user's requested zoom

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
actionPerformed in interface java.awt.event.ActionListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
focusLost in interface java.awt.event.FocusListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
itemStateChanged in interface java.awt.event.ItemListener

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
windowOpened in interface java.awt.event.WindowListener

dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent event)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent event)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

drop

public void drop(java.awt.dnd.DropTargetDropEvent event)
Handle drop event when a user drags and drops one or more files onto the viewer frame.

Specified by:
drop in interface java.awt.dnd.DropTargetListener
Parameters:
event - information about the drag and drop data.

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent event)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
SwingController takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation

Specified by:
keyTyped in interface java.awt.event.KeyListener

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Listen for property change events from the page view. This method acts like a mediator passing on the new states to the interested parties.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
evt - property change event