|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractJPanel
com.crionics.jpdf.viewer.ViewerPanel
public class ViewerPanel
Create a rich GUI panel which shows the RendererPanel, along with the docking framework (toolbars, bookmarks, wizards..etc) and the bottom status bar. The component is i18 compliant and has all the methods to show/hide docking windows and toolbars.
| Field Summary |
|---|
| Fields inherited from interface com.crionics.jpdf.viewer.IViewer |
|---|
PAGELAYOUT_1X1, PAGELAYOUT_2X1, PAGELAYOUT_2X2, PAGEZOOM_FITPAGE, PAGEZOOM_FITWIDTH |
| Constructor Summary | |
|---|---|
ViewerPanel()
Constructor |
|
| Method Summary | |
|---|---|
void |
addPageEventListener(IPageEvent listener)
This method can be used to trap user click positions on a given page. |
boolean |
closeDocument()
Closes the current displayed document. |
boolean |
getDetailPanelVisibility()
return true if the detail panel is visible |
boolean |
getDrawingToolBarVisibility()
Return the status of the drawing toolbar |
boolean |
getFormFieldToolBarVisibility()
returns the status of the forms toolbar |
boolean |
getIOToolBarVisibility()
Return the status of the io toolbar |
boolean |
getMessagesPanelVisibility()
return true if the message panel is visible |
boolean |
getNavigationToolBarVisibility()
Return the status of the navigation toolbar |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Returns the page format in page space. |
int |
getPageIndex()
Returns the current displayed page index. |
int |
getPageLayout()
Returns the current page layout. |
int |
getPageRotation()
return the page orientation. typically, 0,90,180 or 270 |
int |
getPageZoom()
returns the current zoom factor applied to the page. the integer value is a percentage. |
int |
getPageZoomMode()
returns the zoom mode, either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH |
PdfDocument |
getPdfDocument()
returns the underlying PDF document, or null if none displayed |
boolean |
getSelectorsToolBarVisibility()
Return the status of the selectors toolbar |
boolean |
getWizardPanelVisibility()
return true if the wizard panel is visible |
boolean |
isDocumentLoaded()
return true if document is loaded and displayed |
void |
printCurrentPage()
Shows a dialog to print the current page. |
void |
printDocument()
Shows a dialog to print the document. |
void |
printPageRange(int startIndex,
int endIndex)
Shows a dialog to print a page range. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Internal method used to handle GUI events. |
void |
setDetailPanelVisibility(boolean showPanel)
shows or hides the detail panel. |
void |
setDocument(java.io.File filePath)
Loads and Displays the given document in the rendering panel. |
void |
setDocument(java.io.File pathToPDF,
ICredentials credentials)
Displays the given document in the rendering panel using the given credentials. |
void |
setDocument(PdfDocument thedoc)
Loads and Displays the given document in the rendering panel. |
void |
setDrawingToolBarVisibility(boolean showToolbar)
Shows/Hides the Drawing Toolbar. |
void |
setFormFieldToolBarVisibility(boolean showToolbar)
Shows/Hides the Form Fields Toolbar. |
void |
setFullScreenMode()
Forces the viewer to fullscreen mode. |
void |
setIOToolBarVisibility(boolean showToolbar)
shows/hides the IO Toolbar. |
void |
setMessagesPanelVisibility(boolean showPanel)
shows or hides the message panel. |
void |
setNavigationToolBarVisibility(boolean showToolbar)
Shows/Hides the Navigation Toolbar. |
void |
setPageIndex(int pageNumber)
Forces the renderer to display the given page index. |
void |
setPageLayout(int n)
Changes how many pages are displayed per screen. |
void |
setPageRotation(int rotation)
Sets the page orientation. |
void |
setPageZoom(int percentage)
Sets the zoom factor. the value is a percentage. the zoom factor interpretation is heavily dependent on the zoom mode. |
void |
setPageZoomMode(int mode)
Sets the zoom mode, either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH. |
void |
setSelectorsToolBarVisibility(boolean showToolbar)
Shows/Hides the Selectors Toolbar. |
void |
setWizardPanelVisibility(boolean showPanel)
shows or hides the wizards panel. |
void |
setZoomTo(int pageIndex,
java.awt.geom.Point2D location,
int zoomFactor)
Centers the viewer scroll panel to the given page index, point location and zoom factor. |
void |
setZoomToArea(int pageIndex,
java.awt.geom.Point2D upperLeft,
java.awt.geom.Point2D bottomRight)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViewerPanel()
| Method Detail |
|---|
public void addPageEventListener(IPageEvent listener)
listener - the event listenerpublic boolean closeDocument()
IViewer
closeDocument in interface IViewerpublic boolean getDetailPanelVisibility()
public boolean getDrawingToolBarVisibility()
public boolean getFormFieldToolBarVisibility()
public boolean getIOToolBarVisibility()
public boolean getMessagesPanelVisibility()
public boolean getNavigationToolBarVisibility()
public int getPageIndex()
IViewer
getPageIndex in interface IViewer
public int getPageLayout()
throws PdfException
IViewer
getPageLayout in interface IViewerPdfException - pdf related issuespublic int getPageRotation()
IViewer
getPageRotation in interface IViewer
public int getPageZoom()
throws PdfException
IViewer
getPageZoom in interface IViewerPdfException - pdf related issues
public int getPageZoomMode()
throws PdfException
IViewer
getPageZoomMode in interface IViewerPdfException - pdf related issuespublic PdfDocument getPdfDocument()
IViewer
getPdfDocument in interface IViewerpublic boolean getSelectorsToolBarVisibility()
public boolean getWizardPanelVisibility()
public boolean isDocumentLoaded()
IViewer
isDocumentLoaded in interface IViewerpublic void setDocument(PdfDocument thedoc)
IViewer
setDocument in interface IViewer
public void printCurrentPage()
throws PdfException
IViewer
printCurrentPage in interface IViewerPdfExceptionpublic void printDocument()
IViewer
printDocument in interface IViewer
public void printPageRange(int startIndex,
int endIndex)
IViewer
printPageRange in interface IViewerstartIndex - start page index [1,+]endIndex - end page index [1,+]public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void setDetailPanelVisibility(boolean showPanel)
showPanel - true to show the panel
public void setDocument(java.io.File filePath)
throws java.io.IOException,
PdfException,
PdfAuthException
IViewer
setDocument in interface IViewerfilePath - path to the document
java.io.IOException - issue related to io and caching
PdfException - issue related to PDF
PdfAuthException - issue with authentication
public void setDocument(java.io.File pathToPDF,
ICredentials credentials)
throws java.io.IOException,
PdfException,
PdfAuthException
IViewer
setDocument in interface IViewerpathToPDF - path to the document, if null - the current document is
closed.credentials - password or certificate credentials to open the document
java.io.IOException - issue related to io and caching
PdfException - issue related to PDF
PdfAuthException - issue with authenticationpublic void setDrawingToolBarVisibility(boolean showToolbar)
showToolbar - true if the toolbar is visiblepublic void setFormFieldToolBarVisibility(boolean showToolbar)
showToolbar - true if the toolbar is visiblepublic void setFullScreenMode()
public void setIOToolBarVisibility(boolean showToolbar)
showToolbar - true if the toolbar is visiblepublic void setMessagesPanelVisibility(boolean showPanel)
showPanel - true to show the panelpublic void setNavigationToolBarVisibility(boolean showToolbar)
showToolbar - true if the toolbar is visiblepublic void setPageIndex(int pageNumber)
IViewer
setPageIndex in interface IViewerpageNumber - the page index to display
public void setPageLayout(int n)
throws PdfException
IViewer
setPageLayout in interface IViewern - 1,2 (2x1) or 4 (2x2)
PdfException - pdf related issuespublic void setPageRotation(int rotation)
IViewer
setPageRotation in interface IViewerrotation - the page rotation is degrees, typically 0,90,180 or 270public void setPageZoom(int percentage)
IViewer
setPageZoom in interface IViewerpercentage - an integer value which represents a zoom percentage.
public void setPageZoomMode(int mode)
throws PdfException
IViewer
setPageZoomMode in interface IViewermode - either PAGEZOOM_FITPAGE or PAGEZOOM_FITWIDTH
PdfException - pdf related issuespublic void setSelectorsToolBarVisibility(boolean showToolbar)
showToolbar - true if the toolbar is visiblepublic void setWizardPanelVisibility(boolean showPanel)
showPanel - true to show the panel
public java.awt.print.PageFormat getPageFormat(int pageIndex)
throws PdfException,
java.io.IOException
IViewer
getPageFormat in interface IViewerpageIndex - the page index [1 to max]
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.
public void setZoomTo(int pageIndex,
java.awt.geom.Point2D location,
int zoomFactor)
throws PdfException,
java.io.IOException
IViewer
setZoomTo in interface IViewerpageIndex - the index of the page to zoom onto [1, max]location - the location in PageSpace of the point to center onzoomFactor - zoom factor to , use -1 to set unchanged
PdfException
java.io.IOException
public void setZoomToArea(int pageIndex,
java.awt.geom.Point2D upperLeft,
java.awt.geom.Point2D bottomRight)
throws PdfException,
java.io.IOException
setZoomToArea in interface IViewerpageIndex - the index of the page to zoom onto [1, max]
PdfException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||