- java.lang.Object
-
- java.awt.event.ComponentAdapter
-
- org.icepdf.ri.common.SwingController
-
- All Implemented Interfaces:
DropTargetListener,ActionListener,ComponentListener,FocusListener,ItemListener,WindowListener,PropertyChangeListener,EventListener,Controller
public class SwingController extends ComponentAdapter implements Controller, ActionListener, FocusListener, ItemListener, WindowListener, DropTargetListener, PropertyChangeListener
Controller is the meat of a PDF viewing application. It is the Controller aspect of the Model-View-Controller (MVC) framework.
Controller 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceSwingController.ActionMethodprotected classSwingController.BaseAction-
Nested classes/interfaces inherited from interface org.icepdf.ri.common.views.Controller
Controller.SaveMode
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotationPanelannotationPanelstatic intCURSOR_CLOSE_HANDstatic intCURSOR_DEFAULTstatic intCURSOR_OPEN_HANDstatic intCURSOR_SELECTstatic intCURSOR_WAITstatic intCURSOR_ZOOM_INstatic intCURSOR_ZOOM_OUTprotected booleandisposedprotected Documentdocumentprotected DocumentSearchControllerdocumentSearchControllerprotected DocumentViewControllerImpldocumentViewControllerprotected static Loggerloggerprotected static intMAX_SELECT_ALL_PAGE_COUNTprotected static ResourceBundlemessageBundleprotected OutlinesControlleroutlinesControllerprotected ViewerPropertiesManagerpropertiesManagerprotected JSplitPaneutilityAndDocumentSplitPaneprotected JTabbedPaneutilityTabbedPaneprotected ViewModelviewModelprotected WindowManagementCallbackwindowManagementCallback
-
Constructor Summary
Constructors Constructor Description SwingController()Create a Controller object, and its associated ViewerModelSwingController(ResourceBundle currentMessageBundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent event)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationprotected voidaddKeyAction(JComponent component, int keyCode, int modifier, SwingController.BaseAction action)protected voidaddRecentFileEntry(Path path)Adds the recently opened file to the "Recently Opened" file list.protected voidapplyViewerPreferences(Catalog catalog, ViewerPropertiesManager 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 valuesvoidchangeAnnotationsPrivacy(AnnotationFilter filter, boolean priv)Changes privacy flag of the MarkupAnnotations given by the annotations filtervoidchangeAnnotationsVisibility(AnnotationFilter filter, boolean visible, boolean execInvert)voidcloseDocument()Close the currently opened PDF Document.voidcommonNewDocumentHandling(String fileDescription)voidcomponentMoved(ComponentEvent e)voidcomponentResized(ComponentEvent e)voiddispose()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 Controller 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.voiddoCommonZoomUIUpdates(boolean becauseOfValidFitMode)voiddragEnter(DropTargetDragEvent event)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoiddragExit(DropTargetEvent event)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoiddragOver(DropTargetDragEvent event)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoiddrop(DropTargetDropEvent event)Handle drop event when a user drags and drops one or more files onto the viewer frame.voiddropActionChanged(DropTargetDragEvent event)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationprotected voidenableUtilityTabbedPanel(JComponent tabbedPanel)voidexportDocument()Utility method for saving a document using a full document write.voidexportText()Utility method for exporting all of a Document's text to a text file.voidfocusGained(FocusEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidfocusLost(FocusEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidfollowDestinationItem(NameTreeNode node)Interprets the NameTreeNode loading ans displaying any associated Destination values.voidfollowOutlineItem(OutlineItemTreeNode node)Interprets the OutlineItemTreeNode loading ans displaying any associated Destination values.protected StringgenerateNewSaveName(String fileName)Generates a file name based on the original file name but appends "-new".intgetCurrentPageNumber()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.DocumentgetDocument()A Document is the root of the object hierarchy, giving access to the contents of a PDF file.DocumentSearchControllergetDocumentSearchController()Gets controller responsible for the document text searches.DocumentViewControllergetDocumentViewController()Gets controller responsible for the page multiple page views.intgetDocumentViewToolMode()Gets the current display tool value for the display panel.ResourceBundlegetMessageBundle()Gets the message bundle used by this class.JTreegetOutlineTree()PageTreegetPageTree()Gives access to the currently opened Document's Catalog's PageTreePrintHelperFactorygetPrintHelperFactory()ViewerPropertiesManagergetPropertiesManager()Gets an instance of the PropertiesManager so that other builders can use the properties manager.FramegetViewerFrame()Not all uses of Controller would result in there existing a Viewer Frame, so this may well return null.ViewModelgetViewModel()Gives access to this Controller's ViewerModelWindowManagementCallbackgetWindowManagementCallback()The WindowManagementCallback is used for creating new Document windows, and quitting the applicationvoidgoToDeltaPage(int delta)Adds delta to the ViewerModel's current page index, and updates the display to show the newly selected page.protected booleanhasUnburnedRedactions()booleanhavePermissionToExtractContent()Check to see if document has permission to extract content.booleanhavePermissionToModifyDocument()Check to see if document can be modified.booleanhavePermissionToPrint()Check to see if document has permission to be printed.protected voidinitializeOutline()booleanisAnnotationUtilityPaneVisible()booleanisBookmarkUtilityPaneVisible()booleanisComponentUtilityPaneVisible(Component component)booleanisCurrentPage()Returns tree if there is a current page associated with this controller.booleanisDocumentFitMode(int fitMode)booleanisDocumentViewMode(int viewMode)booleanisPdfCollection()Tests to see if the PDF document is a collection and should be treated as such.booleanisUtilityPaneVisible()If the utility pane is currently visibleprotected booleanisUtilityTabSelected(Component comp)voiditemStateChanged(ItemEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidnextSearchResult()voidopenDocument(byte[] data, int offset, int length, String description, String pathOrURL)Opens a Document via the specified byte array.voidopenDocument(InputStream inputStream, String description, String pathOrURL)Opens a Document via the specified InputStream.voidopenDocument(String pathname)Open a file specified by the given path name.voidopenDocument(URL location)Open a URL specified by the location variable.voidopenDocument(Document embeddedDocument, String fileName)Load the specified file in a new Viewer RI window.voidopenFile()Utility method for opening a file.voidopenFile(String initialDirPath)Utility method for opening a file.voidopenFileInSomeViewer(String filename)Opens the specified file in a new window if the window manager is present.voidopenURL()Utility method for opening a URL.protected voidprepareKeyMap(JComponent component)voidpreviousSearchResult()voidprint(boolean withDialog)Print the given documentvoidprintAndExit(boolean showDialog, String printer)Prints the document with the given printer, assuming we're exiting after thatvoidpropertyChange(PropertyChangeEvent evt)Listen for property change events from the page view.protected voidreflectStateInComponents()Utility method to set the state of all the different GUI elements.voidreflectUndoCommands()Method to determine if the Undo and Redo menu items can be enabled This will query the UndoCaretaker for the status of the queue firstprotected voidrefreshRecentFileMenuItem()Builds out the recent file list and assembles the menuItems.voidrotateLeft()Rotates the page visualization by 90 degrees in a counter-clockwise direction.voidrotateRight()Rotates the page visualization by 90 degrees in a clockwise direction.protected booleansafelySelectUtilityPanel(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 existsbooleansaveChangesDialog()If there is a WindowManagementCallback in place, then this will invoke its quit methodvoidsaveFile()Utility method for saving the current document to the same filename.voidsaveFileAs()Utility method for saving a copy of the currently opened PDF to a file.protected voidsaveFileAs(Controller.SaveMode saveMode)protected voidsaveFileChecks(Controller.SaveMode saveMode, String originalFileName, File file)voidsetAboutMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetAdvancedSearchMenuItem(JMenuItem mi)Called by SwingViewerbuilder, so that Controller can setup event handlingvoidsetAnnotationEditingModeToolButton(JToggleButton btn)voidsetAnnotationEditMode(boolean enabled)Sets visibility of the form highlight functionality ot hte opposite of what it was.voidsetAnnotationPanel(AnnotationPanel lp)voidsetAnnotationPermissionComboBox(JComboBox<String> zcb)voidsetAnnotationPreviewMenuItem(JMenuItem mi)voidsetAnnotationSummaryButton(JButton btn)voidsetAttachmentPanel(AttachmentPanel atp)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetBringAllToFrontMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCircleAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCircleAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCloseMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCompleteToolBar(JToolBar toolbar)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCopyContextMenuItem(JMenuItem mi)voidsetCopyMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetCurrentPageNumberTextField(JTextField textField)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetDeleteAllButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetDeleteMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetDeselectAllMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetDisplayTool(int argToolName)Sets the display tool used when the document is viewed in interactive mode.voidsetDocumentToolMode(int toolType)Sets the tool mode used for the controller view.voidsetDocumentViewController(DocumentViewControllerImpl documentViewController)Sets a custom document view controller.protected voidsetEnabled(JComponent comp, boolean ena)voidsetExitMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetExportDocumentFileMenuItem(JMenuItem mi)voidsetExportTextMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFirstPageButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFirstPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitActualSizeButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitActualSizeMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitHeightButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitWidthButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFitWidthMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFontInformationMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFormHighlightButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handling for the form highlight button.voidsetFreeTextAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFreeTextAnnotationToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetFullScreenButton(JButton btn)voidsetFullScreenMenuItem(JMenuItem mi)voidsetFullScreenMode()voidsetGoToPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetHighlightAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetHighlightAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetInformationMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetInkAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetInkAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetInsertOutlineMenuItem(JMenuItem mi)voidsetIsEmbeddedComponent(boolean embeddableComponent)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLastPageButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLastPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLayersPanel(LayersPanel tn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLineAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLineAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLineArrowAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLineArrowAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLinkAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetLinkAnnotationToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetMinimiseAllMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetNextPageButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetNextPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetNumberOfPagesLabel(JLabel lbl)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetOpenFileButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetOpenFileMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetOpenURLMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetOutlineComponents(JTree tree, JScrollPane scroll)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPageFitMode(int fitMode, boolean refresh)Set the ViewerModel's fit setting to fit the whole page, and update the displayvoidsetPageViewFacingPageConButton(JToggleButton btn)voidsetPageViewFacingPageNonConButton(JToggleButton btn)voidsetPageViewMode(int viewMode, boolean refresh)voidsetPageViewSinglePageConButton(JToggleButton btn)voidsetPageViewSinglePageNonConButton(JToggleButton btn)voidsetPanToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPermissionsMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPreferencesMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPreviousPageButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPreviousPageMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPrintButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPrintDefaultMediaSizeName(MediaSizeName mediaSize)Sets the default MediaSizeName and creates an new instance of the the PrintHelp with the new media size.voidsetPrintMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPrintSetupMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetPropertiesManager(ViewerPropertiesManager propertiesManager)Called by SwingViewerBuilder, so that Controller has access to all propertiesvoidsetPropertiesMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetQuickSearchToolBar(JToolBar toolBar)Called by SwingViewerBuilder, so that Controller can setup enabled/disabled statevoidsetRecentFilesSubMenu(JMenu mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetRedactionAnnotationToolButton(JToggleButton btn)voidsetReduMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetRotateLeftButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetRotateLeftMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetRotateRightButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetRotateRightMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSaveAsFileMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSaveFileButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSaveFileMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSearchButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSearchMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSearchNextMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSearchPanel(SearchPanel sp)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSearchPreviousMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSelectAllMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSelectToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSendMailMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetShowAnnotationUtilityPaneButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetShowBookmarkUtilityPaneButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetShowHideToolBarMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetShowHideUtilityPaneButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetShowHideUtilityPaneMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSignatureAnnotationToolButton(JToggleButton btn)voidsetSignaturesPanel(SignaturesHandlerPanel tn)voidsetSquareAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetSquareAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetStatusLabel(JLabel lbl)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetStrikeOutAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetStrikeOutAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetTextAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetTextAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetTextSelectToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetThumbnailsPanel(ThumbnailsPanel tn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetToolBarVisible(boolean show)Sets the visibility of the toolbarvoidsetUnderlineAnnotationPropertiesToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetUnderlineAnnotationToolButton(AnnotationColorToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetUndoMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingprotected voidsetupSecurityHandler(Document document, SecurityCallback securityCallback)Setup the security handle if specified, if not then creates and uses the default implementation.voidsetUtilityAndDocumentSplitPane(JSplitPane splitPane)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetUtilityPaneVisible(boolean visible)Makes the component visible or invisible.voidsetUtilityTabbedPane(JTabbedPane util)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetViewerFrame(Frame v)Called by SwingViewerBuilder, so that Controller can setup event handling.voidsetWindowListMenuItems(List menuItems)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetWindowManagementCallback(WindowManagementCallback wm)The WindowManagementCallback is used for creating new Document windows, and quitting the applicationvoidsetZoom(float zoom)Zoom to a new zoom level, without centering on any new specific pointvoidsetZoomComboBox(JComboBox<String> zcb, float[] zl)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomDynamicToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomInButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomInMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomInToolButton(JToggleButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomOutButton(JButton btn)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidsetZoomOutMenuItem(JMenuItem mi)Called by SwingViewerBuilder, so that Controller can setup event handlingvoidshowAboutDialog()Show the About dialog.voidshowAnnotationDestinationPanel(TreePath path)voidshowAnnotationDestinationPanel(DestinationComponent selectedDestination)Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses itvoidshowAnnotationPanel(boolean forceShow)Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses itvoidshowAnnotationPreviewWindow()voidshowAnnotationProperties(AnnotationComponent annotationComponent)Show tabbed pane interface for annotation properties.voidshowAnnotationProperties(AnnotationComponent annotationComponent, Frame frame)Show tabbed pane interface for annotation properties centered on the given framevoidshowDocumentFontDialog()Show document font information.voidshowDocumentInformationDialog()Show information about the PDF file's Document, such as the title, subject, author, keywords, creator, producer, creation date, and last modification datevoidshowDocumentPermissionsDialog()Show the permissions set in the PDF file's Document, as relates to encryption, altering, or extracting information from, the DocumentvoidshowDocumentProperties()Show tabbed pane interface for document properties, info, security and fonts.voidshowOutlinePanel(boolean forceShow)Make the outline panel panel visiblevoidshowPage(int nPage)Sets the ViewerModel's current page index, and updates the display to show the newly selected pagevoidshowPageFromTextField()Takes the page number that the user has typed into the text field, converts it into a page index, and then displays that pagevoidshowPageSelectionDialog()Show a dialog, listing every page in the PDF Document, for the user to select which page to show.voidshowPrintSetupDialog()Show a print setup dialog, to alter the ViewerModel's PageFormatprotected intshowRedactionWarningDialog()voidshowSearch()voidshowSearchPanel()Make the Search pane visible, and if necessary, the utility pane that encloses itvoidshowSearchPanel(String searchPhrase)protected booleanshowUtilityPanel(Component panelToShow, boolean forceShow)Shows the given component in the utility panelvoidshowViewerPreferences()Show tabbed pane interface for viewer preferences, info, security and fonts.voidshowViewerPreferences(String selectedPreference)Show tabbed pane interface for viewer preferences, info, security and fonts.voidtoggleAnnotationEditMode()Flips the visibility of the form highlight functionality ot hte opposite of what it was.voidtoggleFormHighlight()Flips the visibility of the form highlight functionality ot hte opposite of what it was.voidtoggleShowSearchPanel()voidtoggleToolBarVisibility()Flips the visibility of the toolbar to the opposite of what it wasvoidtoggleUtilityPaneVisibility()Flips the visibility of the utility pane to the opposite of what it wasvoidupdateDocumentView()voidwindowActivated(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowClosed(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowClosing(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowDeactivated(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowDeiconified(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowIconified(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidwindowOpened(WindowEvent e)Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulationvoidzoomIn()Increases the current page visualization zoom factor by 20%.voidzoomOut()Decreases the current page visualization zoom factor by 20%.-
Methods inherited from class java.awt.event.ComponentAdapter
componentHidden, componentShown
-
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
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
-
MAX_SELECT_ALL_PAGE_COUNT
protected static final int MAX_SELECT_ALL_PAGE_COUNT
- See Also:
- Constant Field Values
-
annotationPanel
protected AnnotationPanel annotationPanel
-
utilityTabbedPane
protected JTabbedPane utilityTabbedPane
-
utilityAndDocumentSplitPane
protected JSplitPane utilityAndDocumentSplitPane
-
windowManagementCallback
protected WindowManagementCallback windowManagementCallback
-
viewModel
protected ViewModel viewModel
-
documentViewController
protected DocumentViewControllerImpl documentViewController
-
outlinesController
protected OutlinesController outlinesController
-
documentSearchController
protected DocumentSearchController documentSearchController
-
document
protected Document document
-
disposed
protected boolean disposed
-
messageBundle
protected static ResourceBundle messageBundle
-
propertiesManager
protected ViewerPropertiesManager propertiesManager
-
-
Constructor Detail
-
SwingController
public SwingController()
Create a Controller object, and its associated ViewerModel- See Also:
ViewModel
-
SwingController
public SwingController(ResourceBundle currentMessageBundle)
-
-
Method Detail
-
setDocumentViewController
public void setDocumentViewController(DocumentViewControllerImpl documentViewController)
Sets a custom document view controller. Previously constructed documentView controllers are unregistered from the propertyChangeListener, the provided controller will be registered with the propertyChangeListener.- Parameters:
documentViewController- new document controller.
-
getDocumentViewController
public DocumentViewController getDocumentViewController()
Gets controller responsible for the page multiple page views.- Specified by:
getDocumentViewControllerin interfaceController- Returns:
- page view controller.
-
getDocumentSearchController
public DocumentSearchController getDocumentSearchController()
Gets controller responsible for the document text searches.- Specified by:
getDocumentSearchControllerin interfaceController- Returns:
- page view controller.
-
getMessageBundle
public ResourceBundle getMessageBundle()
Gets the message bundle used by this class. Message bundle resources are loaded via the JVM default locale.- Specified by:
getMessageBundlein interfaceController- 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- Specified by:
setWindowManagementCallbackin interfaceController- 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- Specified by:
getWindowManagementCallbackin interfaceController- Returns:
- The current WindowManagementCallback
- See Also:
setWindowManagementCallback(org.icepdf.ri.common.WindowManagementCallback)
-
setPropertiesManager
public void setPropertiesManager(ViewerPropertiesManager propertiesManager)
Called by SwingViewerBuilder, so that Controller has access to all properties- Parameters:
propertiesManager- current properties manager instance.
-
getPropertiesManager
public ViewerPropertiesManager getPropertiesManager()
Gets an instance of the PropertiesManager so that other builders can use the properties manager.- Specified by:
getPropertiesManagerin interfaceController- Returns:
- currently properties manager instance.
-
setOpenFileMenuItem
public void setOpenFileMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setRecentFilesSubMenu
public void setRecentFilesSubMenu(JMenu mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setOpenURLMenuItem
public void setOpenURLMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setCloseMenuItem
public void setCloseMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSaveFileMenuItem
public void setSaveFileMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSaveAsFileMenuItem
public void setSaveAsFileMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setExportDocumentFileMenuItem
public void setExportDocumentFileMenuItem(JMenuItem mi)
-
setSendMailMenuItem
public void setSendMailMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setExportTextMenuItem
public void setExportTextMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPermissionsMenuItem
public void setPermissionsMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPropertiesMenuItem
public void setPropertiesMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setInformationMenuItem
public void setInformationMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setFontInformationMenuItem
public void setFontInformationMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPrintSetupMenuItem
public void setPrintSetupMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPrintMenuItem
public void setPrintMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setExitMenuItem
public void setExitMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setUndoMenuItem
public void setUndoMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setReduMenuItem
public void setReduMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setCopyMenuItem
public void setCopyMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setCopyContextMenuItem
public void setCopyContextMenuItem(JMenuItem mi)
-
setDeleteMenuItem
public void setDeleteMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSelectAllMenuItem
public void setSelectAllMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setDeselectAllMenuItem
public void setDeselectAllMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPreferencesMenuItem
public void setPreferencesMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setFitActualSizeMenuItem
public void setFitActualSizeMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setInsertOutlineMenuItem
public void setInsertOutlineMenuItem(JMenuItem mi)
-
setFitPageMenuItem
public void setFitPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setFitWidthMenuItem
public void setFitWidthMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setFullScreenMenuItem
public void setFullScreenMenuItem(JMenuItem mi)
-
setZoomInMenuItem
public void setZoomInMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setZoomOutMenuItem
public void setZoomOutMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setRotateLeftMenuItem
public void setRotateLeftMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setRotateRightMenuItem
public void setRotateRightMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setShowHideToolBarMenuItem
public void setShowHideToolBarMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setShowHideUtilityPaneMenuItem
public void setShowHideUtilityPaneMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setFirstPageMenuItem
public void setFirstPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setPreviousPageMenuItem
public void setPreviousPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setNextPageMenuItem
public void setNextPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setLastPageMenuItem
public void setLastPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSearchMenuItem
public void setSearchMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setAdvancedSearchMenuItem
public void setAdvancedSearchMenuItem(JMenuItem mi)
Called by SwingViewerbuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSearchNextMenuItem
public void setSearchNextMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setSearchPreviousMenuItem
public void setSearchPreviousMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setGoToPageMenuItem
public void setGoToPageMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setMinimiseAllMenuItem
public void setMinimiseAllMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setBringAllToFrontMenuItem
public void setBringAllToFrontMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setAnnotationPreviewMenuItem
public void setAnnotationPreviewMenuItem(JMenuItem mi)
-
setWindowListMenuItems
public void setWindowListMenuItems(List menuItems)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
menuItems- menu item of opened windows.
-
setAboutMenuItem
public void setAboutMenuItem(JMenuItem mi)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
mi- menu item to assign
-
setOpenFileButton
public void setOpenFileButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setSaveFileButton
public void setSaveFileButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setPrintButton
public void setPrintButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setSearchButton
public void setSearchButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setShowHideUtilityPaneButton
public void setShowHideUtilityPaneButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setShowAnnotationUtilityPaneButton
public void setShowAnnotationUtilityPaneButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setShowBookmarkUtilityPaneButton
public void setShowBookmarkUtilityPaneButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFirstPageButton
public void setFirstPageButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setPreviousPageButton
public void setPreviousPageButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setNextPageButton
public void setNextPageButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLastPageButton
public void setLastPageButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setCurrentPageNumberTextField
public void setCurrentPageNumberTextField(JTextField textField)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
textField- current page number text field value.
-
setNumberOfPagesLabel
public void setNumberOfPagesLabel(JLabel lbl)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
lbl- number of pages label.
-
setZoomOutButton
public void setZoomOutButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setZoomComboBox
public void setZoomComboBox(JComboBox<String> zcb, float[] zl)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
zcb- zoom level combo box values.zl- default zoom level.
-
setZoomInButton
public void setZoomInButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFitActualSizeButton
public void setFitActualSizeButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFitHeightButton
public void setFitHeightButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFitWidthButton
public void setFitWidthButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFullScreenButton
public void setFullScreenButton(JButton btn)
-
setRotateLeftButton
public void setRotateLeftButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setRotateRightButton
public void setRotateRightButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setPanToolButton
public void setPanToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setZoomInToolButton
public void setZoomInToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setTextSelectToolButton
public void setTextSelectToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setSelectToolButton
public void setSelectToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLinkAnnotationToolButton
public void setLinkAnnotationToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setStrikeOutAnnotationToolButton
public void setStrikeOutAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setUnderlineAnnotationToolButton
public void setUnderlineAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLineAnnotationToolButton
public void setLineAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLineArrowAnnotationToolButton
public void setLineArrowAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setSquareAnnotationToolButton
public void setSquareAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setCircleAnnotationToolButton
public void setCircleAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setInkAnnotationToolButton
public void setInkAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFreeTextAnnotationToolButton
public void setFreeTextAnnotationToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setAnnotationSummaryButton
public void setAnnotationSummaryButton(JButton btn)
-
setAnnotationEditingModeToolButton
public void setAnnotationEditingModeToolButton(JToggleButton btn)
-
setDeleteAllButton
public void setDeleteAllButton(JButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLinkAnnotationPropertiesToolButton
public void setLinkAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setHighlightAnnotationToolButton
public void setHighlightAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setRedactionAnnotationToolButton
public void setRedactionAnnotationToolButton(JToggleButton btn)
-
setSignatureAnnotationToolButton
public void setSignatureAnnotationToolButton(JToggleButton btn)
-
setHighlightAnnotationPropertiesToolButton
public void setHighlightAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setStrikeOutAnnotationPropertiesToolButton
public void setStrikeOutAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setUnderlineAnnotationPropertiesToolButton
public void setUnderlineAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLineAnnotationPropertiesToolButton
public void setLineAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setLineArrowAnnotationPropertiesToolButton
public void setLineArrowAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setSquareAnnotationPropertiesToolButton
public void setSquareAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setCircleAnnotationPropertiesToolButton
public void setCircleAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setInkAnnotationPropertiesToolButton
public void setInkAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFreeTextAnnotationPropertiesToolButton
public void setFreeTextAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setTextAnnotationToolButton
public void setTextAnnotationToolButton(AnnotationColorToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setFormHighlightButton
public void setFormHighlightButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling for the form highlight button.- Parameters:
btn- button to assign
-
setQuickSearchToolBar
public void setQuickSearchToolBar(JToolBar toolBar)
Called by SwingViewerBuilder, so that Controller can setup enabled/disabled state- Parameters:
toolBar- toolBar to assign
-
setTextAnnotationPropertiesToolButton
public void setTextAnnotationPropertiesToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setZoomDynamicToolButton
public void setZoomDynamicToolButton(JToggleButton btn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
btn- button to assign
-
setCompleteToolBar
public void setCompleteToolBar(JToolBar toolbar)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
toolbar- assignment of complete toolbar.
-
setOutlineComponents
public void setOutlineComponents(JTree tree, JScrollPane scroll)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
tree- outline tree componentscroll- outline scroll parent.
-
getOutlineTree
public JTree getOutlineTree()
-
setSearchPanel
public void setSearchPanel(SearchPanel sp)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
sp- search panel
-
setAttachmentPanel
public void setAttachmentPanel(AttachmentPanel atp)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
atp- attachment panel
-
setThumbnailsPanel
public void setThumbnailsPanel(ThumbnailsPanel tn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
tn- thumbnails panel.
-
setLayersPanel
public void setLayersPanel(LayersPanel tn)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
tn- layers panel.
-
setSignaturesPanel
public void setSignaturesPanel(SignaturesHandlerPanel tn)
-
setAnnotationPanel
public void setAnnotationPanel(AnnotationPanel lp)
-
setUtilityTabbedPane
public void setUtilityTabbedPane(JTabbedPane util)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
util- utility tabbed pane.
-
setIsEmbeddedComponent
public void setIsEmbeddedComponent(boolean embeddableComponent)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
embeddableComponent- indicates usage of component viewer.
-
setUtilityAndDocumentSplitPane
public void setUtilityAndDocumentSplitPane(JSplitPane splitPane)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
splitPane- main split pain that divides utility from page view pane.
-
setStatusLabel
public void setStatusLabel(JLabel lbl)
Called by SwingViewerBuilder, so that Controller can setup event handling- Parameters:
lbl- status label value.
-
setViewerFrame
public void setViewerFrame(Frame v)
Called by SwingViewerBuilder, so that Controller can setup event handling.- Parameters:
v- paren view frame.
-
getViewerFrame
public Frame getViewerFrame()
Not all uses of Controller would result in there existing a Viewer Frame, so this may well return null.- Specified by:
getViewerFramein interfaceController- Returns:
- parent frame if one.
-
isPdfCollection
public boolean isPdfCollection()
Tests to see if the PDF document is a collection and should be treated as such.- Returns:
- true if PDF collection otherwise false.
-
reflectStateInComponents
protected void reflectStateInComponents()
Utility method to set the state of all the different GUI elements. Mainly to enable/disable the GUI elements when a file is opened/closed respectively.
-
havePermissionToPrint
public boolean havePermissionToPrint()
Description copied from interface:ControllerCheck to see if document has permission to be printed.- Specified by:
havePermissionToPrintin interfaceController- Returns:
- true if content printing should be allowed.
-
havePermissionToExtractContent
public boolean havePermissionToExtractContent()
Description copied from interface:ControllerCheck to see if document has permission to extract content.- Specified by:
havePermissionToExtractContentin interfaceController- Returns:
- true if content extraction should be limited.
-
havePermissionToModifyDocument
public boolean havePermissionToModifyDocument()
Description copied from interface:ControllerCheck to see if document can be modified.- Specified by:
havePermissionToModifyDocumentin interfaceController- Returns:
- true if content editing is allowed.
-
setEnabled
protected void setEnabled(JComponent comp, boolean ena)
-
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:- DISPLAY_TOOL_PAN - Changes the mouse icon to a hand and allows the user to click and drag the document view (Pan). This pan feature is only available when the display window has scrollbars.
- DISPLAY_TOOL_ZOOM_IN - Changes the mouse icon to a magnifying glass and adds a left mouse click listener to the display panel. One left mouse click increases the zoom factor by 20%.
- DISPLAY_TOOL_ZOOM_OUT - Changes the mouse icon to a magnifying glass and adds a left mouse click listener to the display panel. One left mouse click decreases the zoom factor by 20%.
- DISPLAY_TOOL_NONE - Changes the mouse icon to the default icon and removes mouse properties from the display panel.
- Parameters:
argToolName- DocumentViewModel tool name.- 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.
-
openFile
public void openFile(String initialDirPath)
Utility method for opening a file. Shows a dialog for the user to select which file to open.- Parameters:
initialDirPath- The directory to show to the user when opening the FileDialog
-
openFileInSomeViewer
public void openFileInSomeViewer(String filename)
Description copied from interface:ControllerOpens the specified file in a new window if the window manager is present. If not the current document is closed and this path opened.- Specified by:
openFileInSomeViewerin interfaceController- Parameters:
filename- file name to open.
-
addRecentFileEntry
protected void addRecentFileEntry(Path path)
Adds the recently opened file to the "Recently Opened" file list.- Parameters:
path- path to be added to recent files list.
-
refreshRecentFileMenuItem
protected void refreshRecentFileMenuItem()
Builds out the recent file list and assembles the menuItems.
-
setupSecurityHandler
protected void setupSecurityHandler(Document document, SecurityCallback securityCallback)
Setup the security handle if specified, if not then creates and uses the default implementation.- Parameters:
document- document to set securityCallback on .securityCallback- security callback for prompting users or owner passwords.
-
openDocument
public void openDocument(String pathname)
Open a file specified by the given path name.- Specified by:
openDocumentin interfaceController- 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(URL location)
Open a URL specified by the location variable.- Specified by:
openDocumentin interfaceController- Parameters:
location- location of a valid PDF document
-
openDocument
public void openDocument(InputStream inputStream, String description, 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(String)oropenDocument(URL)as it may have to do intermediary data copying, using more memory.- Specified by:
openDocumentin interfaceController- 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(Document embeddedDocument, String fileName)
Load the specified file in a new Viewer RI window.- Specified by:
openDocumentin interfaceController- Parameters:
embeddedDocument- document to load in ne windowfileName- file name of the document in question
-
openDocument
public void openDocument(byte[] data, int offset, int length, String description, String pathOrURL)Opens a Document via the specified byte array.- Specified by:
openDocumentin interfaceController- Parameters:
data- Byte array containing a valid PDF document.offset- the index into the byte array where the PDF data beginslength- the number of bytes in the byte array belonging to the PDF datadescription- 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()
-
commonNewDocumentHandling
public void commonNewDocumentHandling(String fileDescription)
-
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 Controller 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 Controller 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 Controller 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 Controller would call Document.dispose()- Specified by:
disposein interfaceController
-
saveFile
public void saveFile()
Utility method for saving the current document to the same filename. As it's not possible to write to the file while the document is open, a temp file is created and this file will be renamed to the current open file when the window is closed.- Specified by:
saveFilein interfaceController
-
saveFileAs
public void saveFileAs()
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.- Specified by:
saveFileAsin interfaceController
-
exportDocument
public void exportDocument()
Utility method for saving a document using a full document write. The file will be rewritten and indexed. All deleted objects will be removed. Any incremental updates will be flattened and only the current object version will be written. No previous document state will persist. A save dialog will be shown will not be possible to overwrite the original document.
-
hasUnburnedRedactions
protected boolean hasUnburnedRedactions()
-
showRedactionWarningDialog
protected int showRedactionWarningDialog()
-
saveFileAs
protected void saveFileAs(Controller.SaveMode saveMode)
-
saveFileChecks
protected void saveFileChecks(Controller.SaveMode saveMode, String originalFileName, File file)
-
generateNewSaveName
protected String generateNewSaveName(String fileName)
Generates a file name based on the original file name but appends "-new". If new file extension exists a ".pdf" is automatically added.- Parameters:
fileName- file name that new file name is derived from.- Returns:
- original file name with the "-new" appended to it.
-
enableUtilityTabbedPanel
protected void enableUtilityTabbedPanel(JComponent tabbedPanel)
-
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.
-
saveChangesDialog
public boolean saveChangesDialog()
If there is a WindowManagementCallback in place, then this will invoke its quit method- Returns:
- true indicates save was execute, false; cancelled.
- 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
-
showDocumentFontDialog
public void showDocumentFontDialog()
Show document font information.
-
showDocumentProperties
public void showDocumentProperties()
Show tabbed pane interface for document properties, info, security and fonts.
-
showViewerPreferences
public void showViewerPreferences()
Show tabbed pane interface for viewer preferences, info, security and fonts.
-
showViewerPreferences
public void showViewerPreferences(String selectedPreference)
Show tabbed pane interface for viewer preferences, info, security and fonts.- Specified by:
showViewerPreferencesin interfaceController- Parameters:
selectedPreference- tab to select, PropertiesManager.PROPERTY_SHOW_PREFERENCES_GENERAL
-
showAnnotationProperties
public void showAnnotationProperties(AnnotationComponent annotationComponent)
Show tabbed pane interface for annotation properties.- Specified by:
showAnnotationPropertiesin interfaceController- Parameters:
annotationComponent- annotation to show properties of.
-
showAnnotationProperties
public void showAnnotationProperties(AnnotationComponent annotationComponent, Frame frame)
Show tabbed pane interface for annotation properties centered on the given frame- Specified by:
showAnnotationPropertiesin interfaceController- Parameters:
annotationComponent- annotation to show properties of.frame- parent frame for centering dialog.
-
initializeOutline
protected void initializeOutline()
-
showPrintSetupDialog
public void showPrintSetupDialog()
Show a print setup dialog, to alter the ViewerModel's PageFormat- See Also:
ViewModel
-
setPrintDefaultMediaSizeName
public void setPrintDefaultMediaSizeName(MediaSizeName mediaSize)
Sets the default MediaSizeName and creates an new instance of the the PrintHelp with the new media size. The media size is also persisted to the PropertiesManager.
Note: this method should only be called after a valid file or file stream has been loaded by the controller otherwise a null pointer will result.- Parameters:
mediaSize- MediaSizeName constant of paper size to print to.
-
print
public void print(boolean withDialog)
Description copied from interface:ControllerPrint the given document- Specified by:
printin interfaceController- Parameters:
withDialog- If should show a print dialog before starting to print
-
printAndExit
public void printAndExit(boolean showDialog, String printer)Description copied from interface:ControllerPrints the document with the given printer, assuming we're exiting after that- Specified by:
printAndExitin interfaceController- Parameters:
showDialog- If true show a print dialog before starting to printprinter- The name of the printer
-
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
-
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- zoom value passed to view controller.
-
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 current page, otherwise false.
-
getPageTree
public PageTree getPageTree()
Gives access to the currently opened Document's Catalog's PageTree- Returns:
- PageTree
-
showAnnotationPreviewWindow
public void showAnnotationPreviewWindow()
-
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- Specified by:
goToDeltaPagein interfaceController- 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(JToggleButton btn)
-
setPageViewFacingPageConButton
public void setPageViewFacingPageConButton(JToggleButton btn)
-
setPageViewSinglePageNonConButton
public void setPageViewSinglePageNonConButton(JToggleButton btn)
-
setPageViewFacingPageNonConButton
public void setPageViewFacingPageNonConButton(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- Parameters:
fitMode- fit mode.refresh- true to refresh document page view.
-
setFullScreenMode
public void setFullScreenMode()
-
setPageViewMode
public void setPageViewMode(int viewMode, boolean refresh)
-
setDocumentToolMode
public void setDocumentToolMode(int toolType)
Description copied from interface:ControllerSets the tool mode used for the controller view. Tools such as text selection, panning and annotation selection can be used.- Specified by:
setDocumentToolModein interfaceController- Parameters:
toolType- tool mode constants defined in DocumentViewModel
-
isUtilityPaneVisible
public boolean isUtilityPaneVisible()
If the utility pane is currently visible- Returns:
- true if pane is visible false otherwise.
-
isAnnotationUtilityPaneVisible
public boolean isAnnotationUtilityPaneVisible()
-
isBookmarkUtilityPaneVisible
public boolean isBookmarkUtilityPaneVisible()
-
isComponentUtilityPaneVisible
public boolean isComponentUtilityPaneVisible(Component component)
-
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)
-
toggleFormHighlight
public void toggleFormHighlight()
Flips the visibility of the form highlight functionality ot hte opposite of what it was.
-
toggleAnnotationEditMode
public void toggleAnnotationEditMode()
Flips the visibility of the form highlight functionality ot hte opposite of what it was.
-
setAnnotationEditMode
public void setAnnotationEditMode(boolean enabled)
Description copied from interface:ControllerSets visibility of the form highlight functionality ot hte opposite of what it was.- Specified by:
setAnnotationEditModein interfaceController- Parameters:
enabled- true to enable mode; otherwise, false;
-
safelySelectUtilityPanel
protected boolean safelySelectUtilityPanel(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
-
isUtilityTabSelected
protected boolean isUtilityTabSelected(Component comp)
-
showSearch
public void showSearch()
-
toggleShowSearchPanel
public void toggleShowSearchPanel()
-
showSearchPanel
public void showSearchPanel()
Make the Search pane visible, and if necessary, the utility pane that encloses it- See Also:
setUtilityPaneVisible(boolean)
-
showSearchPanel
public void showSearchPanel(String searchPhrase)
-
nextSearchResult
public void nextSearchResult()
-
previousSearchResult
public void previousSearchResult()
-
showAnnotationDestinationPanel
public void showAnnotationDestinationPanel(DestinationComponent selectedDestination)
Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses it- Parameters:
selectedDestination- the destination to show in the panel- See Also:
setUtilityPaneVisible(boolean)
-
showAnnotationDestinationPanel
public void showAnnotationDestinationPanel(TreePath path)
-
showAnnotationPanel
public void showAnnotationPanel(boolean forceShow)
Make the Annotation Link Panel visible, and if necessary, the utility pane that encloses it- Parameters:
forceShow- Forces the utility pane to be visible- See Also:
setUtilityPaneVisible(boolean)
-
showUtilityPanel
protected boolean showUtilityPanel(Component panelToShow, boolean forceShow)
Shows the given component in the utility panel- Parameters:
panelToShow- The component to showforceShow- Whether to force showing the utility panel or not- Returns:
- whether the panel has been selected or not
-
showOutlinePanel
public void showOutlinePanel(boolean forceShow)
Make the outline panel panel visible- Parameters:
forceShow- Whether to force showing the utility pane or not
-
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(Catalog catalog, ViewerPropertiesManager 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 frompropertiesManager- to check properties in
-
getViewModel
public ViewModel getViewModel()
Gives access to this Controller's ViewerModel- Specified by:
getViewModelin interfaceController- Returns:
- The Controller's ViewerModel
- See Also:
ViewModel
-
getPrintHelperFactory
public PrintHelperFactory getPrintHelperFactory()
- Specified by:
getPrintHelperFactoryin interfaceController- Returns:
- The PrintHelperFactory used to create print helpers
-
getDocument
public 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:
getDocumentin interfaceController- 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:
getCurrentPageNumberin interfaceController- Returns:
- The zero-based index of the current Page being displayed
-
actionPerformed
public void actionPerformed(ActionEvent event)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
actionPerformedin interfaceActionListener
-
focusGained
public void focusGained(FocusEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
public void focusLost(FocusEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
focusLostin interfaceFocusListener
-
itemStateChanged
public void itemStateChanged(ItemEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
itemStateChangedin interfaceItemListener
-
followOutlineItem
public void followOutlineItem(OutlineItemTreeNode node)
Description copied from interface:ControllerInterprets the OutlineItemTreeNode loading ans displaying any associated Destination values.- Specified by:
followOutlineItemin interfaceController- Parameters:
node- node to interpret and navigate to.
-
followDestinationItem
public void followDestinationItem(NameTreeNode node)
Description copied from interface:ControllerInterprets the NameTreeNode loading ans displaying any associated Destination values.- Specified by:
followDestinationItemin interfaceController- Parameters:
node- node to interpret and navigate to.
-
windowActivated
public void windowActivated(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowActivatedin interfaceWindowListener
-
windowClosed
public void windowClosed(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowClosedin interfaceWindowListener
-
windowClosing
public void windowClosing(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowClosingin interfaceWindowListener
-
windowDeactivated
public void windowDeactivated(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowDeactivatedin interfaceWindowListener
-
windowDeiconified
public void windowDeiconified(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowDeiconifiedin interfaceWindowListener
-
windowIconified
public void windowIconified(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowIconifiedin interfaceWindowListener
-
windowOpened
public void windowOpened(WindowEvent e)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
windowOpenedin interfaceWindowListener
-
componentResized
public void componentResized(ComponentEvent e)
- Specified by:
componentResizedin interfaceComponentListener- Overrides:
componentResizedin classComponentAdapter
-
componentMoved
public void componentMoved(ComponentEvent e)
- Specified by:
componentMovedin interfaceComponentListener- Overrides:
componentMovedin classComponentAdapter
-
dragEnter
public void dragEnter(DropTargetDragEvent event)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
dragEnterin interfaceDropTargetListener
-
dragOver
public void dragOver(DropTargetDragEvent event)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
dragOverin interfaceDropTargetListener
-
dropActionChanged
public void dropActionChanged(DropTargetDragEvent event)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
dropActionChangedin interfaceDropTargetListener
-
drop
public void drop(DropTargetDropEvent event)
Handle drop event when a user drags and drops one or more files onto the viewer frame.- Specified by:
dropin interfaceDropTargetListener- Parameters:
event- information about the drag and drop data.
-
dragExit
public void dragExit(DropTargetEvent event)
Controller takes AWT/Swing events, and maps them to its own events related to PDF Document manipulation- Specified by:
dragExitin interfaceDropTargetListener
-
prepareKeyMap
protected void prepareKeyMap(JComponent component)
-
addKeyAction
protected final void addKeyAction(JComponent component, int keyCode, int modifier, SwingController.BaseAction action)
-
propertyChange
public void propertyChange(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:
propertyChangein interfacePropertyChangeListener- Parameters:
evt- property change event
-
changeAnnotationsVisibility
public void changeAnnotationsVisibility(AnnotationFilter filter, boolean visible, boolean execInvert)
-
changeAnnotationsPrivacy
public void changeAnnotationsPrivacy(AnnotationFilter filter, boolean priv)
Changes privacy flag of the MarkupAnnotations given by the annotations filter- Parameters:
filter- The filter used to filter the annotationspriv- The privacy status to use (true = private)
-
-