com.iisc.jwc.jsheet
Class JSClient

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended bycom.iisc.jwc.jsheet.JSClient
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.datatransfer.ClipboardOwner, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
JSClientSession

public class JSClient
extends java.applet.Applet
implements java.awt.datatransfer.ClipboardOwner

Title:
JSClient.java
Description:
Applet/Application for JavaSheet

See Also:
Serialized Form

Field Summary
static int PROTECTION_GRANT
          The grant protection bit flag.
static int PROTECTION_LOCKED
          The locked protection bit flag.
static int PROTECTION_READ
          The read protection bit flag.
static int PROTECTION_SAVE
          The save protection bit flag.
static int PROTECTION_WRITE
          The write protection bit flag.
 
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
JSClient()
          Constructs a JSClient applet.
JSClient(java.lang.String[] args)
          Launches JSClient as an application.
 
Method Summary
 boolean aboutDlg()
          Displays an About dialog box.
 void addBookListener(BookListener l)
          Adds the specified book listener to receive book events.
 void addBookProtection(java.lang.String userOrGroup, int permission)
          Adds protection settings for the book.
 void addNotify()
          Notifies this component that it has been added to a container and if a peer is required, it should be created.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the specified property change listener to receive property events.
 void addProtection(Range range, java.lang.String userOrGroup, int permission)
          Adds protection settings to a range of cells.
 void addSessionListener(SessionListener l)
          Adds the specified session listener to receive session events.
 void addSheetListener(SheetListener l)
          Adds the specified sheet listener to receive sheet events.
 int addSheetObserver(Range range)
          Adds a new sheet observer to the range and sheet specified.
 int addSheetObserver(Range range, boolean cacheOnServer, int updateInterval)
          Adds a new sheet observer to the range and sheet specified.
 void addSheetProtection(short sheetIndex, java.lang.String userOrGroup, int permission)
          Adds protection settings for the sheet.
 void broadcastMessage(java.lang.String user, java.lang.String msg)
          Broadcasts a message to other clients.
 boolean chartsDlg()
          Displays a dialog box for listing charts.
 void clear(Range range)
          Clears all of the data and formatting in the current selection(s).
 void clearData(Range range)
          Clears all of the cell data in the current range.
 boolean clearDlg()
          Displays the Clear dialog box.
 void clearFormat(Range range)
          Clears all of the cell formatting in the current range.
 void clearFormula(Range range)
          Clears formulas, leaving the formula results and all of the formatting intact.
 void closeBook()
          Closes the current book.
 boolean closeBookChecked()
          Closes the book after checking for saving changes.
 boolean closeBookCheckedSelectableDlg(boolean cancelInDlg)
          Closes the book after checking for saving changes.
 java.lang.String colorToHTMLColor(java.awt.Color color)
          Converts a Color value to HTML representation of the color.
 void connect(java.lang.String host, java.lang.String user, java.lang.String pwd)
          Connects to the server.
 boolean connectDlg()
          Displays a dialog box that allows the user to connect to a specific server.
 java.util.Vector convertDBRowSetToDBRow(JSDbRowSet dbRowSet, int index)
          Utility method to convert a DBRowSet into a vector of data objects in the row.
 void copy(Range range)
          Puts a copy of the text and formatting contained in range on the clipboard.
 void copy(short sheetIdx, Range range)
          Puts a copy of the text and formatting contained in range on the clipboard.
 void copyDown(Range range)
          Copies the data and formatting in the top row(s) of the selected range(s) of the current sheet to the bottom of the selected range(s).
 void copyDown(short sheetIdx, Range range)
          Copies the data and formatting in the top row(s) of the selected range(s) of the specified sheet to the bottom of the selected range(s).
 void copyRight(Range range)
          Copies the data and formatting in the left column(s) of the selected range(s) to the right of the selected range(s).
 java.lang.Object createObject(java.lang.String className)
          Creates a Java object based on the string passed in.
 java.lang.Object createObject(java.lang.String className, java.util.Vector argTypesVector, java.util.Vector argValuesVector)
          Creates a Java object based on the string passed in.
 void cut(Range range)
          Similiar to clear, except a copy is placed on the clipboard.
 JSDatabase dbConnect(java.lang.String dbName, java.lang.String userName, java.lang.String password)
          Connects to a database on the server.
 void dbDisconnect(JSDatabase db)
          Disconnects from this database on the server.
 void deleteBook(java.lang.String name)
          Deletes the book on the server.
 void deleteChart(java.lang.String name)
          Deletes the chart from the sheet.
 void deleteLeft(Range range)
          Removes the specified range from the sheet by shifting cells left that are to the right of the range.
 void deleteSheet(java.lang.String name)
          Deletes a sheet from the book.
 void deleteUp(Range range)
          Removes the specified range from the sheet by shifting cells up that are below the range.
 void destroy()
          Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated.
 void determinant(Range range, Cell output)
          Calculates the determinant of the given range and outputs it to the given cell.
 void disconnect()
          Disconnects from the server.
 boolean disconnectDlg()
          Closes the book after checking for saving changes.
 void distribute(Range values, Range bin)
          Performs a frequency distribution on the values and bin range.
 void errorMsg(java.lang.String str)
          Displays an error message dialog box.
 void errorMsgForException(com.iisc.jwc.orb.CException e)
          FOR INTERNAL USE ONLY!
 void errorMsgForException(JSException e)
          Displays an error message dialog box.
 JSEvaluateValue evaluate(short sheetIndex, java.lang.String formula)
          Evaluates an expression or function.
 void executeScript(java.lang.String text)
          Executes this text as a script on the server.
 Cell find(java.lang.String text, int type)
          Returns the cell that contains the text specified.
 Cell findAgain()
          Returns the cell that contains the text specified.
 boolean formatCellsDlg()
          Displays the Format Cells dialog box.
 Cell getActiveCell()
          Returns the current active cell.
 short getActiveSheet()
          Returns the current active sheet.
 java.awt.Color getBGColor()
          Returns the background color of the current sheet.
 int getBGColorBlue()
          Returns the blue portion of the background color of the current sheet.
 int getBGColorGreen()
          Returns the green portion of the background color of the current sheet.
 int getBGColorRed()
          Returns the red portion of the background color of the current sheet.
 java.lang.String getBookName()
          Returns the simple filename of the book (no path information).
 java.lang.String getBookPassword()
          Returns the password setting, if any, for opening a book.
 int getCacheSize()
          Returns the number of rows and columns to be cached in each direction.
static int getCallTimeout()
          Gets the current timeout for all of the communications with the server.
 java.lang.String getCellDisplay(Cell cell)
          Returns the displayed text of the cell at row, column.
 java.lang.String getCellEntry(Cell cell)
          Returns the value of the cell at row, column.
 java.lang.String getCellHTML(Cell cell, int flags)
          Returns the data in this cell as HTML.
 double getCellNumber(Cell cell)
          Returns the number of the cell at row, column.
 CellStyle getCellStyle(Cell cell)
          Returns the CellStyle object of the specified cell.
 java.lang.String getCellText(Cell cell)
          Returns the data in this cell as a string.
 JSValue getCellValue(Cell cell)
          Returns the data in this cell as a JSValue object.
 byte[] getChartAsBytes(java.lang.String name, int imgType, short sheetIdx)
          Returns chart bytes based on the chart name.
 java.awt.Image getChartAsImage(java.lang.String name, int imgType, short sheetIdx)
          Returns the chart image based on the chart name.
 java.lang.String[] getChartList()
          Gets the list of all of the chart names that exist in the sheet.
 java.util.Vector getChartListAsVector()
          Gets the list of all of the chart names that exist in the sheet.
 int getColWidth(int col)
          Returns the column width, in pixels, for the specified column in the active sheet.
 int getColWidth(int col, short sheetIndex)
          Returns the column width, in pixels, for the specified column in the specified sheet.
 boolean getConnectAtStartup()
          Returns whether JSClient will attempt to connect at startup.
 java.lang.String[] getDatabases()
          Returns an array of database names to which you can connect.
 java.util.Vector getDatabasesAsVector()
          Returns a Vector of database names to which you can connect.
 int getDefaultColWidth()
          Returns the default column width of the current sheet.
 int getDefaultRowHeight()
          Returns the default row height of the current sheet.
 com.iisc.jwc.orb.FileInfo[] getFileList(int mode, java.lang.String wildcard, java.lang.String path)
          FOR INTERNAL USE ONLY!
 java.util.Vector getFileListAsVector(int mode, java.lang.String wildcard, java.lang.String path)
          FOR INTERNAL USE ONLY!
 java.lang.String getFileName()
          Returns the relative path and name of the book.
 Cell getFreezePaneCell()
          Returns the upper left frozen cell in the current sheet.
 java.awt.Color getGridLineColor()
          Returns the grid line color of the current sheet.
 boolean getHeadingStyleR1C1()
          Returns the state of the row and column heading style.
 java.lang.String getHostName()
          Returns the host name for this session.
 short getInitialSheet()
          Returns the index of the initial sheet.
 int getInputCell(Cell cell1, Cell cell2)
          Returns the number of input cells that are set.
 Cell getLastCell(short sheetIndex, int type, int roworcol)
          Returns the largest cell that is needed to contain all of the data in the sheet.
 boolean getLoadbalance()
          Returns the status of loadbalance.
 int getMyPermissionOnBook()
          Returns the book permission settings for the current user.
 int getMyPermissionOnCell(short sheetIndex, Cell cell)
          Returns the permission settings for the current user for a specified cell within a specified sheet.
 int getMyPermissionOnSheet(short sheetIndex)
          Returns the sheet permission settings for the current user on the requested sheet.
 Range getNamedRange(java.lang.String name)
          Returns the range for the specified named range.
 java.lang.String[] getNamedRanges()
          Returns an array of all of the range names for the sheet.
 java.util.Vector getNamedRangesAsVector()
          Returns a Vector of all of the range names for the sheet.
 com.iisc.jwc.orb.FileInfo[] getOpenBookList()
          FOR INTERNAL USE ONLY!
 java.util.Vector getOpenBookListAsVector()
          FOR INTERNAL USE ONLY!
 int getOpenMode()
          Returns the sharing mode for a new book.
 boolean getOpenNewBook()
          Returns the setting to create or open a new book.
 java.lang.String getOpenSheet()
          Returns the sheet to start on when a book is opened.
 Protection[] getPermissionsOnBook()
          Returns the array of permissions settings for the book.
 Protection[] getPermissionsOnSheet(short sheetIndex)
          Returns the array of permission settings for the specified sheet.
 java.util.Vector getPermissionsVectorOnBook()
          Returns the vector of permission values for the book.
 java.util.Vector getPermissionsVectorOnSheet(short sheetIndex)
          Returns the vector of permission values for the specified sheet.
 int getPort()
          Returns the port number on which the server is listening.
 Sheet getPrintableSheet()
          Returns the current sheet.
 java.lang.String[] getRangeDisplay(Range range)
          Returns the displayed text of the range.
 java.util.Vector getRangeDisplayAsVector(Range range)
          Returns the displayed text of the range.
 java.lang.String getRangeHTML(Range range, int flags)
          Returns the data in this range as HTML.
 int getRecalcIterationNumber()
          Returns the recalculation iteration number.
 boolean getRecalcMode()
          Returns the recalculation mode.
 int getRecalcType()
          Returns the recalculation type.
 int getRowHeight(int row)
          Returns the row height, in pixels, for the specified row in the active sheet.
 int getRowHeight(int row, short sheetIndex)
          Returns the row height, in pixels, for the specified row, in the specified sheet.
 Range getSelection()
          Returns the range of the first selection.
 Range[] getSelections()
          Returns an array of the ranges that compose the current selection in the sheet.
 java.util.Vector getSelectionsAsVector()
          Returns a vector of the ranges that compose the current selection in the sheet.
 int getSheetCount()
          Returns the number of sheets in this book.
 short getSheetIndexForName(java.lang.String sheetname)
          Returns the sheet index for a sheet name.
 java.lang.String getSheetName()
          Returns the name of the current sheet.
 java.lang.String getSheetNameAt(short index)
          Returns the name of the sheet at the specified index.
 java.lang.String[] getSheetNames()
          Returns an array of all of the sheet names in this book.
 java.util.Vector getSheetNamesAsVector()
          Returns a Vector of all of the sheet names in this book.
 Range getSheetWorkArea()
          Returns the work area for the current worksheet.
 boolean getShowCellGrid()
          Returns the state of the cell grid display.
 boolean getShowExceptions()
          Returns the state of whether or not to show exceptions.
 boolean getShowFormatBar()
          Returns the state of the display of the format bar.
 boolean getShowFormulaBar()
          Returns the state of the display of the formula bar.
 boolean getShowFreezePane()
          Returns the state of the freeze pane display.
 boolean getShowGridComponents()
          Returns whether or not the visible grid is being used.
 boolean getShowHeadings()
          Returns the state of the headings display.
 boolean getShowInfoDialogs()
          Returns whether error and informational dialog boxes should be shown.
 boolean getShowPopupMenu()
          Returns whether the context menu can be shown.
 boolean getShowStatusBar()
          Returns the state of the display of the status bar.
 SortKeys[] getSortKeys()
          Returns the array of sort keys.
 java.util.Vector getSortKeysAsVector()
          Returns the sort keys as a vector.
 Range getSortRange()
          Returns the sort range.
 Range getTableRange()
          Returns the table range.
 boolean getThrowExceptions()
          Returns the state of whether or not to throw exceptions.
 int getTimeout()
          Returns the server/client timeout, in seconds.
 Cell getTopLeftCell()
          Returns the cell that is currently at the top left corner of the visible area of the grid.
 java.lang.String getTracking()
          Returns the current setting for cell tracking.
 java.awt.Color getTrackingDownColor()
          Returns the color used when cell values decrease.
 int getTrackingDuration()
          Returns the interval number (in seconds) the cell will be displayed as the tracking color.
 java.awt.Color getTrackingUpColor()
          Returns the color used when cell values increase.
 java.lang.String[] getUserList()
          Returns a list of the users who are sharing this book.
 java.util.Vector getUserListAsVector()
          Returns, as a Vector, a list of users sharing this book.
 java.lang.String getUserName()
          Returns the current user name for this session.
 java.lang.String getUserPassword()
          Returns the current user password for this session.
 java.lang.String[] getUsersForBook(java.lang.String bookname)
          Returns the list of users currently observing this book.
 java.util.Vector getUsersForBookAsVector(java.lang.String bookname)
          Returns the list of users currently observing this book.
 void init()
          Called by the browser or applet viewer to inform this applet that it has been loaded into the system.
 void insertBeforeSheet(java.lang.String existingSheetName, java.lang.String newSheetName)
          Inserts a new sheet in front of an existing sheet.
 void insertDown(Range range)
          In the specified column(s) of the range, to make room for inserted blank cells, shift cells down.
 void insertRight(Range range)
          In the specified row(s) of the range, to make room for inserted blank cells, shift cells to the right.
 void insertSheetAt(short index, java.lang.String name)
          Inserts a sheet into the book.
 void invert(Range range, Range outputRange)
          Inverts the specified worksheet range (matrix) using the Gauss-Jordan method.
 boolean isBookOpen()
          Returns true if a book is open.
 boolean isConnected()
          Returns true if connected to the server; false otherwise.
 boolean isLoggedOn()
          Returns true if connected and logged on to the server; false otherwise.
 boolean isPasswordSet(boolean readWrite)
          Returns whether the requested password is set for this book.
 boolean isPasteAble()
          Returns true if there is something on the clipboard to paste.
 boolean isRedoAble()
          Returns whether the last command is redoable.
 boolean isSpecialPasteAble()
          Returns true if there are cells on the clipboard to paste.
 boolean isUndoAble()
          Returns whether the last command is undoable.
 void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
          Notifies this object that it is no longer the owner of the contents of the clipboard.
