Style Intelligence v12.0

inetsoft.sree.viewer
Class Viewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by inetsoft.sree.viewer.Viewer
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class Viewer
extends JFrame

Java replet viewer.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Viewer(RepletRepository repo)
          Create a replet viewer and use the specified repository as the server.
Viewer(String protocol, Object url)
          Create a replet viewer.
 
Method Summary
 void addWindow(String title, ViewFrame win)
          Add a sub-window to the viewer mdi.
 ViewFrame createViewFrame(String name, RepletRepository repo)
          Create a new ViewFrame.
 void dispose()
          Close the viewer window.
 ViewFrame getCurrentFrame()
          Get the current report frame instance.
 Dimension getPreferredSize()
          The previewer defaults to full screen size.
 Principal getPrincipal()
          Get the user assigned principal.
 RepletRepository getRepletRepository()
          Get the repository server.
 Principal login()
          Show login dialog.
static void main(String[] args)
          Run viewer as a standalone program to view a saved report.
 void openRepository()
          Popup the open repository dialog.
protected  File promptFile(String title, boolean load, inetsoft.util.gui.ReportFileFilter obj)
          Prompt for a file.
 void removeWindow(ViewFrame win)
          Remove a window from mdi.
 void setAppletContext(AppletContext applet)
          Set the applet context if this viewer is launched from an applet.
protected  void setEnabled()
          Set the enable flags of controls.
 void setExitOnClose(boolean exitit)
          If the ExitOnClose is set to true, the Previewer exits from the application when the previewer window is closed.
 void setPreferredFrameSize(Dimension pref)
          Set the preferred frame size.
 void setPreferredSize(Dimension size)
          Set the preferred size of the previewer window.
 void setPrincipal(Principal principal)
          Set the principal to use for requests to the repository server.
 void setRepletRepository(RepletRepository repo)
          Set the repository server.
 void showMessage(String msg)
          Show a message in a message dialog.
 ViewFrame showReplet(Object id)
          Show a replet in a viewer window.
 ViewFrame showReplet(String name, RepletRequest req)
          Show a replet in a viewer window.
 void showStatus(String msg)
          Show status on the status bar.
 void showURL(String url, String target)
          Show the document in a browser window.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

Viewer

public Viewer(String protocol,
              Object url)
       throws Exception
Create a replet viewer.

Parameters:
protocol - the protocol used to connect to the server. Acceptable protocols are: 'rmi' and 'corba'. The url is the RMI server URL or the ORB object if the protocol is 'corba'. If no value protocol is passed, a local AnalyticEngine is created.
Throws:
Exception

Viewer

public Viewer(RepletRepository repo)
Create a replet viewer and use the specified repository as the server.

Method Detail

createViewFrame

public ViewFrame createViewFrame(String name,
                                 RepletRepository repo)
Create a new ViewFrame.

Parameters:
name - name of the frame.
repo - repository server proxy.
Returns:
new ViewFrame window.

setPrincipal

public void setPrincipal(Principal principal)
Set the principal to use for requests to the repository server.


setAppletContext

public void setAppletContext(AppletContext applet)
Set the applet context if this viewer is launched from an applet.


setRepletRepository

public void setRepletRepository(RepletRepository repo)
Set the repository server.

Parameters:
repo - repository object (proxy).

getRepletRepository

public RepletRepository getRepletRepository()
Get the repository server.


getCurrentFrame

public ViewFrame getCurrentFrame()
Get the current report frame instance.


showReplet

public ViewFrame showReplet(String name,
                            RepletRequest req)
Show a replet in a viewer window.

Parameters:
name - replet name.
req - replet request.

showReplet

public ViewFrame showReplet(Object id)
Show a replet in a viewer window.

Parameters:
id - replet ID. The replet must already be generated on server.

showURL

public void showURL(String url,
                    String target)
Show the document in a browser window.

Parameters:
url - URL string.
target - target frame.

getPrincipal

public Principal getPrincipal()
Get the user assigned principal.


setPreferredFrameSize

public void setPreferredFrameSize(Dimension pref)
Set the preferred frame size. The default is 780x580.


setExitOnClose

public void setExitOnClose(boolean exitit)
If the ExitOnClose is set to true, the Previewer exits from the application when the previewer window is closed.


getPreferredSize

public Dimension getPreferredSize()
The previewer defaults to full screen size.

Overrides:
getPreferredSize in class Container

setPreferredSize

public void setPreferredSize(Dimension size)
Set the preferred size of the previewer window.

Overrides:
setPreferredSize in class Component

dispose

public void dispose()
Close the viewer window.

Overrides:
dispose in class Window

showStatus

public void showStatus(String msg)
Show status on the status bar.


openRepository

public void openRepository()
Popup the open repository dialog. This is same as user clicking on the repository tool button.


promptFile

protected File promptFile(String title,
                          boolean load,
                          inetsoft.util.gui.ReportFileFilter obj)
Prompt for a file.

Parameters:
title - dialog title.
load - true if loading a file, otherwise is saving a file.

setEnabled

protected void setEnabled()
Set the enable flags of controls.


showMessage

public void showMessage(String msg)
Show a message in a message dialog.


addWindow

public void addWindow(String title,
                      ViewFrame win)
Add a sub-window to the viewer mdi.


removeWindow

public void removeWindow(ViewFrame win)
Remove a window from mdi.


login

public Principal login()
                throws Exception
Show login dialog.

Throws:
Exception

main

public static void main(String[] args)
Run viewer as a standalone program to view a saved report. The report file must be saved with the Builder.REPORT option.
   Usage:  java inetsoft.sree.viewer.Viewer -rmi RMI-URL [-nologin | {-u uid -p passwd}] [-replet replet-name] report
 


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.