Class Viewer
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
quadbase.reportdesigner.PageViewer.swing.CApplet
quadbase.reportdesigner.PageViewer.swing.Viewer
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible,RootPaneContainer
public class Viewer
extends quadbase.reportdesigner.PageViewer.swing.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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JApplet
JApplet.AccessibleJAppletNested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleAppletNested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanelNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentgetComponent(Applet applet, String fileName, long bufferTimeInSec) Get the Page Viewer as a java.awt.Component.static ComponentgetComponent(Applet applet, String fileName, long bufferTimeInSec, String securityLevel) Get the Page Viewer as a java.awt.Component.static ComponentgetComponent(Frame frame, String fileName, long bufferTimeInSec) Get the Page Viewer as a java.awt.Component.static ComponentgetComponent(Frame frame, String fileName, long bufferTimeInSec, String securityLevel) Get the Page Viewer as a java.awt.Component.Gets the ReportCanvas object associated with this viewerstatic ReportCanvasgetReportCanvas(Applet applet, String fileName, long bufferTimeInSec) Get the Page Viewer as ReportCanvas.static ReportCanvasgetReportCanvas(Applet applet, String fileName, long bufferTimeInSec, String securityLevel) Get the Page Viewer as ReportCanvas.static ReportCanvasgetReportCanvas(Frame frame, String fileName, long bufferTimeInSec) Get the Page Viewer as ReportCanvas.static ReportCanvasgetReportCanvas(Frame frame, String fileName, long bufferTimeInSec, String securityLevel) Get the Page Viewer as ReportCanvas.static StringGets the servlet context for EspressManager servletvoidinit()internal use onlystatic voidThis is the entry point of the Page Viewer application.voidsetBackMenuItemVisible(boolean b) Sets the visibility of the Back Menu Item.voidsetDynamicExport(boolean state, String serverName, int serverPort, String servletDirectory) 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.static voidsetServletContext(String context) Sets the servlet context for EspressManager servletstatic voidsetServletRunner(String comm_url) Set servlet runner hostname and port number Note: this static method MUST be called before any QbChart constructorvoidsetSortMenuVisible(boolean b) Sets the visibility of the Sort Menu.voidsetToolBarMenuVisible(boolean b) sets the display status of toolbar menu item in popup menustatic voiduseServlet(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.swing.CApplet
add, add, setBorderLayoutMethods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stopMethods inherited from class java.awt.Container
add, add, add, addContainerListener, 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, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
Viewer
public Viewer()Allocates a new Viewer Object
-
-
Method Details
-
init
public void init()internal use only -
main
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
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
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 Component getComponent(Applet applet, String fileName, long bufferTimeInSec, 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 Component getComponent(Frame frame, String fileName, long bufferTimeInSec, 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
Gets the ReportCanvas object associated with this viewer -
getReportCanvas
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
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(Applet applet, String fileName, long bufferTimeInSec, 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(Frame frame, String fileName, long bufferTimeInSec, 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
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
Sets the servlet context for EspressManager servlet- Parameters:
context- the servlet context
-
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
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. -
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
-