static void main(java.lang.String[] args)
          Runs JSheet as a standalone application.
 void messageSender()
          Displays a dialog box that sends messages to other users that share the same workbook.
 void messageSenderSelectRecipient(java.lang.String user)
          FOR INTERNAL USE ONLY!
 void modifySheetObserver(int index, Range range)
          Modifies the sheet observer with the given index.
 boolean moveSheetDlg()
          Displays a dialog box for reordering sheets.
 void moveSheetTo(java.lang.String from, short to)
          Moves a sheet from one location to another in the book.
 void multiply(Range range1, Range range2, Range outputRange)
          Multiplies two specified ranges (matrices) to produce a third range (matrix).
 void newBook(java.lang.String bookname, int bookmode)
          Creates a new workbook.
 void newBook(java.lang.String bookname, int bookmode, java.lang.String templatename, java.lang.String templatepwd, boolean publicread, boolean publicwrite, boolean publicsave)
          Creates a new workbook.
 boolean newBookDlg()
          Displays the New Book dialog box.
 void newBookFromTemplate(java.lang.String templatename, java.lang.String templatepwd)
          Creates a new workbook using a template.
 void newBookFromTemplate(java.lang.String bookname, java.lang.String templatename, java.lang.String templatepwd, int bookmode)
          Creates a new workbook from a template.
 void newCachedBook(java.lang.String bookname, int bookmode, java.lang.String templatename, java.lang.String templatepwd, boolean publicread, boolean publicwrite, boolean publicsave, boolean cacheOnServer, int updateInterval)
          Creates a new server-cached workbook.
 void newCachedBookFromTemplate(java.lang.String bookname, java.lang.String templatename, java.lang.String templatepwd, int bookmode, boolean cacheOnServer, int updateInterval)
          Creates a new cached workbook from a template.
 java.lang.String newChart(java.lang.String cdfFileName, java.lang.String cdfText, Range range, int width, int height)
          Creates a new chart based on the chart definition file and returns the name of the chart.
 byte[] newChartAsBytes(java.lang.String cdfFileName, java.lang.String cdfText, Range range, int width, int height)
          Creates a new chart based on the chart definition file.
 java.awt.Image newChartAsImage(java.lang.String cdfFileName, java.lang.String cdfText, Range range, int width, int height)
          Creates a new chart based on the chart definition file.
 void nsolve(Range range, Range outputRange)
          Solves a system of simultaneous linear equations.
 void openBook(java.lang.String name, int mode, java.lang.String pwd)
          Opens a book and returns the book object.
 boolean openBookDlg()
          Displays the open book dialog box.
 void openBookGetPwd(java.lang.String name, int mode)
          Opens a book and prompts for password if necessary.
 void openCachedBook(java.lang.String name, int mode, java.lang.String pwd, boolean cacheOnServer, int updateInterval)
          Opens a book and returns the book object.
 java.util.Vector paste(Range range)
          Pastes information from the clipboard into the sheet.
 Range[] pasteArray(Range[] ranges)
          Pastes information from the clipboard into the specified ranges.
 void pasteSpecial(Range range, int type)
          Pastes data from the clipboard into the sheet.
 void pasteSpecial(short sheetIdx, Range range, int type)
          Pastes data from the clipboard into the sheet.
 boolean pasteSpecialDlg()
          Displays the paste special dialog box.
 java.util.Vector pasteVector(java.util.Vector ranges)
          Pastes information from the clipboard into the specified ranges.
 void print(java.awt.Graphics g)
          Prints this component.
 void printSelectedSheetRange()
          Prints the current sheet range selection.
 void printSheet()
          Prints the current sheet.
 void processBookEvent(BookEvent e)
          Processes all of the book listener events.
 void processSessionEvent(SessionEvent e)
          Processes all of the session listener events.
 void processSheetEvent(SheetEvent e)
          Processes all of the sheet listener events.
 void propsDlg()
          Displays a dialog box for setting properties.
 void recalc()
          Recalculates the workbook as soon as possible.
 void recalcNow()
          Recalculates the entire workbook immediately.
 void recalcRange(Range range)
          Recalculates the specified range.
 void recalcTable()
          Recalculates the current What If data table.
 Range[] redo(SheetHolder sheetHolder)
          Redoes the last undo.
 void regress(Range range1, Range range2, Range range3)
          Performs multiple linear regression analysis on a selected worksheet range.
 void releaseCallback(org.omg.CORBA.Object callbackObj)
          Releases the callback object from the ORB.
 void removeBookListener(BookListener l)
          Removes the specified book listener so it no longer receives book events.
 void removeBookProtection(java.lang.String userOrGroup, int permission)
          Removes the protection settings for the book.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the specified property change listener.
 void removeProtection(Range range, java.lang.String userOrGroup, int permission)
          Removes the protection settings from a range of cells.
 void removeRangeName(java.lang.String name)
          Removes the specified range name.
 void removeSessionListener(SessionListener l)
          Removes the specified session listener so it no longer receives session events.
 void removeSheetListener(SheetListener l)
          Removes the specified sheet listener so it no longer receives sheet events.
 void removeSheetObserver(int index)
          Removes the sheet observer with the given index.
 void removeSheetProtection(short sheetIndex, java.lang.String userOrGroup, int permission)
          Removes protection settings for the sheet.
 void removeSortKeys()
          Removes the sort keys.
 void renameRangeName(java.lang.String currentName, java.lang.String newName)
          Renames the specified range name.
 boolean renameSheetDlg()
          Displays a dialog box for renaming a sheet.
 int replaceAll(java.lang.String findText, java.lang.String replaceText, int type)
          Replaces all of the text in the sheet based on the parameters.
static void resetCallTimeout()
          Resets the current timeout to the default.
 boolean saveAsDlg()
          Displays the Save As dialog box.
 void saveBook()
          Saves the current book on the server.
 void saveBookAsType(int type, java.lang.String name)
          Saves this book under a different name and/or type.
 void scrollToView(int row, int col)
          Scrolls the current sheet so that the cell specified by the given row and column will be visible.
 void setActiveCell(Cell cell)
          Sets the given row and column as the current cell.
 void setActiveSheet(short sheet)
          Sets the current active sheet.
 void setActiveSheetUsingString(java.lang.String sheetname)
          Sets the current active sheet.
 void setBGColor(java.awt.Color color)
          Sets the background color for the current sheet.
 void setBGColor(int red, int green, int blue)
          Sets the background color for the current sheet.
 void setBookPassword(java.lang.String passwd)
          Sets the password to be used when opening a book.
 void setCacheSize(int cacheSize)
          Sets the number of rows and columns to be cached in each direction.
static void setCallTimeout(int secs)
          Sets the timeout for all of the communications with the server.
 void setCellEntry(Cell cell, java.lang.String data)
          Sets the value of the cell.
 void setCellNumber(Cell cell, double num)
          Sets the value of the cell as a number.
 void setCellStyleForCell(Cell cell, CellStyle style)
          Sets the style for the given cell.
 void setCellStyleForRange(Range range, CellStyle style)
          Sets the style for the cells within the given range.
 void setCellText(Cell cell, java.lang.String text)
          Sets the value of the cell as a string.
 void setCellValue(Cell cell, JSValue value)
          Sets the value of the cell as a JSValue object.
 void setColWidth(int start, int end, int size)
          Sets the column widths.
 void setConnectAtStartup(boolean connectAtStartup)
          Sets whether JSClient will attempt to connect at startup.
 void setFileName(java.lang.String name)
          Sets the relative path and name of the book.
 void setFreezePaneCell(Cell cell)
          Sets the freeze pane in the current sheet.
 void setGridLineColor(java.awt.Color color)
          Sets the grid line color for the current sheet.
 void setHeadingStyleR1C1(boolean set)
          Sets the state of the row and column heading style.
 void setHostName(java.lang.String host)
          Sets the host name for the JSClient object to be created.
 void setInitialSheet(short index)
          Sets the specified sheet as the initial sheet.
 void setInputCell(int count, Cell cell1, Cell cell2)
          Defines the input cells for one-variable and two-variable What If tables.
 void setLoadbalance(boolean state)
          Sets whether to take advantage of server load balancing.
 void setMessageSenderPopupState(boolean sd)
          FOR INTERNAL USE ONLY!
 void setMessageViewerPopupState(boolean sd)
          FOR INTERNAL USE ONLY!
 void setNamedRange(java.lang.String name, Range range)
          Defines a name for a range.
 void setOpenMode(java.lang.String mode)
          Sets the sharing mode for a new book.
 void setOpenNewBook(boolean set)
          Sets to true to automatically create a new book when launching this applet.
 void setOpenSheet(java.lang.String sheet)
          Sets the sheet to open.
 void setPassword(java.lang.String readWrite, java.lang.String readOnly, boolean encryption)
          Sets the password for this book.
 void setPort(int port)
          Sets the port number for this session.
 void setRangeEntryUsingArray(Range range, java.lang.Object[] values)
          Sets the range values.
 void setRangeEntryUsingVector(Range range, java.util.Vector values)
          Sets the range values.
 void setRangeNumberUsingArray(Range range, java.lang.Number[] numbers)
          Sets the range values with numbers.
 void setRangeNumberUsingVector(Range range, java.util.Vector numbers)
          Sets the range values with numbers.
 void setRangeTextUsingArray(Range range, java.lang.String[] values)
          Sets the range values as text data.
 void setRangeTextUsingVector(Range range, java.util.Vector values)
          Sets the range values as text data.
 void setRangeValuesUsingArray(Range range, JSValue[] values)
          Sets the range values from the array of JSValue objects.
 void setRangeValuesUsingVector(Range range, java.util.Vector values)
          Sets the range values from the Vector of JSValue objects.
 void setRecalcIterationNumber(int number)
          Sets the recalculation iteration number.
 void setRecalcIterationRange(Range range, int number, int maximum)
          Sets the recalculation iteration range.
 void setRecalcMode(boolean auto)
          Sets the recalculation mode.
 void setRecalcType(int type)
          Sets the recalculation type.
 void setRowHeight(int start, int end, int size)
          Sets the row height.
 void setSelectionUsingRange(Range range)
          Sets the current selection to the specified range.
 void setSelectionUsingRanges(Range[] ranges)
          Sets the current selection to the specified group of ranges.
 void setSheetNameAt(short index, java.lang.String name)
          Changes the name of the sheet at this index.
 void setSheetWorkArea(Range range)
          Sets the work area range for the current sheet.
 void setShowCellGrid(boolean set)
          Sets the visible state of the cell grid.
 void setShowExceptions(boolean state)
          Sets the state of whether or not to show exceptions.
 void setShowFormatBar(boolean set)
          Shows the format bar as a part of this applet.
 void setShowFormatBarFlag(boolean set)
          Sets the format bar flag, but does not set the format bar
 void setShowFormulaBar(boolean set)
          Shows the formula bar as a part of this applet.
 void setShowFormulaBarFlag(boolean set)
          Sets the formula bar flag, but does not set the formula bar
 void setShowFreezePane(boolean set)
          Sets the visible state of the freeze panes.
 void setShowGridComponents(boolean use)
          Determines whether to use the visible grid when launching the applet.
 void setShowHeadings(boolean set)
          Sets the display state of the headings.
 void setShowInfoDialogs(boolean set)
          Determines if error or informational dialog boxes should be displayed.
 void setShowPopupMenu(boolean set)
          Allows the display of the context menu bar as part of this applet.
 void setShowStatusBar(boolean set)
          Shows the status bar as a part of this applet.
 void setShowStatusBarFlag(boolean set)
          Sets the status bar flag, but does not set the status bar.
 void setSortKeys(java.util.Vector sortKeys)
          Sets the sort keys.
 void setSortRange(Range range)
          Sets the sort range.
 void setStatusMsg(java.lang.String str)
          Displays the string in the status bar, if it is visible.
 void setTableRange(Range range)
          Sets the data table range to the specified range.
 void setThrowExceptions(boolean state)
          Sets the state of whether or not to throw exceptions.
 void setTimeout(int seconds)
          Sets the number of seconds to wait before timing out a call from the client to the server.
 void setTopLeftCell(int row, int col)
          Scrolls the current sheet so that the cell specified by the given row and column will be visible in the top left cell of the grid.
 void setTracking(java.lang.String track)
          Sets cell tracking for this applet.
 void setTrackingDownColor(java.awt.Color color)
          Sets the color used when cell values decrease.
 void setTrackingDuration(int duration)
          Sets the interval number (in seconds) for notification that a cell has changed.
 void setTrackingUpColor(java.awt.Color color)
          Sets the color used when cell values increase.
 void setUserName(java.lang.String name)
          Sets the user name for the JSClient object to be created.
 void setUserPassword(java.lang.String password)
          Sets the user password for the JSClient object to be created.
 void sortNow(boolean byRow)
          Sorts the sheet according to the sort keys set for this sheet.
 void start()
          Called by the browser or applet viewer to inform this applet that it should start its execution.
 void stop()
          Called by the browser or applet viewer to inform this applet that it should stop its execution.
 void throwException(com.iisc.jwc.orb.CException ce, boolean javascript)
          FOR INTERNAL USE ONLY!
 void throwException(JSException ce, boolean javascript)
          Throws Java and JavaScript exceptions.
 Range transpose(Range range)
          Transposes the data in the specified worksheet range.
 Range[] undo(SheetHolder sheetHolder)
          Undoes the last command.
 void warningMsg(java.lang.String str)
          Displays a warning dialog box.
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, 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, isOpaque, 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, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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

