Class ViewerAPI

java.lang.Object
quadbase.reportdesigner.PageViewer.ViewerAPI

public class ViewerAPI extends Object
The ViewerAPI class is the entry point in using the Page Viewer to view a report. The Page Viewer provides the mechanism to view the report page by page, and in doing so, minimizes the amount of resources needed on the client application. The idea is that Espress Manager is being ran at some server and the client terminal simply requests to view a certain page of a report. This puts the client in a situation where it only need to worry about drawing and displaying the report on screen.
  • Constructor Details

    • ViewerAPI

      public ViewerAPI()
  • Method Details

    • getComponent

      public Component getComponent(Applet applet, QbReport report, long bufferTimeInSec, String securityLevel) throws Exception
      Get the Page Viewer as a java.awt.Component.
      Parameters:
      applet - a handle to a frame for viewing, if applicable. Otherwise, use null.
      report - a QbReport object.
      bufferTimeInSec - this controls how often to get new pages from the Espress Manager. It looks at the local version of the .page file (if available), and if the time since it is last updated exceeds the bufferTimeInSec parameter, then new version of the page is requested again from Espress Manager. Otherwise it uses the local version of the .page file. If the local version of the .page file does not exist, it gets the page from the Espress Manager.
      securityLevel - the name of a security level to use for this Page Viewer. The security level name must already exist and set up in the report.
      Returns:
      a Component representation of the Page Viewer.
      Throws:
      Exception
    • getComponent

      public Component getComponent(Frame frame, QbReport report, long bufferTimeInSec, String securityLevel) throws Exception
      Get the Page Viewer as a java.awt.Component.
      Parameters:
      frame - a handle to a frame for viewing, if applicable. Otherwise, use null.
      report - a QbReport object.
      bufferTimeInSec - this controls how often to get new pages from the Espress Manager. It looks at the local version of the .page file (if available), and if the time since it is last updated exceeds the bufferTimeInSec parameter, then new version of the page is requested again from Espress Manager. Otherwise it uses the local version of the .page file. If the local version of the .page file does not exist, it gets the page from the Espress Manager.
      securityLevel - the name of a security level to use for this Page Viewer. The security level name must already exist and set up in the report.
      Returns:
      a Component representation of the Page Viewer.
      Throws:
      Exception
    • getReportCanvas

      public ReportCanvas getReportCanvas()
      Gets the ReportCanvas object associated with this viewer
    • setMenuVisible

      public void setMenuVisible(boolean b)
      Sets the visibility of the Menu.
    • setSectionMenuVisible

      public void setSectionMenuVisible(boolean b)
      Sets the visibility of the Section Menu.
    • setSectionMenuItemVisible

      public void setSectionMenuItemVisible(String[] menuItem, boolean b)
      Sets the visibility of some particular menu item(s).
    • setPageMenuVisible

      public void setPageMenuVisible(boolean b)
      Sets the visibility of the Page Menu.
    • setPageMenuItemVisible

      public void setPageMenuItemVisible(String[] menuItem, boolean b)
      Sets the visibility of some particular menuitem(s) on the page Menu.
    • setOutputMenuVisible

      public void setOutputMenuVisible(boolean b)
      Sets the visibility of the Output Menu.
    • setOutputMenuItemVisible

      public void setOutputMenuItemVisible(String[] menuItem, boolean b)
      Sets the visibility of some particular menu item(s) on the Output Menu.
    • setBackMenuItemVisible

      public void setBackMenuItemVisible(boolean b)
      Sets the visibility of the Back Menu Item.
    • setRefreshMenuItemVisible

      public void setRefreshMenuItemVisible(boolean b)
      Sets the visibility of the Refresh Menu Item.
    • setGoToMenuItemVisible

      public void setGoToMenuItemVisible(boolean b)
      Sets the visibility of the Go To Menu Item.
    • setSortMenuVisible

      public void setSortMenuVisible(boolean b)
      Sets the visibility of the Sort Menu.
    • setMultiDrillDownVisible

      public void setMultiDrillDownVisible(boolean b)
      Sets the visibility of Multi Drill Down.
    • setZoomMenuItemVisible

      public void setZoomMenuItemVisible(boolean b)
      Sets the visiblilty of zoom menu.
    • setToolBarMenuVisible

      public void setToolBarMenuVisible(boolean b)
      sets the display status of toolbar menu item in popup menu
    • setExportServlet

      public void setExportServlet(String url)
      Sets the url to the ViewerExportServlet, which is used for exporting to a servlet that streams back content to the client via a browser url
      Parameters:
      url - the url to the servlet, for example: "http://localhost:8080/servlet/ViewerExportServlet"
    • setDynamicExport

      public void setDynamicExport(boolean state, String serverName, int serverPort, String servletDirectory)
      Sets the attributes for a dynamic export (when using setExportServlet)
      Parameters:
      state - whether to use dynamic export
      serverName - the name of the server with the dynamic export servlets
      serverPort - the port number of the server with the dynamic export servlets
      servletDirectory - the servlet context to the server with the dynamic export servlets