Class ViewerAPI
java.lang.Object
quadbase.reportdesigner.PageViewer.ViewerAPI
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetComponent(Applet applet, QbReport report, long bufferTimeInSec, String securityLevel) Get the Page Viewer as a java.awt.Component.getComponent(Frame frame, QbReport report, long bufferTimeInSec, String securityLevel) Get the Page Viewer as a java.awt.Component.Gets the ReportCanvas object associated with this viewervoidsetBackMenuItemVisible(boolean b) Sets the visibility of the Back Menu Item.voidsetDynamicExport(boolean state, String serverName, int serverPort, String servletDirectory) Sets the attributes for a dynamic export (when using setExportServlet)voidsetExportServlet(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 urlvoidsetGoToMenuItemVisible(boolean b) Sets the visibility of the Go To Menu Item.voidsetMenuVisible(boolean b) Sets the visibility of the Menu.voidsetMultiDrillDownVisible(boolean b) Sets the visibility of Multi Drill Down.voidsetOutputMenuItemVisible(String[] menuItem, boolean b) Sets the visibility of some particular menu item(s) on the Output Menu.voidsetOutputMenuVisible(boolean b) Sets the visibility of the Output Menu.voidsetPageMenuItemVisible(String[] menuItem, boolean b) Sets the visibility of some particular menuitem(s) on the page Menu.voidsetPageMenuVisible(boolean b) Sets the visibility of the Page Menu.voidsetRefreshMenuItemVisible(boolean b) Sets the visibility of the Refresh Menu Item.voidsetSectionMenuItemVisible(String[] menuItem, boolean b) Sets the visibility of some particular menu item(s).voidsetSectionMenuVisible(boolean b) Sets the visibility of the Section Menu.voidsetSortMenuVisible(boolean b) Sets the visibility of the Sort Menu.voidsetToolBarMenuVisible(boolean b) sets the display status of toolbar menu item in popup menuvoidsetZoomMenuItemVisible(boolean b) Sets the visiblilty of zoom menu.
-
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
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
Sets the visibility of some particular menu item(s). -
setPageMenuVisible
public void setPageMenuVisible(boolean b) Sets the visibility of the Page Menu. -
setPageMenuItemVisible
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
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
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 exportserverName- the name of the server with the dynamic export servletsserverPort- the port number of the server with the dynamic export servletsservletDirectory- the servlet context to the server with the dynamic export servlets
-