PROTECTION_GRANT

public static final int PROTECTION_GRANT
The grant protection bit flag.

See Also:
Constant Field Values

PROTECTION_LOCKED

public static final int PROTECTION_LOCKED
The locked protection bit flag.

See Also:
Constant Field Values

PROTECTION_READ

public static final int PROTECTION_READ
The read protection bit flag.

See Also:
Constant Field Values

PROTECTION_SAVE

public static final int PROTECTION_SAVE
The save protection bit flag.

See Also:
Constant Field Values

PROTECTION_WRITE

public static final int PROTECTION_WRITE
The write protection bit flag.

See Also:
Constant Field Values
Constructor Detail

JSClient

public JSClient()
Constructs a JSClient applet. The applet parameters are automatically detected.


JSClient

public JSClient(java.lang.String[] args)
         throws java.lang.Exception
Launches JSClient as an application.
Command Line ArgumentDescription
booknameThe workbook filename
bookpasswordThe workbook password
sheetnameThe workbook sheet name
templatenameTemplate name for a new workbook
opennewbookOpen a new workbook
openmodeBook open mode (exclusive|shared)
saveableDefault for exit save status
connectAttempt to connect on start-up
showformulabarDisplay the formula bar
showstatusbarDisplay the status bar
showformatbarDisplay the format bar
publicreadNew book read access (true|false)
publicwriteNew book write access (true|false)
publicsaveNew book save access (true|false)
hidepopupmenuDo not show popup menus
hideinfodialogsDo not show information dialog boxes
hideexceptionsDo not show exception message windows
hidegridcomponentsDo not initially hide the grid
throwexceptionsEnable throwing exceptions
trackingCell update tracking (None|Background|Background Fade|Foreground|Foreground Fade)
trackingdurationThe cell tracking duration (seconds)
trackingupTracking up color (HTML color reference)
trackingdownTracking down color (HTML color reference)
hostThe server host name
portThe server port number
userThe user login name
passwordThe user login password
timeoutConnection timeout value (seconds)
bindtypeBind type (orbixd|listen|file|ior|url)
iorrefIOR reference string
identityUnique identity for the applet in a page
poolconnectionMultiple applets share connection
loadbalanceIndicate whether to take advantage of server load balancing

Parameters:
args - Command line arguments.
Throws:
java.lang.Exception - Used to indicate that the "usage" has been presented to the user or bad option(s).
Method Detail

aboutDlg

public boolean aboutDlg()
Displays an About dialog box.

Returns:
Always returns true.

addBookListener

public void addBookListener(BookListener l)
Adds the specified book listener to receive book events.

Parameters:
l - The book listener.

addBookProtection

public void addBookProtection(java.lang.String userOrGroup,
                              int permission)
                       throws JSException
Adds protection settings for the book.

Parameters:
userOrGroup - The user or group name for which to set protection.
permission - The permission setting for the book as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

addNotify

public void addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created. This method should be called by Container.add, and not by user code directly.


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the specified property change listener to receive property events.

Parameters:
l - The property change listener.

addProtection

public void addProtection(Range range,
                          java.lang.String userOrGroup,
                          int permission)
                   throws JSException
Adds protection settings to a range of cells.

Parameters:
range - The range on which to set protection.
userOrGroup - The user or group name for which to set protection.
permission - The permission setting for the range as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

addSessionListener

public void addSessionListener(SessionListener l)
Adds the specified session listener to receive session events.

Parameters:
l - The session listener.

addSheetListener

public void addSheetListener(SheetListener l)
Adds the specified sheet listener to receive sheet events.

Parameters:
l - The sheet listener.

addSheetObserver

public int addSheetObserver(Range range)
                     throws JSException
Adds a new sheet observer to the range and sheet specified.

Parameters:
range - The range reference.
Returns:
Index of the observer, use this index for removeSheetObserver.
Throws:
JSException - An exception occurred while communicating with the server.

addSheetObserver

public int addSheetObserver(Range range,
                            boolean cacheOnServer,
                            int updateInterval)
                     throws JSException
Adds a new sheet observer to the range and sheet specified.

Parameters:
range - The range reference.
cacheOnServer - If true, the server will only send cells that have changed.
updateInterval - throttle updates so there is a minimum of updateinterval seconds between each update.
Returns:
Index of the observer, use this index for removeSheetObserver.
Throws:
JSException - An exception occurred while communicating with the server.
Since:
JSheet 1.1b41

addSheetProtection

public void addSheetProtection(short sheetIndex,
                               java.lang.String userOrGroup,
                               int permission)
                        throws JSException
Adds protection settings for the sheet.

Parameters:
sheetIndex - The index of the sheet.
userOrGroup - The user or group name for which to set protection.
permission - The permission setting for the sheet as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

broadcastMessage

public void broadcastMessage(java.lang.String user,
                             java.lang.String msg)
                      throws JSException
Broadcasts a message to other clients.

Parameters:
user - the recipient.
msg - the message to broadcast.
Throws:
JSException - An exception occurred while communicating with the server.

chartsDlg

public boolean chartsDlg()
                  throws JSException
Displays a dialog box for listing charts.

Returns:
True if no errors.
Throws:
JSException - An exception occurred while communicating with the server.

clear

public void clear(Range range)
           throws JSException
Clears all of the data and formatting in the current selection(s).

Parameters:
range - The range to clear.
Throws:
JSException - An exception occurred while communicating with the server.

clearData

public void clearData(Range range)
               throws JSException
Clears all of the cell data in the current range.

Parameters:
range - The range to clear.
Throws:
JSException - An exception occurred while communicating with the server.

clearDlg

public boolean clearDlg()
                 throws JSException
Displays the Clear dialog box.

Returns:
True if the selected range is cleared; otherwise false.
Throws:
JSException - An exception occurred while communicating with the server.

clearFormat

public void clearFormat(Range range)
                 throws JSException
Clears all of the cell formatting in the current range.

Parameters:
range - The range to clear.
Throws:
JSException - An exception occurred while communicating with the server.

clearFormula

public void clearFormula(Range range)
                  throws JSException
Clears formulas, leaving the formula results and all of the formatting intact.

Parameters:
range - The range to clear.
Throws:
JSException - An exception occurred while communicating with the server.

closeBook

public void closeBook()
               throws JSException
Closes the current book.

Throws:
JSException - An exception occurred while communicating with the server.

closeBookChecked

public boolean closeBookChecked()
                         throws JSException
Closes the book after checking for saving changes.

Returns:
true if the book was closed.
Throws:
JSException - An exception occurred while communicating with the server.

closeBookCheckedSelectableDlg

public boolean closeBookCheckedSelectableDlg(boolean cancelInDlg)
                                      throws JSException
Closes the book after checking for saving changes.

Parameters:
cancelInDlg - indicates the dialog should have a cancel button.
Returns:
true if the book was closed.
Throws:
JSException - An exception occurred while communicating with the server.

colorToHTMLColor

public java.lang.String colorToHTMLColor(java.awt.Color color)
Converts a Color value to HTML representation of the color.

Parameters:
color - The original color.
Returns:
The HTML string representation of the color.

connect

public void connect(java.lang.String host,
                    java.lang.String user,
                    java.lang.String pwd)
             throws JSException
Connects to the server.

Parameters:
host - Hostname to which to connect.
user - User name to connect as.
pwd - User password.
Throws:
JSException - An exception occurred while connecting to the server.

connectDlg

public boolean connectDlg()
Displays a dialog box that allows the user to connect to a specific server.

Returns:
Indicates how the dialog box was dismissed (cancel = false).

convertDBRowSetToDBRow

public java.util.Vector convertDBRowSetToDBRow(JSDbRowSet dbRowSet,
                                               int index)
                                        throws JSException
Utility method to convert a DBRowSet into a vector of data objects in the row.

Parameters:
dbRowSet - The DBRowSet returned from a fetch statement.
index - The index of the row to retrieve.
Returns:
The converted Vector.
Throws:
JSException - An exception occurred while communicating with the server.

copy

public void copy(Range range)
          throws JSException
Puts a copy of the text and formatting contained in range on the clipboard. Note that this method implicitly works on the current sheet. The sheet index in range is not honoured.

Parameters:
range - The range to copy.
Throws:
JSException - An exception occurred while communicating with the server.

copy

public void copy(short sheetIdx,
                 Range range)
          throws JSException
Puts a copy of the text and formatting contained in range on the clipboard.

Parameters:
sheetIdx - The sheet index on which range lives. Typically, this should be the same as the index in the range but as the single-argument copy method already existed we have to make it explicit.
range - The range to copy.
Throws:
JSException - An exception occurred while communicating with the server.

copyDown

public void copyDown(Range range)
              throws JSException
Copies the data and formatting in the top row(s) of the selected range(s) of the current sheet to the bottom of the selected range(s). The sheetIndex defined in the Range is ignored.

Parameters:
range - The range to copy down.
Throws:
JSException - An exception occurred while communicating with the server.

copyDown

public void copyDown(short sheetIdx,
                     Range range)
              throws JSException
Copies the data and formatting in the top row(s) of the selected range(s) of the specified sheet to the bottom of the selected range(s). Note that the sheet- index defined in Range is ignored.

Parameters:
sheetIdx - The sheet on which to do the copy.
range - The range to copy down.
Throws:
JSException - An exception occurred while communicating with the server.

copyRight

public void copyRight(Range range)
               throws JSException
Copies the data and formatting in the left column(s) of the selected range(s) to the right of the selected range(s).

Parameters:
range - The range to copy right.
Throws:
JSException - An exception occurred while communicating with the server.

createObject

public java.lang.Object createObject(java.lang.String className)
                              throws java.lang.ClassNotFoundException,
                                     java.lang.IllegalAccessException
Creates a Java object based on the string passed in. This is meant to be used by JavaScript users, since IE cannot directly create Java objects. It handles the creation of a class that uses a no-argument constructor.

Parameters:
className - The name of the object to create.
Returns:
The Java object created.
Throws:
java.lang.ClassNotFoundException - Classname invalid.
java.lang.IllegalAccessException - Access not allowed.

createObject

public java.lang.Object createObject(java.lang.String className,
                                     java.util.Vector argTypesVector,
                                     java.util.Vector argValuesVector)
                              throws JSException
Creates a Java object based on the string passed in. This is meant to be used by JavaScript users, since IE cannot directly create Java objects. It handles the creation of a class that uses a constructor with a non-zero number of arguments.

Parameters:
className - The name of the object to create.
Returns:
The Java object created.
Throws:
JSException - A JSException will be thrown if there's an invalid class name, invalid argument types, or invalid argument values.

cut

public void cut(Range range)
         throws JSException
Similiar to clear, except a copy is placed on the clipboard.

Parameters:
range - The range to cut.
Throws:
JSException - An exception occurred while communicating with the server.

dbConnect

public JSDatabase dbConnect(java.lang.String dbName,
                            java.lang.String userName,
                            java.lang.String password)
                     throws JSException
Connects to a database on the server.

Parameters:
dbName - The name of the database to which to connect.
userName - The name of the user to use when connecting.
password - The password for this user.
Returns:
the instance of JSDatabase created or null if an error occurred.
Throws:
JSException - An exception occurred while communicating with the server.

dbDisconnect

public void dbDisconnect(JSDatabase db)
                  throws JSException
Disconnects from this database on the server.

Parameters:
db - The database object.
Throws:
JSException - An exception occurred while communicating with the server.

deleteBook

public void deleteBook(java.lang.String name)
                throws JSException
Deletes the book on the server.

Parameters:
name - The name of the book to delete.
Throws:
JSException - An exception occurred while communicating with the server.

deleteChart

public void deleteChart(java.lang.String name)
                 throws JSException
Deletes the chart from the sheet.

Parameters:
name - The name of the chart to delete.
Throws:
JSException - An exception occurred while communicating with the server.

deleteLeft

public void deleteLeft(Range range)
                throws JSException
Removes the specified range from the sheet by shifting cells left that are to the right of the range. For example, if range = B2..C3, then all of the cells to the right of C2 and C3 are shifted to the left by two columns.

Parameters:
range - The range to delete.
Throws:
JSException - An exception occurred while communicating with the server.

deleteSheet

public void deleteSheet(java.lang.String name)
                 throws JSException
Deletes a sheet from the book.

Parameters:
name - Name of the sheet to delete.
Throws:
JSException - An exception occurred while communicating with the server.

deleteUp

public void deleteUp(Range range)
              throws JSException
Removes the specified range from the sheet by shifting cells up that are below the range. For example, if range = B2..C3, then all of the cells below B3 and C3 are shifted up by two rows.

Parameters:
range - The range to delete.
Throws:
JSException - An exception occurred while communicating with the server.

destroy

public void destroy()
Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated. The stop method will always be called before destroy.


determinant

