jet.bean
Class JRCltPreViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by jet.bean.JRCltPreViewer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Externalizable, java.io.Serializable, javax.accessibility.Accessible

public class JRCltPreViewer
extends java.awt.Panel
implements java.io.Externalizable

This JRCltPreViewer bean provides methods to prepare a report to run so the user can select parameters and the application set the catalog and report name rather than let the user choose it.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int vDebug
          Indicates to open the debug log.
static int vError
          Indicates to open the error log.
static int vOff
          Indicates to close the debug and error logs.
 
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
JRCltPreViewer()
          The default constructor.
 
Method Summary
 void exit()
           
 java.lang.String getFullCatalogName()
          Gets the full catalog name relative to the resource directory in JReport Server.
 java.lang.String getFullPath()
          Gets the full path for JReport Servlet.
 java.util.Locale getLocale()
          Gets the locale.
 java.awt.Dimension getMinimumSize()
           
 java.lang.String getPassword()
          Gets the password to log in to JReport Server.
 boolean getPopupErrorDialog()
          Get the value about whether to pop up the error message dialog.
 boolean getPopupParamDialog()
          Gets the status of whether to pop up the parameter dialog when running a report.
 java.lang.String getPort()
          Gets the port number of the server.
 java.awt.Dimension getPreferredSize()
           
 java.lang.String getReportName()
          Gets the report name relative to the catalog directory in JReport Server.
 java.util.Vector getReportParams()
          Gets the parameters of the current report.
 java.lang.String getServerName()
          Gets the server name or IP address where the report runs.
 boolean getSSL()
          Gets current SSL states
 java.lang.String getStatus()
          Gets the status after an action.
 java.lang.String getUserName()
          Gets the user name to log in to JReport Server.
 void logout()
          Enables to log out from JReport Server.
 void prepareRun()
          Launches to run JReport Viewer Bean.
 void readExternal(java.io.ObjectInput in)
           
 void setFullPath(java.lang.String fullPath)
          Sets the full path for JReport Servlet.
 void setLanguage(java.lang.String rptLanguage)
          Sets the language and converts to a Locale object.
 void setLocale(java.util.Locale loc)
          Sets the locale.
 boolean setLogFile(java.lang.String fileName)
          Sets the log file path and name.
 void setPassword(java.lang.String password)
          Sets the password to log in to JReport Server.
 void setPopupErrorDialog(boolean isPopErrorDialog)
          Allows users to set whether to pop up the error message dialog when an Exception occurs.
 void setPopupParamDialog(boolean bPopupDialog)
          Indicates whether to pop up the parameter dialog when running a report.
 void setPort(java.lang.String port)
          Sets the port number of the server.
 void setServerName(java.lang.String serverName)
          Sets the server name or IP address.
 void setShowInfoLevel(int level)
          Enables/disables output error and debug message.
 void setSSL(boolean SSL)
          Sets the connection to use SSL or not
 void setUserName(java.lang.String userName)
          Sets the user name to log in to JReport Server.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, 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, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vOff

public static final int vOff
Indicates to close the debug and error logs.

See Also:
Constant Field Values

vDebug

public static final int vDebug
Indicates to open the debug log.

See Also:
Constant Field Values

vError

public static final int vError
Indicates to open the error log.

See Also:
Constant Field Values
Constructor Detail

JRCltPreViewer

public JRCltPreViewer()
The default constructor.

Method Detail

setPopupParamDialog

public void setPopupParamDialog(boolean bPopupDialog)
Indicates whether to pop up the parameter dialog when running a report.

Parameters:
bPopupDialog - if it is true, the parameter dialog will be activated.

getPopupParamDialog

public boolean getPopupParamDialog()
Gets the status of whether to pop up the parameter dialog when running a report.


setPopupErrorDialog

public void setPopupErrorDialog(boolean isPopErrorDialog)
Allows users to set whether to pop up the error message dialog when an Exception occurs.

Parameters:
isPopup, - the value "true" indicates to pop up error message dialog, otherwise do not pop up.

getPopupErrorDialog

public boolean getPopupErrorDialog()
Get the value about whether to pop up the error message dialog.

Parameters:
isPopup, - the value "true" indicates to pop up error message dialog, otherwise do not pop up.

setServerName

public void setServerName(java.lang.String serverName)
Sets the server name or IP address.

Parameters:
serverName - the name of the server where the report runs.

getServerName

public java.lang.String getServerName()
Gets the server name or IP address where the report runs.

Returns:
serverName the name or address of current server.

setPort

public void setPort(java.lang.String port)
Sets the port number of the server.

Parameters:
port - the port number of the server.

getPort

public java.lang.String getPort()
Gets the port number of the server.

Returns:
the port number of the server.

setLocale

public void setLocale(java.util.Locale loc)
Sets the locale.

Overrides:
setLocale in class java.awt.Component

setLanguage

public void setLanguage(java.lang.String rptLanguage)
Sets the language and converts to a Locale object.


getLocale

public java.util.Locale getLocale()
Gets the locale.

Overrides:
getLocale in class java.awt.Component

setFullPath

public void setFullPath(java.lang.String fullPath)
Sets the full path for JReport Servlet.

Parameters:
fullPath - if you access JReport Servlet, you must set the servlet path, for example, setFullPath("/jrserver");

getFullPath

public java.lang.String getFullPath()
Gets the full path for JReport Servlet.

Returns:
the full path.

setUserName

public void setUserName(java.lang.String userName)
Sets the user name to log in to JReport Server. If a valid user name is not provided a dialog will prompt the user to enter one.

Parameters:
userName - the user name to log in to JReport Server.

getUserName

public java.lang.String getUserName()
Gets the user name to log in to JReport Server.

Returns:
the user name to log in to JReport Server.

setPassword

public void setPassword(java.lang.String password)
Sets the password to log in to JReport Server. If a valid password is not provided a dialog will prompt the user to enter one.

Parameters:
password - the password to log in to JReport Server.

getPassword

public java.lang.String getPassword()
Gets the password to log in to JReport Server.

Returns:
the password to log in to JReport Server.

prepareRun

public void prepareRun()
Launches to run JReport Viewer Bean.


getReportParams

public java.util.Vector getReportParams()
Gets the parameters of the current report.

Returns:
a Vector, each element in this Vector is a jet.cs.Param.

getFullCatalogName

public java.lang.String getFullCatalogName()
Gets the full catalog name relative to the resource directory in JReport Server.


getReportName

public java.lang.String getReportName()
Gets the report name relative to the catalog directory in JReport Server.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class java.awt.Container

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Container

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

exit

public void exit()

logout

public void logout()
Enables to log out from JReport Server.


getStatus

public java.lang.String getStatus()
Gets the status after an action.


setShowInfoLevel

public void setShowInfoLevel(int level)
Enables/disables output error and debug message.

Parameters:
level - the debug level, for example, vDebug | vError

setLogFile

public boolean setLogFile(java.lang.String fileName)
Sets the log file path and name.

LogFileName specifies where the debug, error and other information will go. LogFileName contains both the path and the file name. If no path is specified, the current path is used. If no file name is specified, the file jreport.log is used

Parameters:
fileName - the log file name
Returns:
true if successful

setSSL

public void setSSL(boolean SSL)
Sets the connection to use SSL or not

Parameters:
SSL - boolean, indicates whether to use SSL connection

getSSL

public boolean getSSL()
Gets current SSL states

Returns:
boolean, indicates the current SSL states