Package net.sf.jasperreports.swing
Class JRViewerController
- java.lang.Object
-
- net.sf.jasperreports.swing.JRViewerController
-
- Direct Known Subclasses:
JRDesignViewerController
public class JRViewerController extends Object
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isXML
protected JasperPrint
jasperPrint
protected boolean
reloadSupported
protected RenderersCache
renderersCache
protected String
reportFileName
protected int
type
protected static int
TYPE_FILE_NAME
protected static int
TYPE_INPUT_STREAM
protected static int
TYPE_OBJECT
-
Constructor Summary
Constructors Constructor Description JRViewerController(Locale locale, ResourceBundle resBundle)
JRViewerController(JasperReportsContext jasperReportsContext, Locale locale, ResourceBundle resBundle)
-
Method Summary
-
-
-
Field Detail
-
TYPE_FILE_NAME
protected static final int TYPE_FILE_NAME
- See Also:
- Constant Field Values
-
TYPE_INPUT_STREAM
protected static final int TYPE_INPUT_STREAM
- See Also:
- Constant Field Values
-
TYPE_OBJECT
protected static final int TYPE_OBJECT
- See Also:
- Constant Field Values
-
type
protected int type
-
isXML
protected boolean isXML
-
reportFileName
protected String reportFileName
-
reloadSupported
protected boolean reloadSupported
-
jasperPrint
protected JasperPrint jasperPrint
-
renderersCache
protected RenderersCache renderersCache
-
-
Constructor Detail
-
JRViewerController
public JRViewerController(Locale locale, ResourceBundle resBundle)
-
JRViewerController
public JRViewerController(JasperReportsContext jasperReportsContext, Locale locale, ResourceBundle resBundle)
-
-
Method Detail
-
addListener
public void addListener(JRViewerListener listener)
-
removeListener
public boolean removeListener(JRViewerListener listener)
-
fireListeners
protected void fireListeners(int eventCode)
-
setReport
protected void setReport(String fileName, boolean isXmlReport) throws JRException
- Throws:
JRException
-
loadReport
public void loadReport(String fileName, boolean isXmlReport) throws JRException
- Throws:
JRException
-
setReport
protected void setReport(InputStream is, boolean isXmlReport) throws JRException
- Throws:
JRException
-
loadReport
public void loadReport(InputStream is, boolean isXmlReport) throws JRException
- Throws:
JRException
-
loadReport
public void loadReport(JasperPrint jrPrint)
-
reload
public void reload()
-
hasPages
public boolean hasPages()
-
refreshPage
public void refreshPage()
-
forceRefresh
protected void forceRefresh()
-
setZoomRatio
public void setZoomRatio(float newZoom)
-
setPageIndex
public void setPageIndex(int index)
-
getJasperReportsContext
public JasperReportsContext getJasperReportsContext()
-
getResourceBundle
public ResourceBundle getResourceBundle()
-
getLocale
public Locale getLocale()
-
getJasperPrint
public JasperPrint getJasperPrint()
-
getPrintParts
public PrintParts getPrintParts()
-
getPageCount
public int getPageCount()
-
getPageFormat
public PrintPageFormat getPageFormat()
-
getRenderersCache
protected RenderersCache getRenderersCache()
-
clear
public void clear()
-
getPageIndex
public int getPageIndex()
-
getZoom
public float getZoom()
-
isReloadSupported
public boolean isReloadSupported()
-
isFitPage
public boolean isFitPage()
-
isFitWidth
public boolean isFitWidth()
-
fitPage
public void fitPage()
-
fitWidth
public void fitWidth()
-
-