public void determinant(Range range,
                        Cell output)
                 throws JSException
Calculates the determinant of the given range and outputs it to the given cell. The determinant of a matrix is the algebraic sum of the products of the matrix. When you find the determinant of a matrix, you essentially reduce the matrix to a single unique value.

Parameters:
range - The source range.
output - The output cell.
Throws:
JSException - An exception occurred while calculating the determinant.

disconnect

public void disconnect()
                throws JSException
Disconnects from the server.

Throws:
JSException - An exception occurred while disconnecting from the server.

disconnectDlg

public boolean disconnectDlg()
Closes the book after checking for saving changes. After the book is closed, it disconnects from the server.

Returns:
true if the client was disconnected from the server.

distribute

public void distribute(Range values,
                       Range bin)
                throws JSException
Performs a frequency distribution on the values and bin range. A frequency distribution calculates the frequency with which specific values or specific value intervals occur in a range of data, enabling you to identify patterns in your data.

Parameters:
values - The values range.
bin - The bin value.
Throws:
JSException - An exception occurred while communicating with the server.

errorMsg

public void errorMsg(java.lang.String str)
Displays an error message dialog box.

Parameters:
str - The message to display.

errorMsgForException

public void errorMsgForException(com.iisc.jwc.orb.CException e)
FOR INTERNAL USE ONLY!


errorMsgForException

public void errorMsgForException(JSException e)
Displays an error message dialog box.

Parameters:
e - the message to display.

evaluate

public JSEvaluateValue evaluate(short sheetIndex,
                                java.lang.String formula)
                         throws JSException
Evaluates an expression or function.

Parameters:
sheetIndex - The sheet in which to evaluate the expression or function. If -1, use the current sheet.
formula - The expression or function to evaluate. If a function, bookname:function is the proper format for this parameter, where the bookname is the book that contains the script and function is the name of the function within the script.
Returns:
The JSEvaluateValue representation of the expression.
Throws:
JSException - An exception occurred while communicating with the server.

executeScript

public void executeScript(java.lang.String text)
                   throws JSException
Executes this text as a script on the server.

Parameters:
text - The text script to execute.
Throws:
JSException - An exception occurred while communicating with the server.

find

public Cell find(java.lang.String text,
                 int type)
          throws JSException
Returns the cell that contains the text specified.

Parameters:
text - The string for which to search.
type - The type for which to search: 1: text, 2: values, 3: formulas, 4: criteria.
Returns:
The cell reference of the cell that matches the criteria.
Throws:
JSException - An exception occurred while communicating with the server.

findAgain

public Cell findAgain()
               throws JSException
Returns the cell that contains the text specified.

Returns:
The cell reference of the cell that matches the criteria.
Throws:
JSException - An exception occurred while communicating with the server.

formatCellsDlg

public boolean formatCellsDlg()
                       throws JSException
Displays the Format Cells dialog box.

Returns:
True if the cells are formatted.
Throws:
JSException - An exception occurred while communicating with the server.

getActiveCell

public Cell getActiveCell()
                   throws JSException
Returns the current active cell.

Returns:
The active cell.
Throws:
JSException - An exception occurred while communicating with the server.

getActiveSheet

public short getActiveSheet()
                     throws JSException
Returns the current active sheet.

Returns:
The index of the active sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getBGColor

public java.awt.Color getBGColor()
                          throws JSException
Returns the background color of the current sheet. Note that there's a known bug in returning objects from Java back to a calling method in JavaScript. Thus, this method should not be called from JavaScript. Instead, use the getBGColorRed/Green/Blue methods to retrieve the three colors as int's and then recreate the Color object using the createObject method.

Returns:
The background color of the current sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getBGColorBlue

public int getBGColorBlue()
                   throws JSException
Returns the blue portion of the background color of the current sheet.

Returns:
The blue portion of the background color of the current sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getBGColorGreen

public int getBGColorGreen()
                    throws JSException
Returns the green portion of the background color of the current sheet.

Returns:
The green portion of the background color of the current sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getBGColorRed

public int getBGColorRed()
                  throws JSException
Returns the red portion of the background color of the current sheet.

Returns:
The red portion of the background color of the current sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getBookName

public java.lang.String getBookName()
                             throws JSException
Returns the simple filename of the book (no path information).

Returns:
the simple filename of the book (no path information).
Throws:
JSException - An exception occurred while communicating with the server.

getBookPassword

public java.lang.String getBookPassword()
Returns the password setting, if any, for opening a book.

Returns:
the book password.

getCacheSize

public int getCacheSize()
Returns the number of rows and columns to be cached in each direction.

Returns:
The cache size.

getCallTimeout

public static int getCallTimeout()
Gets the current timeout for all of the communications with the server. Not applicable in JavaScript.

Returns:
the current timeout in seconds.

getCellDisplay

public java.lang.String getCellDisplay(Cell cell)
                                throws JSException
Returns the displayed text of the cell at row, column. If the cell contains a formula, then its result is returned. If the cell value is numeric, the returned value is a string form of the numeric.

Parameters:
cell - The cell reference.
Returns:
The text displayed in the cell.
Throws:
JSException - An exception occurred while communicating with the server.

getCellEntry

public java.lang.String getCellEntry(Cell cell)
                              throws JSException
Returns the value of the cell at row, column. If the cell contains a formula, then the formula (not the resulting value) is returned.

Parameters:
cell - The cell reference.
Returns:
The cell value.
Throws:
JSException - An exception occurred while communicating with the server.

getCellHTML

public java.lang.String getCellHTML(Cell cell,
                                    int flags)
                             throws JSException
Returns the data in this cell as HTML.

Parameters:
cell - The cell reference.
flags - 0 = No HTML table tags, 1 = HTML table tags.
Returns:
The cell value as HTML.
Throws:
JSException - An exception occurred while communicating with the server.

getCellNumber

public double getCellNumber(Cell cell)
                     throws JSException
Returns the number of the cell at row, column. If the cell contains a formula, then its result is returned. The value of zero is returned if the cell value is non-numeric.

Parameters:
cell - The cell reference.
Returns:
The number of the cell.
Throws:
JSException - An exception occurred while communicating with the server.

getCellStyle

public CellStyle getCellStyle(Cell cell)
                       throws JSException
Returns the CellStyle object of the specified cell.

Parameters:
cell - The cell reference.
Returns:
The cell style for the specified cell.
Throws:
JSException - An exception occurred while communicating with the server.

getCellText

public java.lang.String getCellText(Cell cell)
                             throws JSException
Returns the data in this cell as a string. If the cell contains a formula, then its result is returned. An error is returned if the cell value is not text.

Parameters:
cell - The cell reference.
Returns:
The cell value.
Throws:
JSException - An exception occurred while communicating with the server.

getCellValue

public JSValue getCellValue(Cell cell)
                     throws JSException
Returns the data in this cell as a JSValue object.

Parameters:
cell - The cell reference.
Returns:
The data in this cell as a JSValue object.
Throws:
JSException - An exception occurred while communicating with the server.

getChartAsBytes

public byte[] getChartAsBytes(java.lang.String name,
                              int imgType,
                              short sheetIdx)
                       throws JSException
Returns chart bytes based on the chart name.

Parameters:
name - The name of the chart.
imgType - The image type to use. 1: GIF, 2: JPEG
sheetIdx - The sheet index.
Returns:
The byte array of the image.
Throws:
JSException - An exception occurred while communicating with the server.

getChartAsImage

public java.awt.Image getChartAsImage(java.lang.String name,
                                      int imgType,
                                      short sheetIdx)
                               throws JSException
Returns the chart image based on the chart name.

Parameters:
name - The name of the chart.
imgType - The image type to use. 1: GIF, 2: JPEG
sheetIdx - The index of the sheet.
Returns:
The chart image.
Throws:
JSException - An exception occurred while communicating with the server.

getChartList

public java.lang.String[] getChartList()
                                throws JSException
Gets the list of all of the chart names that exist in the sheet.

Returns:
The chart names.
Throws:
JSException - An exception occurred while communicating with the server.

getChartListAsVector

public java.util.Vector getChartListAsVector()
                                      throws JSException
Gets the list of all of the chart names that exist in the sheet.

Returns:
The chart names.
Throws:
JSException - An exception occurred while communicating with the server.

getColWidth

public int getColWidth(int col)
                throws JSException
Returns the column width, in pixels, for the specified column in the active sheet. Col index 0 is used for row headers.

Parameters:
col - The column whose width is to be retrieved.
Returns:
The column width for the specified column.
Throws:
JSException - An exception occurred while communicating with the server.

getColWidth

public int getColWidth(int col,
                       short sheetIndex)
                throws JSException
Returns the column width, in pixels, for the specified column in the specified sheet. Col index 0 is used for row headers. Sheet indexes start at 0.

Parameters:
col - The column whose width is to be retrieved.
sheetIndex - The index of the sheet that contains the specified column.
Returns:
The column width for the specified column.
Throws:
JSException - An exception occurred while communicating with the server.

getConnectAtStartup

public boolean getConnectAtStartup()
Returns whether JSClient will attempt to connect at startup.

Returns:
True if JSClient will attempt to connect at startup.

getDatabases

public java.lang.String[] getDatabases()
                                throws JSException
Returns an array of database names to which you can connect.

Returns:
An array of database names.
Throws:
JSException - An exception occurred while communicating with the server.

getDatabasesAsVector

public java.util.Vector getDatabasesAsVector()
                                      throws JSException
Returns a Vector of database names to which you can connect.

Returns:
A vector of database names.
Throws:
JSException - An exception occurred while communicating with the server.

getDefaultColWidth

public int getDefaultColWidth()
                       throws JSException
Returns the default column width of the current sheet.

Returns:
The default column width.
Throws:
JSException - An exception occurred while communicating with the server.

getDefaultRowHeight

public int getDefaultRowHeight()
                        throws JSException
Returns the default row height of the current sheet.

Returns:
The default row height.
Throws:
JSException - An exception occurred while communicating with the server.

getFileList

public com.iisc.jwc.orb.FileInfo[] getFileList(int mode,
                                               java.lang.String wildcard,
                                               java.lang.String path)
                                        throws JSException
FOR INTERNAL USE ONLY!

Throws:
JSException - An exception occurred while communicating with the server.

getFileListAsVector

public java.util.Vector getFileListAsVector(int mode,
                                            java.lang.String wildcard,
                                            java.lang.String path)
                                     throws JSException
FOR INTERNAL USE ONLY!

Throws:
JSException - An exception occurred while communicating with the server.

getFileName

public java.lang.String getFileName()
                             throws JSException
Returns the relative path and name of the book.

Returns:
the relative path and name of the book.
Throws:
JSException - An exception occurred while communicating with the server.

getFreezePaneCell

public Cell getFreezePaneCell()
                       throws JSException
Returns the upper left frozen cell in the current sheet.

Returns:
The freeze pane cell reference.
Throws:
JSException - An exception occurred while communicating with the server.

getGridLineColor

public java.awt.Color getGridLineColor()
                                throws JSException
Returns the grid line color of the current sheet.

Returns:
The grid line color.
Throws:
JSException - An exception occurred while communicating with the server.

getHeadingStyleR1C1

public boolean getHeadingStyleR1C1()
                            throws JSException
Returns the state of the row and column heading style.

Returns:
True if the headings are displayed as R1C1; false if the headings are displayed as A1.
Throws:
JSException - An exception occurred while communicating with the server.

getHostName

public java.lang.String getHostName()
Returns the host name for this session.

Returns:
the name of the host.

getInitialSheet

public short getInitialSheet()
                      throws JSException
Returns the index of the initial sheet.

Returns:
The position of the initial sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getInputCell

public int getInputCell(Cell cell1,
                        Cell cell2)
                 throws JSException
Returns the number of input cells that are set. If count = 1, then only cell1 was supplied; If count = 2 then both cell1 and cell2 were supplied. Also returns the input cells.

Parameters:
cell1 - The first input cell.
cell2 - The second input cell.
Returns:
The number of input cells that are set.
Throws:
JSException - An exception occurred while communicating with the server.

getLastCell

public Cell getLastCell(short sheetIndex,
                        int type,
                        int roworcol)
                 throws JSException
Returns the largest cell that is needed to contain all of the data in the sheet.

Parameters:
sheetIndex - The index of the sheet to reference.
type - 1: last row, 2: last col, 3: last row with data, 4: last col with data, 5: last cell, 6: last cell with data
roworcol - The column for last row (types 1 and 3), row for last column (types 2 and 4), and unused for types 5 and 6
Returns:
The cell reference of the last cell according to type given.
Throws:
JSException - An exception occurred while communicating with the server.

getLoadbalance

public boolean getLoadbalance()
Returns the status of loadbalance.

Returns:
The status of loadbalance.

getMyPermissionOnBook

public int getMyPermissionOnBook()
                          throws JSException
Returns the book permission settings for the current user. A user must have read permission to open a book; write permission to add, remove, rename, or reorder sheets; save permission to save the book; and grant permission to alter protection settings on the book. Book protection may be superceded by settings on individual sheets, cells, or ranges within the book.

Returns:
The book protection setting, which represents a combination of the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, and PROTECTION_GRANT.
Throws:
JSException - An exception occurred while communicating with the server.

getMyPermissionOnCell

public int getMyPermissionOnCell(short sheetIndex,
                                 Cell cell)
                          throws JSException
Returns the permission settings for the current user for a specified cell within a specified sheet. A user must have read permission to view a cell and write permission to change a cell. Locked cells have no write permission.

Parameters:
sheetIndex - The index of the requested sheet.
cell - The cell on which to return protection information.
Returns:
The protection setting, which represents a combination of the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, PROTECTION_LOCK, and PROTECTION_GRANT.
Throws:
JSException - An exception occurred while communicating with the server.

getMyPermissionOnSheet

public int getMyPermissionOnSheet(short sheetIndex)
                           throws JSException
Returns the sheet permission settings for the current user on the requested sheet. A user must have read permission to view the sheet; write permission to alter the sheet; and grant permission to alter protection settings on the sheet. Read or write protection may be superceded by settings on individual cells or ranges within the sheet.

