|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.icepdf.ri.common.SwingController
public class SwingController
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.
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 |
---|
public static final int CURSOR_OPEN_HAND
public static final int CURSOR_CLOSE_HAND
public static final int CURSOR_ZOOM_IN
public static final int CURSOR_ZOOM_OUT
public static final int CURSOR_WAIT
public static final int CURSOR_SELECT
public static final int CURSOR_DEFAULT
Constructor Detail |
---|
public SwingController()
ViewModel
public SwingController(java.util.ResourceBundle messageBundle)
Method Detail |
---|
public org.icepdf.core.views.DocumentViewController getDocumentViewController()
getDocumentViewController
in interface org.icepdf.core.Controller
public org.icepdf.core.search.DocumentSearchController getDocumentSearchController()
getDocumentSearchController
in interface org.icepdf.core.Controller
public java.util.ResourceBundle getMessageBundle()
public void setWindowManagementCallback(WindowManagementCallback wm)
wm
- The new WindowManagementCallbackgetWindowManagementCallback()
public WindowManagementCallback getWindowManagementCallback()
setWindowManagementCallback(org.icepdf.ri.common.WindowManagementCallback)
public void setPropertiesManager(PropertiesManager propertiesManager)
public void setOpenFileMenuItem(javax.swing.JMenuItem mi)
public void setOpenURLMenuItem(javax.swing.JMenuItem mi)
public void setCloseMenuItem(javax.swing.JMenuItem mi)
public void setSaveAsFileMenuItem(javax.swing.JMenuItem mi)
public void setExportTextMenuItem(javax.swing.JMenuItem mi)
public void setExportSVGMenuItem(javax.swing.JMenuItem mi)
public void setPermissionsMenuItem(javax.swing.JMenuItem mi)
public void setInformationMenuItem(javax.swing.JMenuItem mi)
public void setPrintSetupMenuItem(javax.swing.JMenuItem mi)
public void setPrintMenuItem(javax.swing.JMenuItem mi)
public void setExitMenuItem(javax.swing.JMenuItem mi)
public void setUndoMenuItem(javax.swing.JMenuItem mi)
public void setReduMenuItem(javax.swing.JMenuItem mi)
public void setCopyMenuItem(javax.swing.JMenuItem mi)
public void setDeleteMenuItem(javax.swing.JMenuItem mi)
public void setSelectAllMenuItem(javax.swing.JMenuItem mi)
public void setDselectAllMenuItem(javax.swing.JMenuItem mi)
public void setFitActualSizeMenuItem(javax.swing.JMenuItem mi)
public void setFitPageMenuItem(javax.swing.JMenuItem mi)
public void setFitWidthMenuItem(javax.swing.JMenuItem mi)
public void setZoomInMenuItem(javax.swing.JMenuItem mi)
public void setZoomOutMenuItem(javax.swing.JMenuItem mi)
public void setRotateLeftMenuItem(javax.swing.JMenuItem mi)
public void setRotateRightMenuItem(javax.swing.JMenuItem mi)
public void setShowHideToolBarMenuItem(javax.swing.JMenuItem mi)
public void setShowHideUtilityPaneMenuItem(javax.swing.JMenuItem mi)
public void setFirstPageMenuItem(javax.swing.JMenuItem mi)
public void setPreviousPageMenuItem(javax.swing.JMenuItem mi)
public void setNextPageMenuItem(javax.swing.JMenuItem mi)
public void setLastPageMenuItem(javax.swing.JMenuItem mi)
public void setSearchMenuItem(javax.swing.JMenuItem mi)
public void setGoToPageMenuItem(javax.swing.JMenuItem mi)
public void setMinimiseAllMenuItem(javax.swing.JMenuItem mi)
public void setBringAllToFrontMenuItem(javax.swing.JMenuItem mi)
public void setWindowListMenuItems(java.util.List menuItems)
public void setAboutMenuItem(javax.swing.JMenuItem mi)
public void setOpenFileButton(javax.swing.JButton btn)
public void setSaveAsFileButton(javax.swing.JButton btn)
public void setPrintButton(javax.swing.JButton btn)
public void setSearchButton(javax.swing.JButton btn)
public void setShowHideUtilityPaneButton(javax.swing.JButton btn)
public void setFirstPageButton(javax.swing.JButton btn)
public void setPreviousPageButton(javax.swing.JButton btn)
public void setNextPageButton(javax.swing.JButton btn)
public void setLastPageButton(javax.swing.JButton btn)
public void setCurrentPageNumberTextField(javax.swing.JTextField textField)
public void setNumberOfPagesLabel(javax.swing.JLabel lbl)
public void setZoomOutButton(javax.swing.JButton btn)
public void setZoomComboBox(javax.swing.JComboBox zcb, float[] zl)
public void setZoomInButton(javax.swing.JButton btn)
public void setFitActualSizeButton(javax.swing.JToggleButton btn)
public void setFitHeightButton(javax.swing.JToggleButton btn)
public void setFontEngineButton(javax.swing.JToggleButton btn)
public void setFitWidthButton(javax.swing.JToggleButton btn)
public void setRotateLeftButton(javax.swing.JButton btn)
public void setRotateRightButton(javax.swing.JButton btn)
public void setPanToolButton(javax.swing.JToggleButton btn)
public void setZoomInToolButton(javax.swing.JToggleButton btn)
public void setTextSelectToolButton(javax.swing.JToggleButton btn)
public void setSelectToolButton(javax.swing.JToggleButton btn)
public void setLinkAnnotationToolButton(javax.swing.JToggleButton btn)
public void setZoomOutToolButton(javax.swing.JToggleButton btn)
public void setCompleteToolBar(javax.swing.JToolBar toolbar)
public void setOutlineComponents(javax.swing.JTree tree, javax.swing.JScrollPane scroll)
public void setSearchPanel(SearchPanel sp)
public void setAnnotationPanel(AnnotationPanel lp)
public void setUtilityTabbedPane(javax.swing.JTabbedPane util)
public void setIsEmbeddedComponent(boolean embeddableComponent)
public void setUtilityAndDocumentSplitPane(javax.swing.JSplitPane splitPane)
public void setStatusLabel(javax.swing.JLabel lbl)
public void setViewerFrame(javax.swing.JFrame v)
public javax.swing.JFrame getViewerFrame()
public boolean havePermissionToPrint()
public boolean havePermissionToExtractContent()
public boolean havePermissionToModifyDocument()
public void reflectUndoCommands()
public int getDocumentViewToolMode()
setDisplayTool(int)
public void setDisplayTool(int argToolName)
getDocumentViewToolMode()
public void openFile()
public void openFileInSomeViewer(java.lang.String filename)
public void openDocument(java.lang.String pathname)
pathname
- String representing a valid file pathpublic void openURL()
public void openDocument(java.net.URL location)
location
- location of a valid PDF documentpublic void openDocument(java.io.InputStream inputStream, java.lang.String description, java.lang.String pathOrURL)
Note: This method is less efficient than
#openDocument(Stringpathname)
or #openDocument(URLlocation)
as it
may have to do intermediary data copying, using more memory.
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()public void openDocument(byte[] data, int offset, int length, java.lang.String description, java.lang.String pathOrURL)
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()public void closeDocument()
Document
public void dispose()
public void saveFile()
protected java.lang.String generateNewSaveName(java.lang.String fileName)
fileName
- file name that new file name is dirived from.
public void exportText()
public void exportSVG()
public void exit()
setWindowManagementCallback(org.icepdf.ri.common.WindowManagementCallback)
,
getWindowManagementCallback()
public void toggleToolBarVisibility()
setToolBarVisible(boolean)
public void setToolBarVisible(boolean show)
show
- The new visibility of the toolbarpublic void showAboutDialog()
public void showDocumentPermissionsDialog()
public void showDocumentInformationDialog()
public void showPrintSetupDialog()
ViewModel
public void print(boolean withDialog)
withDialog
- If should show a print dialog before starting to printpublic void showPageFromTextField()
public void followOutlineItem(org.icepdf.core.pobjects.OutlineItem o)
public void zoomIn()
public void zoomOut()
public void setZoom(float zoom)
zoom
- public void doCommonZoomUIUpdates(boolean becauseOfValidFitMode)
public boolean isCurrentPage()
public org.icepdf.core.pobjects.PageTree getPageTree()
public void showPage(int nPage)
nPage
- Index of the Page to showDocumentViewControllerImpl.setCurrentPageIndex(int)
public void goToDeltaPage(int delta)
delta
- Signed integer that's added to the current page indexDocumentViewControllerImpl.getCurrentPageIndex()
,
DocumentViewControllerImpl.setCurrentPageIndex(int)
public void updateDocumentView()
public void rotateLeft()
public void rotateRight()
public boolean isDocumentFitMode(int fitMode)
public boolean isDocumentViewMode(int viewMode)
public void setPageViewSinglePageConButton(javax.swing.JToggleButton btn)
public void setPageViewFacingPageConButton(javax.swing.JToggleButton btn)
public void setPageViewSinglePageNonConButton(javax.swing.JToggleButton btn)
public void setPageViewFacingPageNonConButton(javax.swing.JToggleButton btn)
public void setPageFitMode(int fitMode, boolean refresh)
public void setPageViewMode(int viewMode, boolean refresh)
public void setDocumentToolMode(int toolType)
setDocumentToolMode
in interface org.icepdf.core.Controller
public boolean isUtilityPaneVisible()
public void setUtilityPaneVisible(boolean visible)
visible
- true to make the component visible; false to make it
invisible.public void toggleUtilityPaneVisibility()
setUtilityPaneVisible(boolean)
protected boolean safelySelectUtilityPanel(java.awt.Component comp)
comp
- to select
public void showSearchPanel()
setUtilityPaneVisible(boolean)
public void showAnnotationPanel(org.icepdf.core.views.swing.AnnotationComponentImpl selectedAnnotation)
selectedAnnotation
- the annotation to show in the panelsetUtilityPaneVisible(boolean)
public void showPageSelectionDialog()
showPage(int)
protected void applyViewerPreferences(org.icepdf.core.pobjects.Catalog catalog, PropertiesManager propertiesManager)
catalog
- to lookup view preferences frompropertiesManager
- to check properties inpublic ViewModel getViewModel()
ViewModel
public org.icepdf.core.pobjects.Document getDocument()
getDocument
in interface org.icepdf.core.Controller
public int getCurrentPageNumber()
getCurrentPageNumber
in interface org.icepdf.core.Controller
public float getUserRotation()
getUserRotation
in interface org.icepdf.core.Controller
public float getUserZoom()
getUserZoom
in interface org.icepdf.core.Controller
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
public void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
in interface javax.swing.event.TreeSelectionListener
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void dragEnter(java.awt.dnd.DropTargetDragEvent event)
dragEnter
in interface java.awt.dnd.DropTargetListener
public void dragOver(java.awt.dnd.DropTargetDragEvent event)
dragOver
in interface java.awt.dnd.DropTargetListener
public void dropActionChanged(java.awt.dnd.DropTargetDragEvent event)
dropActionChanged
in interface java.awt.dnd.DropTargetListener
public void drop(java.awt.dnd.DropTargetDropEvent event)
drop
in interface java.awt.dnd.DropTargetListener
event
- information about the drag and drop data.public void dragExit(java.awt.dnd.DropTargetEvent event)
dragExit
in interface java.awt.dnd.DropTargetListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- property change event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |