EspressReport 6.6

quadbase.reportdesigner.PageViewer
Class ViewerAPI

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

public class ViewerAPI
extends java.lang.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 Summary
ViewerAPI()
           
 
Method Summary
 java.awt.Component getComponent(java.applet.Applet applet, QbReport report, long bufferTimeInSec, java.lang.String securityLevel)
          Get the Page Viewer as a java.awt.Component.
 java.awt.Component getComponent(java.awt.Frame frame, QbReport report, long bufferTimeInSec, java.lang.String securityLevel)
          Get the Page Viewer as a java.awt.Component.
 ReportCanvas getReportCanvas()
          Gets the ReportCanvas object associated with this viewer
 void setBackMenuItemVisible(boolean b)
          Sets the visibility of the Back Menu Item.
 void setDynamicExport(boolean state, java.lang.String serverName, int serverPort, java.lang.String servletDirectory)
          Sets the attributes for a dynamic export (when using setExportServlet)
 void setExportServlet(java.lang.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
 void setGoToMenuItemVisible(boolean b)
          Sets the visibility of the Go To Menu Item.
 void setMenuVisible(boolean b)
          Sets the visibility of the Menu.
 void setMultiDrillDownVisible(boolean b)
          Sets the visibility of Multi Drill Down.
 void setOutputMenuItemVisible(java.lang.String[] menuItem, boolean b)
          Sets the visibility of some particular menu item(s) on the Output Menu.
 void setOutputMenuVisible(boolean b)
          Sets the visibility of the Output Menu.
 void setPageMenuItemVisible(java.lang.String[] menuItem, boolean b)
          Sets the visibility of some particular menuitem(s) on the page Menu.
 void setPageMenuVisible(boolean b)
          Sets the visibility of the Page Menu.
 void setRefreshMenuItemVisible(boolean b)
          Sets the visibility of the Refresh Menu Item.
 void setSectionMenuItemVisible(java.lang.String[] menuItem, boolean b)
          Sets the visibility of some particular menu item(s).
 void setSectionMenuVisible(boolean b)
          Sets the visibility of the Section Menu.
 void setSortMenuVisible(boolean b)
          Sets the visibility of the Sort Menu.
 void setToolBarMenuVisible(boolean b)
          sets the display status of toolbar menu item in popup menu
 void setZoomMenuItemVisible(boolean b)
          Sets the visiblilty of zoom menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewerAPI

public ViewerAPI()
Method Detail

getComponent

public java.awt.Component getComponent(java.applet.Applet applet,
                                       QbReport report,
                                       long bufferTimeInSec,
                                       java.lang.String securityLevel)
                                throws java.lang.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:
java.lang.Exception

getComponent

public java.awt.Component getComponent(java.awt.Frame frame,
                                       QbReport report,
                                       long bufferTimeInSec,
                                       java.lang.String securityLevel)
                                throws java.lang.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:
java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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,
                             java.lang.String serverName,
                             int serverPort,
                             java.lang.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

EspressReport 6.6