Parameters:
sheetIndex - the index of the sheet to get permissions from.
Returns:
The sheet protection setting, which represents a combination of the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, and PROTECTION_GRANT.
Throws:
JSException - An exception occurred while communicating with the server.

getNamedRange

public Range getNamedRange(java.lang.String name)
                    throws JSException
Returns the range for the specified named range.

Parameters:
name - The name of the range.
Returns:
The range for the specified named range.
Throws:
JSException - An exception occurred while communicating with the server.

getNamedRanges

public java.lang.String[] getNamedRanges()
                                  throws JSException
Returns an array of all of the range names for the sheet.

Returns:
An array of the range names.
Throws:
JSException - An exception occurred while communicating with the server.

getNamedRangesAsVector

public java.util.Vector getNamedRangesAsVector()
                                        throws JSException
Returns a Vector of all of the range names for the sheet.

Returns:
A vecor of the range names.
Throws:
JSException - An exception occurred while communicating with the server.

getOpenBookList

public com.iisc.jwc.orb.FileInfo[] getOpenBookList()
                                            throws JSException
FOR INTERNAL USE ONLY!

Throws:
JSException - An exception occurred while communicating with the server.

getOpenBookListAsVector

public java.util.Vector getOpenBookListAsVector()
                                         throws JSException
FOR INTERNAL USE ONLY!

Throws:
JSException - An exception occurred while communicating with the server.

getOpenMode

public int getOpenMode()
Returns the sharing mode for a new book.

Returns:
The integer representation of the mode for new books. CSession.OPEN_SHARE (1) or CSession.OPEN_EXCLUSIVE (2)

getOpenNewBook

public boolean getOpenNewBook()
Returns the setting to create or open a new book.

Returns:
true to create a new book; false to open an existing book.

getOpenSheet

public java.lang.String getOpenSheet()
Returns the sheet to start on when a book is opened.

Returns:
The name of the open sheet.

getPermissionsOnBook

public Protection[] getPermissionsOnBook()
                                  throws JSException
Returns the array of permissions settings for the book. An individual protection setting contains a sheet id, a range, a user or group name, and an integer representing the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, PROTECTION_GRANT, and PROTECTION_LOCKED.

Returns:
The array of permissions settings for the book.
Throws:
JSException - An exception occurred while communicating with the server.

getPermissionsOnSheet

public Protection[] getPermissionsOnSheet(short sheetIndex)
                                   throws JSException
Returns the array of permission settings for the specified sheet. An individual protection setting contains a range, a user or group name, and an integer representing the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, PROTECTION_GRANT, and PROTECTION_LOCKED.

Parameters:
sheetIndex - The index of the sheet.
Returns:
An array of permissions.
Throws:
JSException - An exception occurred while communicating with the server.

getPermissionsVectorOnBook

public java.util.Vector getPermissionsVectorOnBook()
                                            throws JSException
Returns the vector of permission values for the book. An individual protection setting contains a sheet id, a range, a user or group name, and an integer representing the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, PROTECTION_GRANT, and PROTECTION_LOCKED.

Returns:
The Vector of permissions settings for the book.
Throws:
JSException - An exception occurred while communicating with the server.

getPermissionsVectorOnSheet

public java.util.Vector getPermissionsVectorOnSheet(short sheetIndex)
                                             throws JSException
Returns the vector of permission values for the specified sheet. An individual protection setting contains a range, a user or group name, and an integer representing the following bit flags: PROTECTION_READ, PROTECTION_WRITE, PROTECTION_SAVE, PROTECTION_GRANT, and PROTECTION_LOCKED.

Parameters:
sheetIndex - The index of the sheet.
Returns:
A vector of permissions.
Throws:
JSException - An exception occurred while communicating with the server.

getPort

public int getPort()
Returns the port number on which the server is listening. 0 indicates the default port.

Returns:
The port number

getPrintableSheet

public Sheet getPrintableSheet()
                        throws JSException
Returns the current sheet.

Returns:
The Sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getRangeDisplay

public java.lang.String[] getRangeDisplay(Range range)
                                   throws JSException
Returns the displayed text of the range.

Parameters:
range - The range reference.
Returns:
The text displayed in the range.
Throws:
JSException - An exception occurred while communicating with the server.

getRangeDisplayAsVector

public java.util.Vector getRangeDisplayAsVector(Range range)
                                         throws JSException
Returns the displayed text of the range.

Parameters:
range - The range reference.
Returns:
A vector of the displayed text for the range.
Throws:
JSException - An exception occurred while communicating with the server.

getRangeHTML

public java.lang.String getRangeHTML(Range range,
                                     int flags)
                              throws JSException
Returns the data in this range as HTML.

Parameters:
range - The range reference.
flags - 0 = No HTML table tags, 3 = HTML table tags with headings.
Returns:
The data in the range as HTML.
Throws:
JSException - An exception occurred while communicating with the server.

getRecalcIterationNumber

public int getRecalcIterationNumber()
                             throws JSException
Returns the recalculation iteration number.

Returns:
The recalculation iteration.
Throws:
JSException - An exception occurred while communicating with the server.

getRecalcMode

public boolean getRecalcMode()
                      throws JSException
Returns the recalculation mode.

Returns:
True if automatic; false if manual.
Throws:
JSException - ORB error.

getRecalcType

public int getRecalcType()
                  throws JSException
Returns the recalculation type.

Returns:
The recalulation type: 1: recalculate by column, 2: recalculate by row, 3: recalculate by natural iteration
Throws:
JSException - An exception occurred while communicating with the server.

getRowHeight

public int getRowHeight(int row)
                 throws JSException
Returns the row height, in pixels, for the specified row in the active sheet. Row index 0 is used for column headers.

Parameters:
row - The row whose height is to be retrieved.
Returns:
The height for the specified row.
Throws:
JSException - An exception occurred while communicating with the server.

getRowHeight

public int getRowHeight(int row,
                        short sheetIndex)
                 throws JSException
Returns the row height, in pixels, for the specified row, in the specified sheet. Row index 0 is used for column headers. Sheet indexes start at 0.

Parameters:
row - The row whose height is to be retrieved.
sheetIndex - The index of the sheet that contains the specified row.
Returns:
The height for the specified row.
Throws:
JSException - An exception occurred while communicating with the server.

getSelection

public Range getSelection()
                   throws JSException
Returns the range of the first selection.

Returns:
The range that is selected.
Throws:
JSException - An exception occurred while communicating with the server.

getSelections

public Range[] getSelections()
                      throws JSException
Returns an array of the ranges that compose the current selection in the sheet.

Returns:
An array of ranges.
Throws:
JSException - An exception occurred while communicating with the server.

getSelectionsAsVector

public java.util.Vector getSelectionsAsVector()
                                       throws JSException
Returns a vector of the ranges that compose the current selection in the sheet.

Returns:
A vector of ranges.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetCount

public int getSheetCount()
                  throws JSException
Returns the number of sheets in this book.

Returns:
The number of sheet in this book.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetIndexForName

public short getSheetIndexForName(java.lang.String sheetname)
                           throws JSException
Returns the sheet index for a sheet name.

Parameters:
sheetname - The name of the sheet for which an index is desired.
Returns:
The index for the sheet name.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetName

public java.lang.String getSheetName()
                              throws JSException
Returns the name of the current sheet.

Returns:
The name of the sheet.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetNameAt

public java.lang.String getSheetNameAt(short index)
                                throws JSException
Returns the name of the sheet at the specified index.

Parameters:
index - The index of the sheet; 0 based.
Returns:
The name of the sheet at the specified index.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetNames

public java.lang.String[] getSheetNames()
                                 throws JSException
Returns an array of all of the sheet names in this book.

Returns:
An array of all of the sheet names.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetNamesAsVector

public java.util.Vector getSheetNamesAsVector()
                                       throws JSException
Returns a Vector of all of the sheet names in this book.

Returns:
A Vector of all of the sheet names.
Throws:
JSException - An exception occurred while communicating with the server.

getSheetWorkArea

public Range getSheetWorkArea()
                       throws JSException
Returns the work area for the current worksheet.

Returns:
The range of the work area.
Throws:
JSException - An exception occurred while communicating with the server.

getShowCellGrid

public boolean getShowCellGrid()
                        throws JSException
Returns the state of the cell grid display.

Returns:
True if the cell grid is visible.
Throws:
JSException - An exception occurred while communicating with the server.

getShowExceptions

public boolean getShowExceptions()
Returns the state of whether or not to show exceptions.

Returns:
true if exceptions are shown and false if they are not shown.

getShowFormatBar

public boolean getShowFormatBar()
Returns the state of the display of the format bar.

Returns:
true if the format bar is visible.

getShowFormulaBar

public boolean getShowFormulaBar()
Returns the state of the display of the formula bar.

Returns:
the state of the display of the formula bar.

getShowFreezePane

public boolean getShowFreezePane()
                          throws JSException
Returns the state of the freeze pane display.

Returns:
True if the freeze pane is visible.
Throws:
JSException - An exception occurred while communicating with the server.

getShowGridComponents

public boolean getShowGridComponents()
Returns whether or not the visible grid is being used.

Returns:
True if the visible grid is being used.

getShowHeadings

public boolean getShowHeadings()
                        throws JSException
Returns the state of the headings display.

Returns:
True if the headings are visible.
Throws:
JSException - An exception occurred while communicating with the server.

getShowInfoDialogs

public boolean getShowInfoDialogs()
Returns whether error and informational dialog boxes should be shown.

Returns:
True if error and informational dialog boxes should be shown.

getShowPopupMenu

public boolean getShowPopupMenu()
Returns whether the context menu can be shown.

Returns:
true if the context menu can be shown.

getShowStatusBar

public boolean getShowStatusBar()
Returns the state of the display of the status bar.

Returns:
true if the status bar is visible.

getSortKeys

public SortKeys[] getSortKeys()
                       throws JSException
Returns the array of sort keys.

Returns:
An array of the sort keys.
Throws:
JSException - An exception occurred while communicating with the server.

getSortKeysAsVector

public java.util.Vector getSortKeysAsVector()
                                     throws JSException
Returns the sort keys as a vector.

Returns:
A vector of sort keys.
Throws:
JSException - An exception occurred while communicating with the server.

getSortRange

public Range getSortRange()
                   throws JSException
Returns the sort range.

Returns:
The sort range.
Throws:
JSException - An exception occurred while communicating with the server.

getTableRange

public Range getTableRange()
                    throws JSException
Returns the table range.

Returns:
The table range.
Throws:
JSException - An exception occurred while communicating with the server.

getThrowExceptions

public boolean getThrowExceptions()
Returns the state of whether or not to throw exceptions.

Returns:
true if exceptions are thrown and false if they are not thrown.

getTimeout

public int getTimeout()
Returns the server/client timeout, in seconds. Not applicable in JavaScript.

Returns:
the time out in seconds.

getTopLeftCell

public Cell getTopLeftCell()
                    throws JSException
Returns the cell that is currently at the top left corner of the visible area of the grid.

Returns:
The top left visible cell.
Throws:
JSException - An exception occurred while communicating with the server.

getTracking

public java.lang.String getTracking()
Returns the current setting for cell tracking.

Returns:
the cell tracking setting.

getTrackingDownColor

public java.awt.Color getTrackingDownColor()
Returns the color used when cell values decrease.

Returns:
the tracking down color.

getTrackingDuration

public int getTrackingDuration()
Returns the interval number (in seconds) the cell will be displayed as the tracking color.

Returns:
the amount of time (in seconds).

getTrackingUpColor

public java.awt.Color getTrackingUpColor()
Returns the color used when cell values increase.

Returns:
The tracking up color.

getUserList

public java.lang.String[] getUserList()
                               throws JSException
Returns a list of the users who are sharing this book.

Returns:
An array of user names.
Throws:
JSException - An exception occurred while communicating with the server.

getUserListAsVector

public java.util.Vector getUserListAsVector()
                                     throws JSException
Returns, as a Vector, a list of users sharing this book.

Returns:
A Vector of user names.
Throws:
JSException - An exception occurred while communicating with the server.

getUserName

public java.lang.String getUserName()
Returns the current user name for this session.

Returns:
the user name

getUserPassword

public java.lang.String getUserPassword()
Returns the current user password for this session.

Returns:
The user password.

getUsersForBook

public java.lang.String[] getUsersForBook(java.lang.String bookname)
                                   throws JSException
Returns the list of users currently observing this book.

Parameters:
bookname - The name of the book.
Returns:
The list of users.
Throws:
JSException - An exception occurred while communicating with the server.

getUsersForBookAsVector

public java.util.Vector getUsersForBookAsVector(java.lang.String bookname)
                                         throws JSException
Returns the list of users currently observing this book.

Parameters:
bookname - The name of the book.
Returns:
The list of users.
Throws:
JSException - An exception occurred while communicating with the server.

init

public void init()
Called by the browser or applet viewer to inform this applet that it has been loaded into the system. It is always called before the first time that the start method is called.


insertBeforeSheet

public void insertBeforeSheet(java.lang.String existingSheetName,
                              java.lang.String newSheetName)
                       throws JSException
Inserts a new sheet in front of an existing sheet.

Parameters:
existingSheetName - The existing sheet name in front of which the new sheet is inserted.
newSheetName - The name of the new sheet.
Throws:
JSException - An exception occurred while communicating with the server.

insertDown

public void insertDown(Range range)
                throws JSException
In the specified column(s) of the range, to make room for inserted blank cells, shift cells down. For example, if range = B2..C3, then all of the cells below B1 and C1 are shifted down by two rows.

Parameters:
range - The range to insert.
Throws:
JSException - An exception occurred while communicating with the server.

insertRight

public void insertRight(Range range)
                 throws JSException
In the specified row(s) of the range, to make room for inserted blank cells, shift cells to the right. For example, if range = B2..C3, then all of the cells to the right of A1 and A2 are shifted to the right by two columns.

Parameters:
range - The range to insert.
Throws:
JSException - An exception occurred while communicating with the server.

insertSheetAt

