|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJViewerRenderer
com.crionics.jpdf.viewer.RendererPanel
public final class RendererPanel
A simple PDF Rendering panel which only shows the document in a scroll panel.
The component is aimed at programmers: it doesn't provide any visual elements
to rotate, zoom, browse or layout pages.
| Field Summary |
|---|
| Fields inherited from interface com.crionics.jpdf.viewer.IViewer |
|---|
PAGELAYOUT_1X1, PAGELAYOUT_2X1, PAGELAYOUT_2X2, PAGEZOOM_FITPAGE, PAGEZOOM_FITWIDTH |
| Constructor Summary | |
|---|---|
RendererPanel()
Constructor |
|
| Method Summary | |
|---|---|
boolean |
closeDocument()
Closes the current displayed document. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Used internally to process UI events. |
int |
getPageCount()
|
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 |
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 |
setDocument(java.io.File pathToPDF)
Loads and Displays the given document in the rendering panel. |
void |
setDocument(java.io.File pathToPDF,
ICredentials credentials)
IMPORTANT: the loading is ASYNCHRONOUS, please use the method isDocumentLoaded() to check when to document is completely rendered. |
void |
setDocument(PdfDocument thedoc)
Loads and Displays the given document in the rendering panel. |
void |
setPageIndex(int pageNumber)
Forces the renderer to display the given page index. |
void |
setPageLayout(int layout)
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.crionics.jpdf.viewer.IViewer |
|---|
getPageFormat, setZoomTo, setZoomToArea |
| Constructor Detail |
|---|
public RendererPanel()
| Method Detail |
|---|
public boolean closeDocument()
IViewer
closeDocument in interface IViewer
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
public int getPageCount()
throws PdfException
PdfException
public int getPageIndex()
throws PdfException
IViewer
getPageIndex in interface IViewerPdfException
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 isDocumentLoaded()
IViewer
isDocumentLoaded in interface IViewer
public void setDocument(PdfDocument thedoc)
throws PdfException
IViewer
setDocument in interface IViewerPdfException - issue related to PDF
PdfAuthException - issue with authentication
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 setDocument(java.io.File pathToPDF)
throws java.io.IOException,
PdfException,
PdfAuthException
IViewer
setDocument in interface IViewerpathToPDF - 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
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 setPageIndex(int pageNumber)
IViewer
setPageIndex in interface IViewerpageNumber - the page index to display
public void setPageLayout(int layout)
throws PdfException
IViewer
setPageLayout in interface IViewerlayout - 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 issues
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||