EspressReport 6.6

quadbase.reportdesigner.PageViewer
Class Viewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by quadbase.reportdesigner.PageViewer.CApplet
                      extended by quadbase.reportdesigner.PageViewer.Viewer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Viewer
extends quadbase.reportdesigner.PageViewer.CApplet

The Viewer 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.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Viewer()
          Allocates a new Viewer Object
 
Method Summary
static java.awt.Component getComponent(java.applet.Applet applet, java.lang.String fileName, long bufferTimeInSec)
          Get the Page Viewer as a java.awt.Component.
static java.awt.Component getComponent(java.applet.Applet applet, java.lang.String fileName, long bufferTimeInSec, java.lang.String securityLevel)
          Get the Page Viewer as a java.awt.Component.
static java.awt.Component getComponent(java.awt.Frame frame, java.lang.String fileName, long bufferTimeInSec)
          Get the Page Viewer as a java.awt.Component.
static java.awt.Component getComponent(java.awt.Frame frame, java.lang.String fileName, 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
static ReportCanvas getReportCanvas(java.applet.Applet applet, java.lang.String fileName, long bufferTimeInSec)
          Get the Page Viewer as ReportCanvas.
static ReportCanvas getReportCanvas(java.applet.Applet applet, java.lang.String fileName, long bufferTimeInSec, java.lang.String securityLevel)
          Get the Page Viewer as ReportCanvas.
static ReportCanvas getReportCanvas(java.awt.Frame frame, java.lang.String fileName, long bufferTimeInSec)
          Get the Page Viewer as ReportCanvas.
static ReportCanvas getReportCanvas(java.awt.Frame frame, java.lang.String fileName, long bufferTimeInSec, java.lang.String securityLevel)
          Get the Page Viewer as ReportCanvas.
static java.lang.String getServletContext()
          Gets the servlet context for EspressManager servlet
 void init()
          internal use only
static void main(java.lang.String[] argv)
          This is the entry point of the Page Viewer application.
 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)
           
 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.
static void setServletContext(java.lang.String context)
          Sets the servlet context for EspressManager servlet
static void setServletRunner(java.lang.String comm_url)
          Set servlet runner hostname and port number Note: this static method MUST be called before any QbChart constructor
 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
static void useServlet(boolean b)
          Determines whether to use SOCKET or HTTP or SERVLET for chart server connection Note that this static method MUST be called before any QbChart constructor.
 
Methods inherited from class quadbase.reportdesigner.PageViewer.CApplet
getContentPane, setBorderLayout
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Viewer

public Viewer()
Allocates a new Viewer Object

Method Detail

init

public void init()
internal use only

Overrides:
init in class java.applet.Applet

main

public static void main(java.lang.String[] argv)
This is the entry point of the Page Viewer application. Pass in a String array of one argument that contains a file name to a .page file to start the application viewing a certain page of a report.
The .page file is what gets streamed by the Report Server to the Page Viewer. You may also use the export() method from QbReport to export specific pages of the report in .page format.


getComponent

public static java.awt.Component getComponent(java.applet.Applet applet,
                                              java.lang.String fileName,
                                              long bufferTimeInSec)
Get the Page Viewer as a java.awt.Component.

Parameters:
applet - a handle to an applet for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.
Returns:
a Component representation of the Page Viewer.

getComponent

public static java.awt.Component getComponent(java.awt.Frame frame,
                                              java.lang.String fileName,
                                              long bufferTimeInSec)
Get the Page Viewer as a java.awt.Component.

Parameters:
frame - a handle to a frame for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.
Returns:
a Component representation of the Page Viewer.

getComponent

public static java.awt.Component getComponent(java.applet.Applet applet,
                                              java.lang.String fileName,
                                              long bufferTimeInSec,
                                              java.lang.String securityLevel)
Get the Page Viewer as a java.awt.Component.

Parameters:
applet - a handle to an applet for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.

getComponent

public static java.awt.Component getComponent(java.awt.Frame frame,
                                              java.lang.String fileName,
                                              long bufferTimeInSec,
                                              java.lang.String securityLevel)
Get the Page Viewer as a java.awt.Component.

Parameters:
frame - a handle to a frame for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.

getReportCanvas

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


getReportCanvas

public static ReportCanvas getReportCanvas(java.applet.Applet applet,
                                           java.lang.String fileName,
                                           long bufferTimeInSec)
Get the Page Viewer as ReportCanvas.

Parameters:
applet - a handle to an applet for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.
Returns:
a ReportCanvas representation of the Page Viewer.

getReportCanvas

public static ReportCanvas getReportCanvas(java.awt.Frame frame,
                                           java.lang.String fileName,
                                           long bufferTimeInSec)
Get the Page Viewer as ReportCanvas.

Parameters:
frame - a handle to a frame for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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.
Returns:
a ReportCanvas representation of the Page Viewer.

getReportCanvas

public static ReportCanvas getReportCanvas(java.applet.Applet applet,
                                           java.lang.String fileName,
                                           long bufferTimeInSec,
                                           java.lang.String securityLevel)
Get the Page Viewer as ReportCanvas.

Parameters:
applet - a handle to an applet for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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 ReportCanvas representation of the Page Viewer.

getReportCanvas

public static ReportCanvas getReportCanvas(java.awt.Frame frame,
                                           java.lang.String fileName,
                                           long bufferTimeInSec,
                                           java.lang.String securityLevel)
Get the Page Viewer as ReportCanvas.

Parameters:
frame - a handle to a frame for viewing, if applicable. Otherwise, use null.
fileName - name of report file to get pages from.
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 ReportCanvas representation of the Page Viewer.

setServletRunner

public static void setServletRunner(java.lang.String comm_url)
Set servlet runner hostname and port number Note: this static method MUST be called before any QbChart constructor

Parameters:
comm_url - servlet runner hostname and port number

useServlet

public static void useServlet(boolean b)
Determines whether to use SOCKET or HTTP or SERVLET for chart server connection Note that this static method MUST be called before any QbChart constructor.

Parameters:
b - If true use SERVLET connection, otherwise use other connection The default value is false.

setServletContext

public static void setServletContext(java.lang.String context)
Sets the servlet context for EspressManager servlet

Parameters:
context - the servlet context

getServletContext

public static java.lang.String getServletContext()
Gets the servlet context for EspressManager servlet

Returns:
context the servlet context

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.


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)

EspressReport 6.6