public void insertSheetAt(short index,
                          java.lang.String name)
                   throws JSException
Inserts a sheet into the book.

Parameters:
index - The position at which to insert the sheet; 0 based.
name - The name for the new sheet.
Throws:
JSException - An exception occurred while communicating with the server.

invert

public void invert(Range range,
                   Range outputRange)
            throws JSException
Inverts the specified worksheet range (matrix) using the Gauss-Jordan method. The first range is the source matrix and the second is the result matrix.
The results are placed in the second range. If the source range is not square, the largest possible square range starting in the upper left corner in the source range is used for the inversion.

Parameters:
range - The range to invert.
outputRange - The range into which to output the results.
Throws:
JSException - An exception occurred while communicating with the server.

isBookOpen

public boolean isBookOpen()
Returns true if a book is open.

Returns:
true if a book is open.

isConnected

public boolean isConnected()
Returns true if connected to the server; false otherwise.

Returns:
true if connected.

isLoggedOn

public boolean isLoggedOn()
Returns true if connected and logged on to the server; false otherwise.

Returns:
true if logged on to the server.

isPasswordSet

public boolean isPasswordSet(boolean readWrite)
                      throws JSException
Returns whether the requested password is set for this book.

Parameters:
readWrite - If true, the read/write password is checked, if false, the read-only password is checked.
Returns:
True if the requested password is set for this book.
Throws:
JSException - An exception occurred while communicating with the server.

isPasteAble

public boolean isPasteAble()
                    throws JSException
Returns true if there is something on the clipboard to paste.

Returns:
True if there is something on the clipboard to paste.
Throws:
JSException - An exception occurred while communicating with the server.

isRedoAble

public boolean isRedoAble()
                   throws JSException
Returns whether the last command is redoable.

Returns:
True if the last command is redoable; otherwise false.
Throws:
JSException - An exception occurred while communicating with the server.

isSpecialPasteAble

public boolean isSpecialPasteAble()
                           throws JSException
Returns true if there are cells on the clipboard to paste.

Returns:
True if there are cells on the clipboard to paste.
Throws:
JSException - An exception occurred while communicating with the server.

isUndoAble

public boolean isUndoAble()
                   throws JSException
Returns whether the last command is undoable.

Returns:
True if the last command is undoable; otherwise false.
Throws:
JSException - An exception occurred while communicating with the server.

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
                          java.awt.datatransfer.Transferable contents)
Notifies this object that it is no longer the owner of the contents of the clipboard.

Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
Parameters:
clipboard - The clipboard that is no longer owned.
contents - The contents which this owner had placed on the clipboard.

main

public static void main(java.lang.String[] args)
Runs JSheet as a standalone application.

Parameters:
args - The command line arguments.

messageSender

public void messageSender()
Displays a dialog box that sends messages to other users that share the same workbook.


messageSenderSelectRecipient

public void messageSenderSelectRecipient(java.lang.String user)
FOR INTERNAL USE ONLY!


modifySheetObserver

public void modifySheetObserver(int index,
                                Range range)
                         throws JSException
Modifies the sheet observer with the given index.

Parameters:
index - The sheet observer index that was returned from addSheetObserver.
range - The new range for the observed area.
Throws:
JSException - An exception occurred while communicating with the server.

moveSheetDlg

public boolean moveSheetDlg()
                     throws JSException
Displays a dialog box for reordering sheets.

Returns:
true if the sheet was moved.
Throws:
JSException - An exception occurred while communicating with the server.

moveSheetTo

public void moveSheetTo(java.lang.String from,
                        short to)
                 throws JSException
Moves a sheet from one location to another in the book.

Parameters:
from - The name of the sheet to move.
to - The position to insert the sheet at, 0 based. NOTE: the original sheet is counted in the index to move to, such that moving the sheet from position 0 to position 1 in effect does nothing.
Throws:
JSException - An exception occurred while communicating with the server.

multiply

public void multiply(Range range1,
                     Range range2,
                     Range outputRange)
              throws JSException
Multiplies two specified ranges (matrices) to produce a third range (matrix). Before executing this command, you must select three ranges. The number of columns in the first range must equal the number of rows in the second range. The third range must have the same number of rows as the first range and the same number of columns as the second range.
If you specify a single cell for the third range, that cell is the upper left cell of the output range. The output range must not overlap either of the two ranges being multiplied. Existing values in the third range are overwritten.

Parameters:
range1 - The range of the first matrix.
range2 - The range of the second matrix.
outputRange - The range for the ouput results.
Throws:
JSException - An exception occurred while communicating with the server.

newBook

public void newBook(java.lang.String bookname,
                    int bookmode)
             throws JSException
Creates a new workbook.

Parameters:
bookname - The name of the book to create.
bookmode - The book mode (1: shared, 2: exclusive).
Throws:
JSException - An exception occurred while communicating with the server.

newBook

public void newBook(java.lang.String bookname,
                    int bookmode,
                    java.lang.String templatename,
                    java.lang.String templatepwd,
                    boolean publicread,
                    boolean publicwrite,
                    boolean publicsave)
             throws JSException
Creates a new workbook.

Parameters:
bookname - The name of the book to create.
bookmode - The book mode (1 - shared, 2 - exclusive).
templatename - The book template name.
templatepwd - The book template password.
publicread - Public read book and sheet permission.
publicwrite - Public write book and sheet permission.
publicsave - Public save book and sheet permission.
Throws:
JSException - An exception occurred while communicating with the server.

newBookDlg

public boolean newBookDlg()
                   throws JSException
Displays the New Book dialog box.

Returns:
True if we have a new book.
Throws:
JSException - An exception occurred while communicating with the server.

newBookFromTemplate

public void newBookFromTemplate(java.lang.String templatename,
                                java.lang.String templatepwd)
                         throws JSException
Creates a new workbook using a template. The template is created in exclusive mode.

Parameters:
templatename - The book template name.
templatepwd - The book template password.
Throws:
JSException - An exception occurred while communicating with the server.

newBookFromTemplate

public void newBookFromTemplate(java.lang.String bookname,
                                java.lang.String templatename,
                                java.lang.String templatepwd,
                                int bookmode)
                         throws JSException
Creates a new workbook from a template.

Parameters:
bookname - The name of the book to create.
templatename - The book template name.
templatepwd - The book template password.
bookmode - The book mode (1 - shared, 2 - exclusive).
Throws:
JSException - An exception occurred while communicating with the server.

newCachedBook

public void newCachedBook(java.lang.String bookname,
                          int bookmode,
                          java.lang.String templatename,
                          java.lang.String templatepwd,
                          boolean publicread,
                          boolean publicwrite,
                          boolean publicsave,
                          boolean cacheOnServer,
                          int updateInterval)
                   throws JSException
Creates a new server-cached workbook.

Parameters:
bookname - The name of the book to create.
bookmode - The book mode (1 - shared, 2 - exclusive).
templatename - The book template name.
templatepwd - The book template password.
publicread - Public read book and sheet permission.
publicwrite - Public write book and sheet permission.
publicsave - Public save book and sheet permission.
cacheOnServer - If true, the server sends updated cells only.
updateInterval - Let a minimum of updateInterval seconds pass between server updates.
Throws:
JSException - An exception occurred while communicating with the server.
Since:
JSheet1.1b41

newCachedBookFromTemplate

public void newCachedBookFromTemplate(java.lang.String bookname,
                                      java.lang.String templatename,
                                      java.lang.String templatepwd,
                                      int bookmode,
                                      boolean cacheOnServer,
                                      int updateInterval)
                               throws JSException
Creates a new cached workbook from a template.

Parameters:
bookname - The name of the book to create.
templatename - The book template name.
templatepwd - The book template password.
bookmode - The book mode (1 - shared, 2 - exclusive).
cacheOnServer - If true, only cells that have changed will be sent through by the server.
Throws:
JSException - An exception occurred while communicating with the server.
Since:
JSheet1.1b41

newChart

public java.lang.String newChart(java.lang.String cdfFileName,
                                 java.lang.String cdfText,
                                 Range range,
                                 int width,
                                 int height)
                          throws JSException
Creates a new chart based on the chart definition file and returns the name of the chart.

Parameters:
cdfFileName - The name of the chart definition file.
cdfText - The chart definition description.
range - The range to use for the data.
width - The width of the chart, in pixels.
height - The height of the chart, in pixels.
Returns:
The name of the chart.
Throws:
JSException - An exception occurred while communicating with the server.

newChartAsBytes

public byte[] newChartAsBytes(java.lang.String cdfFileName,
                              java.lang.String cdfText,
                              Range range,
                              int width,
                              int height)
                       throws JSException
Creates a new chart based on the chart definition file.

Parameters:
cdfFileName - The name of the chart definition file.
cdfText - The chart definition description.
range - The range to use for the data.
width - The width of the chart, in pixels.
height - The height of the chart, in pixels.
Returns:
A byte array of the image.
Throws:
JSException - An exception occurred while communicating with the server.

newChartAsImage

public java.awt.Image newChartAsImage(java.lang.String cdfFileName,
                                      java.lang.String cdfText,
                                      Range range,
                                      int width,
                                      int height)
                               throws JSException
Creates a new chart based on the chart definition file.

Parameters:
cdfFileName - The name of the chart definition file.
cdfText - The chart definition description.
range - The range to use for the data.
width - The width of the chart, in pixels.
height - The height of the chart, in pixels.
Returns:
The chart image.
Throws:
JSException - An exception occurred while communicating with the server.

nsolve

public void nsolve(Range range,
                   Range outputRange)
            throws JSException
Solves a system of simultaneous linear equations. The Gauss-Jordan elimination method is used with full pivoting. The first range is the matrix to which the operation is applied (augmented coefficient matrix). The results are placed in the second range.
The first range must be an n x (n+1) sized matrix (one more column than rows; for example, three rows by four columns), where the coefficients are located in the left n x n (square) matrix and the constants are located in the right column.
The second range is a row of minimum size n x 1 (n rows and one column), or a column of minimum size 1 x n (one row and n columns). However, if you select a larger range, the results are placed within the range starting in the upper left cell and continuing along the top row or the left column.
If a unique solution cannot be computed, error 1017 (Equations are not independent) is generated.

Parameters:
range - The source matrix.
outputRange - The resulting matrix.
Throws:
JSException - An exception occurred while communicating with the server.

openBook

public void openBook(java.lang.String name,
                     int mode,
                     java.lang.String pwd)
              throws JSException
Opens a book and returns the book object.

Parameters:
name - The name of the book to open.
mode - 1: open shared, 2: open exclusive.
pwd - The book password.
Throws:
JSException - An exception occurred while communicating with the server.

openBookDlg

public boolean openBookDlg()
                    throws JSException
Displays the open book dialog box.

Returns:
true if a book is opened.
Throws:
JSException - An exception occurred while communicating with the server.

openBookGetPwd

public void openBookGetPwd(java.lang.String name,
                           int mode)
                    throws JSException,
                           java.lang.Exception
Opens a book and prompts for password if necessary.

Parameters:
name - Name of the book.
mode - 1: shared, 2: exclusive
Throws:
JSException - An exception occurred while communicating with the server.
java.lang.Exception - Unidentified error.

openCachedBook

public void openCachedBook(java.lang.String name,
                           int mode,
                           java.lang.String pwd,
                           boolean cacheOnServer,
                           int updateInterval)
                    throws JSException
Opens a book and returns the book object.

Parameters:
name - The name of the book to open.
mode - 1: open shared, 2: open exclusive.
pwd - The book password.
cacheOnServer - If true, the server will only send updates for changed cells.
updateInterval - The minimum number of seconds between updates.
Throws:
JSException - An exception occurred while communicating with the server.
Since:
JSheet1.1b41

paste

public java.util.Vector paste(Range range)
                       throws JSException
Pastes information from the clipboard into the sheet.

Parameters:
range - The range in which to paste into.
Returns:
The pasted range (in the form of a Vector).
Throws:
JSException - An exception occurred while communicating with the server.

pasteArray

public Range[] pasteArray(Range[] ranges)
                   throws JSException
Pastes information from the clipboard into the specified ranges. Note that JavaScript code should not attempt to call this method since JavaScript to Java conversion cannot handle an array argument. In JavaScript code, use pasteVector instead of pasteArray. Note that this method is not overloaded with the paste method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
ranges - The ranges to be pasted.
Returns:
The pasted ranges.
Throws:
JSException - An exception occurred while communicating with the server.

pasteSpecial

public void pasteSpecial(Range range,
                         int type)
                  throws JSException
Pastes data from the clipboard into the sheet. Does not honour the sheet index in range but assumes the current sheet.

Parameters:
range - The range to paste into.
type - 1: add the values in the range to the pasted data, 2: divide, 3: multiply, 4: subtract, 5: values, 6: formulas, 7: format, 8: all except borders.
Throws:
JSException - An exception occurred while communicating with the server.

pasteSpecial

public void pasteSpecial(short sheetIdx,
                         Range range,
                         int type)
                  throws JSException
Pastes data from the clipboard into the sheet. Honours sheetIdx.

Parameters:
sheetIdx - The sheet which to copy to.
range - The range to paste into.
type - 1: add the values in the range to the pasted data, 2: divide, 3: multiply, 4: subtract, 5: values, 6: formulas, 7: format, 8: all except borders.
Throws:
JSException - An exception occurred while communicating with the server.

pasteSpecialDlg

public boolean pasteSpecialDlg()
                        throws JSException
Displays the paste special dialog box.

Returns:
True if the item is pasted into the sheet.
Throws:
JSException - An exception occurred while communicating with the server.

pasteVector

public java.util.Vector pasteVector(java.util.Vector ranges)
                             throws JSException
Pastes information from the clipboard into the specified ranges. Note that this method is not overloaded with the paste method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
ranges - The ranges to be pasted.
Returns:
The pasted ranges.
Throws:
JSException - An exception occurred while communicating with the server.

print

public void print(java.awt.Graphics g)
Prints this component. Applications should override this method for components that must do special processing before being printed or should be printed differently than they are painted. The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

Parameters:
g - the graphics context to use for printing.

