net.sf.jasperreports.swing

## Class JRViewerController

- java.lang.Object
- - net.sf.jasperreports.swing.JRViewerController

-     public class JRViewerController
      extends java.lang.Object

  Version:
    $Id: JRViewerController.java 6886 2014-02-11 15:03:09Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `isXML`
    `protected boolean` | `reloadSupported`
    `protected java.lang.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 and Description
    `JRViewerController(JasperReportsContext jasperReportsContext, java.util.Locale locale, java.util.ResourceBundle resBundle)`
    `JRViewerController(java.util.Locale locale, java.util.ResourceBundle resBundle)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(JRViewerListener listener)`
    `void` | `clear()`
    `protected void` | `fireListeners(int eventCode)`
    `void` | `fitPage()`
    `void` | `fitWidth()`
    `protected void` | `forceRefresh()`
    `java.lang.String` | `getBundleString(java.lang.String key)`
    `JasperPrint` | `getJasperPrint()`
    `JasperReportsContext` | `getJasperReportsContext()`
    `java.util.Locale` | `getLocale()`
    `int` | `getPageCount()`
    `int` | `getPageIndex()`
    `java.util.ResourceBundle` | `getResourceBundle()`
    `float` | `getZoom()`
    `boolean` | `hasPages()`
    `boolean` | `isFitPage()`
    `boolean` | `isFitWidth()`
    `boolean` | `isReloadSupported()`
    `void` | `loadReport(java.io.InputStream is, boolean isXmlReport)`
    `void` | `loadReport(JasperPrint jrPrint)`
    `void` | `loadReport(java.lang.String fileName, boolean isXmlReport)`
    `void` | `refreshPage()`
    `void` | `reload()`
    `boolean` | `removeListener(JRViewerListener listener)`
    `void` | `setPageIndex(int index)`
    `void` | `setZoomRatio(float newZoom)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 java.lang.String reportFileName

    - #### reloadSupported

          protected boolean reloadSupported

  - ### Constructor Detail

    - #### JRViewerController

          public JRViewerController(java.util.Locale locale,
                            java.util.ResourceBundle resBundle)

      See Also:
        `JRViewerController(JasperReportsContext, Locale, ResourceBundle)`

    - #### JRViewerController

          public JRViewerController(JasperReportsContext jasperReportsContext,
                            java.util.Locale locale,
                            java.util.ResourceBundle resBundle)

  - ### Method Detail

    - #### addListener

          public void addListener(JRViewerListener listener)

    - #### removeListener

          public boolean removeListener(JRViewerListener listener)

    - #### fireListeners

          protected void fireListeners(int eventCode)

    - #### loadReport

          public void loadReport(java.lang.String fileName,
                        boolean isXmlReport)
                          throws JRException

      Throws:
        `JRException`

    - #### loadReport

          public void loadReport(java.io.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 java.util.ResourceBundle getResourceBundle()

    - #### getLocale

          public java.util.Locale getLocale()

    - #### getBundleString

          public java.lang.String getBundleString(java.lang.String key)

    - #### getJasperPrint

          public JasperPrint getJasperPrint()

    - #### getPageCount

          public int getPageCount()

    - #### 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()

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com