printSelectedSheetRange

public void printSelectedSheetRange()
                             throws JSException
Prints the current sheet range selection.

Throws:
JSException - An exception occurred while communicating with the server.

printSheet

public void printSheet()
                throws JSException
Prints the current sheet.

Throws:
JSException - An exception occurred while communicating with the server.

processBookEvent

public void processBookEvent(BookEvent e)
Processes all of the book listener events.

Parameters:
e - The book event.

processSessionEvent

public void processSessionEvent(SessionEvent e)
Processes all of the session listener events.

Parameters:
e - The session event.

processSheetEvent

public void processSheetEvent(SheetEvent e)
Processes all of the sheet listener events.

Parameters:
e - The sheet event.

propsDlg

public void propsDlg()
              throws JSException
Displays a dialog box for setting properties.

Throws:
JSException - An exception occurred while communicating with the server.

recalc

public void recalc()
            throws JSException
Recalculates the workbook as soon as possible.

Throws:
JSException - An exception occurred while communicating with the server.

recalcNow

public void recalcNow()
               throws JSException
Recalculates the entire workbook immediately.

Throws:
JSException - An exception occurred while communicating with the server.

recalcRange

public void recalcRange(Range range)
                 throws JSException
Recalculates the specified range.

Parameters:
range - The range reference.
Throws:
JSException - An exception occurred while communicating with the server.

recalcTable

public void recalcTable()
                 throws JSException
Recalculates the current What If data table.

Throws:
JSException - An exception occurred while communicating with the server.

redo

public Range[] redo(SheetHolder sheetHolder)
             throws JSException
Redoes the last undo.

Parameters:
sheetHolder - After the command is undone, the sheetHolder contains the sheet where the action was redone.
Returns:
An array of ranges that was modified when the command was redone.
Throws:
JSException - An exception occurred while communicating with the server.

regress

public void regress(Range range1,
                    Range range2,
                    Range range3)
             throws JSException
Performs multiple linear regression analysis on a selected worksheet range. Regress solves the equation:
y = c0 + c1*x1 + c2*x2 + c3*x3 + ... + cn*xn
for the c coefficients yielding the lowest error (sum of squares).
The first range contains the regression data and can have as many as 14 independent variables. The first column of the range contains the dependent values (y), and the remaining columns are the various independent values (x). As many as 14 independent variables can be used. If the first row contains text, this text is used to label the variables. The matrix actually begins in the second row of the selected range.
The regression coefficients are placed in the second range. If the second range is a single cell, this cell defines the upper left cell of the column of coefficients. The first cell is the constant and the remainder is the coefficients for the independent variables.
The third worksheet range selected is for an optional regression report. If a single cell or small range is selected for the report range, a range large enough for the regression report is automatically used. The results include the following:

Parameters:
range1 - The range for the regression data.
range2 - The range where the regresssion coefficients are placed.
range3 - The range for the optional regression report.
Throws:
JSException - An exception occurred while communicating with the server.

releaseCallback

public void releaseCallback(org.omg.CORBA.Object callbackObj)
Releases the callback object from the ORB. For Corba callbacks, setting the object reference to null is insufficient as the Orb still holds a reference to it.

Parameters:
callbackObj - The callback object to release.

removeBookListener

public void removeBookListener(BookListener l)
Removes the specified book listener so it no longer receives book events.

Parameters:
l - The book listener.

removeBookProtection

public void removeBookProtection(java.lang.String userOrGroup,
                                 int permission)
                          throws JSException
Removes the protection settings for the book.

Parameters:
userOrGroup - The user or group name from which to remove protection.
permission - The permission being removed for the book as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the specified property change listener.

Parameters:
l - The property change listener.

removeProtection

public void removeProtection(Range range,
                             java.lang.String userOrGroup,
                             int permission)
                      throws JSException
Removes the protection settings from a range of cells.

Parameters:
range - The range from which to remove protection.
userOrGroup - The user or group name from which to remove protection.
permission - The permission being removed for the range as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

removeRangeName

public void removeRangeName(java.lang.String name)
                     throws JSException
Removes the specified range name.

Parameters:
name - The name of the range.
Throws:
JSException - An exception occurred while communicating with the server.

removeSessionListener

public void removeSessionListener(SessionListener l)
Removes the specified session listener so it no longer receives session events.

Parameters:
l - The session listener.

removeSheetListener

public void removeSheetListener(SheetListener l)
Removes the specified sheet listener so it no longer receives sheet events.

Parameters:
l - The sheet listener.

removeSheetObserver

public void removeSheetObserver(int index)
                         throws JSException
Removes the sheet observer with the given index.

Parameters:
index - The sheet observer index that was returned from addSheetObserver.
Throws:
JSException - An exception occurred while communicating with the server.

removeSheetProtection

public void removeSheetProtection(short sheetIndex,
                                  java.lang.String userOrGroup,
                                  int permission)
                           throws JSException
Removes protection settings for the sheet.

Parameters:
sheetIndex - The index of the sheet.
userOrGroup - The user or group name from which to remove protection.
permission - The permission being removed for the sheet as a bit mask.
Throws:
JSException - An exception occurred while communicating with the server.

removeSortKeys

public void removeSortKeys()
                    throws JSException
Removes the sort keys.

Throws:
JSException - An exception occurred while communicating with the server.

renameRangeName

public void renameRangeName(java.lang.String currentName,
                            java.lang.String newName)
                     throws JSException
Renames the specified range name.

Parameters:
currentName - The current range name.
newName - The new name for the range.
Throws:
JSException - An exception occurred while communicating with the server.

renameSheetDlg

public boolean renameSheetDlg()
                       throws JSException
Displays a dialog box for renaming a sheet.

Returns:
true if the sheet was renamed.
Throws:
JSException - An exception occurred while communicating with the server.

replaceAll

public int replaceAll(java.lang.String findText,
                      java.lang.String replaceText,
                      int type)
               throws JSException
Replaces all of the text in the sheet based on the parameters.

Parameters:
findText - The string for which to search.
replaceText - The string to replace the found text with.
type - The type to search for: 1: text, 2: values, 3: formulas, 4: criteria.
Returns:
The number of cells in which text was replaced.
Throws:
JSException - An exception occurred while communicating with the server.

resetCallTimeout

public static void resetCallTimeout()
Resets the current timeout to the default.


saveAsDlg

public boolean saveAsDlg()
                  throws JSException
Displays the Save As dialog box. If the user presses OK, the workbook is saved with the user specified name.

Returns:
True if the file is saved; otherwise false.
Throws:
JSException - ORB error.

saveBook

public void saveBook()
              throws JSException
Saves the current book on the server.

Throws:
JSException - An exception occurred while communicating with the server.

saveBookAsType

public void saveBookAsType(int type,
                           java.lang.String name)
                    throws JSException
Saves this book under a different name and/or type.

Parameters:
type - 1: Lotus 123 1A, 2: Lotus 123 2.0, 3: DIF, 4: SYLK, 5: TEXT, 6: HTML, 10: Wingz 2.0, 11: Wingz 3.0, 12: JSheet (default), 15: Excel 95, 16: Excel 97
name - The name to use to save the book.
Throws:
JSException - ORB Error

scrollToView

public void scrollToView(int row,
                         int col)
                  throws JSException
Scrolls the current sheet so that the cell specified by the given row and column will be visible.

Parameters:
row - The row.
col - The col.
Throws:
JSException - An exception occurred while communicating with the server.

setActiveCell

public void setActiveCell(Cell cell)
                   throws JSException
Sets the given row and column as the current cell.

Parameters:
cell - The cell reference.
Throws:
JSException - An exception occurred while communicating with the server.

setActiveSheet

public void setActiveSheet(short sheet)
                    throws JSException
Sets the current active sheet.

Parameters:
sheet - The index of the sheet that is to be made active.
Throws:
JSException - An exception occurred while communicating with the server.

setActiveSheetUsingString

public void setActiveSheetUsingString(java.lang.String sheetname)
                               throws JSException
Sets the current active sheet. Note that setActiveSheet is not overloaded because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
sheetname - The name of the sheet that is to be made active.
Throws:
JSException - An exception occurred while communicating with the server.

setBGColor

public void setBGColor(java.awt.Color color)
                throws JSException
Sets the background color for the current sheet. Note that this method won't work when called from IE's JavaScript.

Parameters:
color - The color for the background.
Throws:
JSException - An exception occurred while communicating with the server.

setBGColor

public void setBGColor(int red,
                       int green,
                       int blue)
                throws JSException
Sets the background color for the current sheet. This overloaded method was added because IE's JavaScript to Java calls don't handle passing the Color object as an argument.

Throws:
JSException - An exception occurred while communicating with the server.

setBookPassword

public void setBookPassword(java.lang.String passwd)
Sets the password to be used when opening a book.

Parameters:
passwd - The password for the book.

setCacheSize

public void setCacheSize(int cacheSize)
Sets the number of rows and columns to be cached in each direction.

Parameters:
cacheSize - The number of rows and columns to cache.

setCallTimeout

public static void setCallTimeout(int secs)
Sets the timeout for all of the communications with the server. Not applicable in JavaScript.

Parameters:
secs - Timeout in seconds

setCellEntry

public void setCellEntry(Cell cell,
                         java.lang.String data)
                  throws JSException
Sets the value of the cell. The server will determine what type of data was entered.
 Foo1.2345=pi()
getCellEntry()Foo1.2345=pi()
getCellNumber()0double(1.2345)double(3.141592654)
getCellText()Foo1.23453.141592654
getCellDisplay()Foo1.233.14

Parameters:
cell - The cell reference.
data - The data value.
Throws:
JSException - An exception occurred while communicating with the server.

setCellNumber

public void setCellNumber(Cell cell,
                          double num)
                   throws JSException
Sets the value of the cell as a number.

Parameters:
cell - The cell reference.
num - The number to set.
Throws:
JSException - An exception occurred while communicating with the server.

setCellStyleForCell

public void setCellStyleForCell(Cell cell,
                                CellStyle style)
                         throws JSException
Sets the style for the given cell. Note that this method is not overloaded with the setCellStyleForRange method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
cell - The cell reference.
style - The CellStyle object that contains the information to change.
Throws:
JSException - An exception occurred while communicating with the server.

setCellStyleForRange

public void setCellStyleForRange(Range range,
                                 CellStyle style)
                          throws JSException
Sets the style for the cells within the given range. Note that this method is not overloaded with the setCellStyleForRange method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
style - The CellStyle object that contains the information to change.
Throws:
JSException - An exception occurred while communicating with the server.

setCellText

public void setCellText(Cell cell,
                        java.lang.String text)
                 throws JSException
Sets the value of the cell as a string.

Parameters:
cell - The cell reference.
text - The text string to set.
Throws:
JSException - An exception occurred while communicating with the server.

setCellValue

public void setCellValue(Cell cell,
                         JSValue value)
                  throws JSException
Sets the value of the cell as a JSValue object.

Parameters:
cell - The cell reference.
value - The cell value object.
Throws:
JSException - An exception occurred while communicating with the server.

setColWidth

public void setColWidth(int start,
                        int end,
                        int size)
                 throws JSException
Sets the column widths.

Parameters:
start - The first column (1 based).
end - The last column (1 based).
size - The size in pixels.
Throws:
JSException - An exception occurred while communicating with the server.

setConnectAtStartup

public void setConnectAtStartup(boolean connectAtStartup)
Sets whether JSClient will attempt to connect at startup.

Parameters:
connectAtStartup - The connect at startup flag.

setFileName

public void setFileName(java.lang.String name)
Sets the relative path and name of the book. It does not change the name of the current open book.

Parameters:
name - The full path of the book.

setFreezePaneCell

public void setFreezePaneCell(Cell cell)
                       throws JSException
Sets the freeze pane in the current sheet.

Parameters:
cell - The cell reference.
Throws:
JSException - An exception occurred while communicating with the server.

setGridLineColor

public void setGridLineColor(java.awt.Color color)
                      throws JSException
Sets the grid line color for the current sheet.

Parameters:
color - The grid line color.
Throws:
JSException - An exception occurred while communicating with the server.

setHeadingStyleR1C1

public void setHeadingStyleR1C1(boolean set)
                         throws JSException
Sets the state of the row and column heading style.

Parameters:
set - True if the headings are displayed as R1C1; false if the headings are displayed as A1.
Throws:
JSException - An exception occurred while communicating with the server.

setHostName

public void setHostName(java.lang.String host)
Sets the host name for the JSClient object to be created. This does not change the user password after the JSClient object is created. It must be used before the JSClient object is created. Not applicable in JavaScript.

Parameters:
host - The name of the host machine.

setInitialSheet

public void setInitialSheet(short index)
                     throws JSException
Sets the specified sheet as the initial sheet.

Parameters:
index - The index of the sheet to set; 0 based.
Throws:
JSException - An exception occurred while communicating with the server.

setInputCell

public void setInputCell(int count,
                         Cell cell1,
                         Cell cell2)
                  throws JSException
Defines the input cells for one-variable and two-variable What If tables.
Input cell 1 defines the current cell as the input cell of a single variable table or as the first input cell of a two-variable table. Input cell 2 defines the current cell as the second input cell of a two-variable table.
Input cells serve as reference cells for the formulas in What If tables. No data is placed in the cells. The cells are used as temporary placeholders for variables. Formulas are calculated using the variables to determine the results of the table.

Parameters:
count - If count = 1, then only cell1 is supplied; if count = 2, then both cell1 and cell2 are supplied.
cell1 - The first input cell.
cell2 - The second input cell.
Throws:
JSException - An exception occurred while communicating with the server.

setLoadbalance

public void setLoadbalance(boolean state)
Sets whether to take advantage of server load balancing.

Parameters:
state - Whether to take advantage of server load balancing.

setMessageSenderPopupState

public void setMessageSenderPopupState(boolean sd)
FOR INTERNAL USE ONLY!


setMessageViewerPopupState

public void setMessageViewerPopupState(boolean sd)
FOR INTERNAL USE ONLY!


setNamedRange

public void setNamedRange(java.lang.String name,
                          Range range)
                   throws JSException
Defines a name for a range.

Parameters:
name - The name for the range.
range - The range reference.
Throws:
JSException - An exception occurred while communicating with the server.

setOpenMode

public void setOpenMode(java.lang.String mode)
Sets the sharing mode for a new book.

Parameters:
mode - Use "shared" for shared mode; any other value will set exclusive mode.

setOpenNewBook

public void setOpenNewBook(boolean set)
Sets to true to automatically create a new book when launching this applet.

Parameters:
set - True to create a new book; false to open an existing book.

setOpenSheet

public void setOpenSheet(java.lang.String sheet)
Sets the sheet to open.

Parameters:
sheet - The name of the sheet to open.

setPassword

public void setPassword(java.lang.String readWrite,
                        java.lang.String readOnly,
                        boolean encryption)
                 throws JSException
Sets the password for this book.

Parameters:
readWrite - The read/write password.
readOnly - The read-only password.
encryption - If true, encrypt the file.
Throws:
JSException - An exception occurred while communicating with the server.

setPort

public void setPort(int port)
Sets the port number for this session.

Parameters:
port - The port number on which the server is located.

setRangeEntryUsingArray

public void setRangeEntryUsingArray(Range range,
                                    java.lang.Object[] values)
                             throws JSException
Sets the range values. The values from the array are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. If the values are null, the range is filled with "null" values. Note that this method is not overloaded with the setRangeEntryUsingVector method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - An array of values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeEntryUsingVector

public void setRangeEntryUsingVector(Range range,
                                     java.util.Vector values)
                              throws JSException
Sets the range values. The values from the Vector are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. If the values are null, the range is filled with "null" values. Note that this method is not overloaded with the setRangeEntryUsingArray method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - A Vector of values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeNumberUsingArray

public void setRangeNumberUsingArray(Range range,
                                     java.lang.Number[] numbers)
                              throws JSException
Sets the range values with numbers. The values from the array are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. Note that this method is not overloaded with the setRangeNumberUsingVector method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
numbers - An array of the numbers to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeNumberUsingVector

public void setRangeNumberUsingVector(Range range,
                                      java.util.Vector numbers)
                               throws JSException
Sets the range values with numbers. The values from the Vector are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. Note that this method is not overloaded with the setRangeNumberUsingArray method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
numbers - The numbers to set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeTextUsingArray

public void setRangeTextUsingArray(Range range,
                                   java.lang.String[] values)
                            throws JSException
Sets the range values as text data. The values from the array are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data an exception is thrown. Note that this method is not overloaded with the setRangeTextUsingVector method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - An array of values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeTextUsingVector

public void setRangeTextUsingVector(Range range,
                                    java.util.Vector values)
                             throws JSException
Sets the range values as text data. The values from the Vector are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. Note that this method is not overloaded with the setRangeTextUsingArray method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - A Vector of the values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeValuesUsingArray

public void setRangeValuesUsingArray(Range range,
                                     JSValue[] values)
                              throws JSException
Sets the range values from the array of JSValue objects. The values from the array are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. Note that this method is not overloaded with the setRangeValuesUsingVector method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - An array of the values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRangeValuesUsingVector

public void setRangeValuesUsingVector(Range range,
                                      java.util.Vector values)
                               throws JSException
Sets the range values from the Vector of JSValue objects. The values from the Vector are stored in the range from left to right, top to bottom. If the values do not contain enough data, or too much data, an exception is thrown. Note that this method is not overloaded with the setRangeValuesUsingArray method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
values - A Vector of the values to be set.
Throws:
JSException - An exception occurred while communicating with the server.

setRecalcIterationNumber

public void setRecalcIterationNumber(int number)
                              throws JSException
Sets the recalculation iteration number. Sets the worksheet calculation to an iterative process. Whenever a recalculation occurs, the worksheet continues to recalculate for the number of times specified. Iteration allows multiple recalculations of a worksheet to occur simultaneously. Since most formula results are resolved in a single calculation, iterative recalculation is primarily applicable to worksheets containing circular references.

Parameters:
number - The number to set.
Throws:
JSException - An exception occurred while communicating with the server.

setRecalcIterationRange

public void setRecalcIterationRange(Range range,
                                    int number,
                                    int maximum)
                             throws JSException
Sets the recalculation iteration range.

Parameters:
range - The range to set.
number - The iteration number.
maximum - The maximum number of times to iterate.
Throws:
JSException - An exception occurred while communicating with the server.

setRecalcMode

public void setRecalcMode(boolean auto)
                   throws JSException
Sets the recalculation mode.

Parameters:
auto - True if auto recalc; false if manual recalc.
Throws:
JSException - An exception occurred while communicating with the server.

setRecalcType

public void setRecalcType(int type)
                   throws JSException
Sets the recalculation type.

Parameters:
type - 1: recalculate by column, 2: recalculate by row, 3: recalculate by natural iteration
Throws:
JSException - An exception occurred while communicating with the server.

setRowHeight

public void setRowHeight(int start,
                         int end,
                         int size)
                  throws JSException
Sets the row height.

Parameters:
start - The first row.
end - The last row.
size - The size in pixels.
Throws:
JSException - An exception occurred while communicating with the server.

setSelectionUsingRange

public void setSelectionUsingRange(Range range)
                            throws JSException
Sets the current selection to the specified range. Note that this method is not overloaded with the setSelectionUsingRanges method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
range - The range reference.
Throws:
JSException - An exception occurred while communicating with the server.

setSelectionUsingRanges

public void setSelectionUsingRanges(Range[] ranges)
                             throws JSException
Sets the current selection to the specified group of ranges. Note that this method is not overloaded with the setSelectionUsingRange method because JavaScript cannot handle overloaded methods that have the same number of parameters.

Parameters:
ranges - An array of ranges to be selected.
Throws:
JSException - An exception occurred while communicating with the server.

setSheetNameAt

public void setSheetNameAt(short index,
                           java.lang.String name)
                    throws JSException
Changes the name of the sheet at this index.

Parameters:
index - The index of the sheet; 0 based.
name - The new name of the sheet.
Throws:
JSException - An exception occurred while communicating with the server.

setSheetWorkArea

public void setSheetWorkArea(Range range)
                      throws JSException
Sets the work area range for the current sheet.

Parameters:
range - The new work area.
Throws:
JSException - An exception occurred while communicating with the server.

setShowCellGrid

public void setShowCellGrid(boolean set)
                     throws JSException
Sets the visible state of the cell grid.

Parameters:
set - True displays the cell grid.
Throws:
JSException - An exception occurred while communicating with the server.

setShowExceptions

public void setShowExceptions(boolean state)
Sets the state of whether or not to show exceptions.

Parameters:
state - The new show state.

setShowFormatBar

public void setShowFormatBar(boolean set)
Shows the format bar as a part of this applet.

Parameters:
set - Show the format bar if true; hides it otherwise.

setShowFormatBarFlag

public void setShowFormatBarFlag(boolean set)
Sets the format bar flag, but does not set the format bar

Parameters:
set - Sets the format bar flag if true; hides it otherwise.

setShowFormulaBar

public void setShowFormulaBar(boolean set)
Shows the formula bar as a part of this applet.

Parameters:
set - Show the formula bar if true; hide it otherwise.

setShowFormulaBarFlag

public void setShowFormulaBarFlag(boolean set)
Sets the formula bar flag, but does not set the formula bar

Parameters:
set - Sets the formula bar flag if true; hides it otherwise.

setShowFreezePane

public void setShowFreezePane(boolean set)
                       throws JSException
Sets the visible state of the freeze panes.

Parameters:
set - True displays the freeze panes.
Throws:
JSException - An exception occurred while communicating with the server.

setShowGridComponents

public void setShowGridComponents(boolean use)
Determines whether to use the visible grid when launching the applet.

Parameters:
use - If true, use the visible grid.

setShowHeadings

public void setShowHeadings(boolean set)
                     throws JSException
Sets the display state of the headings.

Parameters:
set - True displays the headings.
Throws:
JSException - An exception occurred while communicating with the server.

setShowInfoDialogs

public void setShowInfoDialogs(boolean set)
Determines if error or informational dialog boxes should be displayed. If set to false, then all error messages and informational dialogs will be shown in the status bar and through standard exception handling.

Parameters:
set - Show all dialogs if true; show no dialogs if false.

setShowPopupMenu

public void setShowPopupMenu(boolean set)
Allows the display of the context menu bar as part of this applet.

Parameters:
set - Allow display of the context menu if true; do not show it otherwise.

setShowStatusBar

public void setShowStatusBar(boolean set)
Shows the status bar as a part of this applet.

Parameters:
set - Show the status bar if true, hide it otherwise.

setShowStatusBarFlag

public void setShowStatusBarFlag(boolean set)
Sets the status bar flag, but does not set the status bar.

Parameters:
set - Sets the status bar flag if true; hides it otherwise.

setSortKeys

public void setSortKeys(java.util.Vector sortKeys)
                 throws JSException
Sets the sort keys.

Parameters:
sortKeys - A vector of SortKeys.
Throws:
JSException - An exception occurred while communicating with the server.

setSortRange

public void setSortRange(Range range)
                  throws JSException
Sets the sort range.

Parameters:
range - The range to sort.
Throws:
JSException - An exception occurred while communicating with the server.

setStatusMsg

public void setStatusMsg(java.lang.String str)
Displays the string in the status bar, if it is visible. If this is an applet running in a browser, it also displays the message in the status bar of the browser.

Parameters:
str - The message to display.

setTableRange

public void setTableRange(Range range)
                   throws JSException
Sets the data table range to the specified range.
Data tables, also called What If tables, can be used to record the results of changing a value as it is applied to a formula. Two types of table formats are available. One format builds a data table by using a single input cell defined to be used with one or more formulas. The other format calculates the table values by using two input cell values in a single formula.
A single variable table range on the worksheet must contain the following information: the top left corner of the range must be blank, the variable cells must be located in the remaining cells of the first column, and the formula cells must be located in the remaining cells of the first row.
A double variable table range on the worksheet must contain the following information: the formula cell must be placed in the top left corner of the range, the variable values must be located below the formula cell, and the two variable values must be located to the right of the formula cell.

Parameters:
range - The range for the table.
Throws:
JSException - An exception occurred while communicating with the server.

setThrowExceptions

public void setThrowExceptions(boolean state)
Sets the state of whether or not to throw exceptions.

Parameters:
state - The new throw state.

setTimeout

public void setTimeout(int seconds)
                throws JSException
Sets the number of seconds to wait before timing out a call from the client to the server. Not applicable in JavaScript.

Parameters:
seconds - The number of seconds before timing out.
Throws:
JSException - An invalid value was passed to the seconds parameter.

setTopLeftCell

public void setTopLeftCell(int row,
                           int col)
                    throws JSException
Scrolls the current sheet so that the cell specified by the given row and column will be visible in the top left cell of the grid.

Parameters:
row - The row.
col - The column.
Throws:
JSException - An exception occurred while communicating with the server.

setTracking

public void setTracking(java.lang.String track)
Sets cell tracking for this applet. Cell tracking changes the foreground/background color of cells that change their values.

Parameters:
track - If true, turn cell tracking on.

setTrackingDownColor

public void setTrackingDownColor(java.awt.Color color)
Sets the color used when cell values decrease.

Parameters:
color - The color to use.

setTrackingDuration

public void setTrackingDuration(int duration)
Sets the interval number (in seconds) for notification that a cell has changed.

Parameters:
duration - The amount of time (in seconds).

setTrackingUpColor

public void setTrackingUpColor(java.awt.Color color)
Sets the color used when cell values increase.

Parameters:
color - The color to use.

setUserName

public void setUserName(java.lang.String name)
Sets the user name for the JSClient object to be created. This does not change the user password after the JSClient object is created. It must be used before the JSClient object is created. Not applicable in JavaScript.

Parameters:
name - The user name.

setUserPassword

public void setUserPassword(java.lang.String password)
Sets the user password for the JSClient object to be created. This does not change the user password after the JSClient object is created. It must be used before the JSClient object is created. Not applicable in JavaScript.

Parameters:
password - The user password.

sortNow

public void sortNow(boolean byRow)
             throws JSException
Sorts the sheet according to the sort keys set for this sheet.

Parameters:
byRow - True for row sorting; false for column sorting.
Throws:
JSException - An exception occurred while communicating with the server.

start

public void start()
Called by the browser or applet viewer to inform this applet that it should start its execution. It is called after the init method and each time the applet is revisited in a Web page. This is needed to initialize a JSClient object.


stop

public void stop()
Called by the browser or applet viewer to inform this applet that it should stop its execution. It is called when the web page that contains this applet has been replaced by another page, and also just before the applet is to be destroyed.


throwException

public void throwException(com.iisc.jwc.orb.CException ce,
                           boolean javascript)
                    throws JSException
FOR INTERNAL USE ONLY!

Throws:
JSException - An exception occurred while communicating with the server.

throwException

public void throwException(JSException ce,
                           boolean javascript)
                    throws JSException
Throws Java and JavaScript exceptions.

Parameters:
ce - The exception to throw.
javascript - if javascript exception should be thrown.
Throws:
JSException - JSServer exception

transpose

public Range transpose(Range range)
                throws JSException
Transposes the data in the specified worksheet range. After executing this command, data previously located in the rows of the range is located in the columns of the range.

Parameters:
range - The range to transpose.
Returns:
The range after the matrix has been transposed.
Throws:
JSException - An exception occurred while communicating with the server.

undo

public Range[] undo(SheetHolder sheetHolder)
             throws JSException
Undoes the last command.

Parameters:
sheetHolder - After the command is undone, the sheetHolder contains the sheet where the action was undone.
Returns:
An array of ranges that changed when the command was undone.
Throws:
JSException - An exception occurred while communicating with the server.

warningMsg

public void warningMsg(java.lang.String str)
Displays a warning dialog box.

Parameters:
str - The message to display.

Email JSheet Support

www.jsheet.com
Copyright 1995 - 2003 Investment Intelligence Systems Limited.