com.iisc.jwc.jsheet
Class JSCallbacks

java.lang.Object
  extended bycom.iisc.jwc.jsheet.JSCallbacks
All Implemented Interfaces:
BookListener, java.util.EventListener, JavaScriptException, SessionListener, SheetListener

public class JSCallbacks
extends java.lang.Object
implements SessionListener, BookListener, SheetListener, JavaScriptException


Constructor Summary
JSCallbacks(netscape.javascript.JSObject win)
           
 
Method Summary
 void activeCellChanged(SheetEvent e)
          For a particular client, this method is called when a different cell becomes selected in the grid.
 void activeSheetChanged(BookEvent e)
          For a given client, this method is called when a different sheet is selected in its workbook.
 void bookClosed(BookEvent e)
          For all clients sharing a particular workbook, this method is called when the server closes the workbook.
 void bookClosed(SessionEvent e)
          For a given client x, this method is called when x closes its own workbook.
 void bookOpened(SessionEvent e)
          For a given client x, this method is called when a workbook is opened on x.
 void bookSaved(BookEvent e)
          For all clients sharing a particular workbook, this method is called when the workbook is saved.
 void cellStyleUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a cell's style is updated.
 void cellValueUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called when a value in its workbook has changed.
 void clientJoined(BookEvent e)
          For a given client, this method is called when another client loads the given client's workbook in shared mode.
 void clientLeft(BookEvent e)
          Given multiple clients that are sharing a workbook.
 void colWidthUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after width is adjusted for a column or columns.
 void deletedLeft(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a JSClient.deleteLeft call has been processed.
 void deletedUp(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a JSClient.deleteUp call has been processed.
 void doubleClicked(SheetEvent e)
          For a particular client, this method is called when a grid cell is double clicked.
 void exceptionThrown(int errorNumber, java.lang.String errorText)
          For a particular client, this method is called when a server generated exception has been thrown.
 void exceptionThrown(java.lang.String errorText)
          For a particular client, this method is called when a server generated exception has been thrown.
 void insertedDown(SheetEvent e)
          For a given client, this method is called after a JSClient.insertDown call has been processed.
 void insertedRight(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a JSClient.insertRight call has been processed.
 void killClient(SessionEvent e)
          For a given client x, this method is called when the server kills x.
 void leftColChanged(SheetEvent e)
          For a particular client, this method is called after workbook is horizontally scrolled such that there's a new left column.
 void messageReceived(SessionEvent e)
          For a given client x, this method is called when the server or another client sends a message to x.
 void rangeStyleUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a ranges's style is updated.
 void rowHeightUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after height is adjusted for a row or rows.
 void setAddingObserver(int chartIndex)
          Used by the JSP-Interactive Proxy applet handling a Chart Tag.
 void sheetInserted(BookEvent e)
          For all clients sharing a particular workbook, this method is called when a sheet is added to the shared workbook.
 void sheetMoved(BookEvent e)
          For all clients sharing a particular workbook, this method is called when a sheet is repositioned in the shared workbook.
 void sheetNameChanged(BookEvent e)
          For all clients sharing a particular workbook, this method is called when a sheet name has changed in the shared workbook.
 void sheetPropertiesUpdated(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after a sheet's properties are adjusted.
 void sheetRemoved(BookEvent e)
          For all clients sharing a particular workbook, this method is called when one of its sheets has been removed from the shared workbook.
 void styleIndexCleared(SheetEvent e)
          For all clients sharing a particular workbook, this method is called after formatting/style has been cleared.
 void textModified(SheetEvent e)
          For a particular client, this method is called when the user presses a key while a grid cell is in edit mode.
 void topRowChanged(SheetEvent e)
          For a particular client, this method is called after workbook is vertically scrolled such that there's a new top row.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSCallbacks

public JSCallbacks(netscape.javascript.JSObject win)
Method Detail

activeCellChanged

public void activeCellChanged(SheetEvent e)
For a particular client, this method is called when a different cell becomes selected in the grid. JavaScript function parameters: cell - A Cell object for the newly selected cell. For Cell details, see javadoc for JSheet's Cell class.

Specified by:
activeCellChanged in interface SheetListener
Parameters:
e - a sheet event object.

activeSheetChanged

public void activeSheetChanged(BookEvent e)
For a given client, this method is called when a different sheet is selected in its workbook. JavaScript function parameters: sheetIndex - index for newly selected sheet (0 based indexing)

Specified by:
activeSheetChanged in interface BookListener
Parameters:
e - a book event object.

bookClosed

public void bookClosed(BookEvent e)
For all clients sharing a particular workbook, this method is called when the server closes the workbook. JavaScript function parameters: none

Specified by:
bookClosed in interface BookListener
Parameters:
e - a book event object.

bookClosed

public void bookClosed(SessionEvent e)
For a given client x, this method is called when x closes its own workbook. JavaScript function parameters: bookName - name of closed workbook

Specified by:
bookClosed in interface SessionListener
Parameters:
e - a session event object

bookOpened

public void bookOpened(SessionEvent e)
For a given client x, this method is called when a workbook is opened on x. JavaScript function parameters: bookName - name of opened workbook

Specified by:
bookOpened in interface SessionListener
Parameters:
e - a session event object

bookSaved

public void bookSaved(BookEvent e)
For all clients sharing a particular workbook, this method is called when the workbook is saved. JavaScript function parameters: userName - name of logged on user for the client that performed the save operation

Specified by:
bookSaved in interface BookListener
Parameters:
e - a book event object.

cellStyleUpdated

public void cellStyleUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a cell's style is updated. JavaScript function parameters: range - A Range object for the cell that was specified in the cellStyleUpdated method call. The range will consist of one cell. For details on Range, see javadoc for JSheet's Range class.

Specified by:
cellStyleUpdated in interface SheetListener
Parameters:
e - a sheet event object.

cellValueUpdated

public void cellValueUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called when a value in its workbook has changed. JavaScript function parameters: cell - A Cell object for the cell that was updated. For Cell details, see javadoc for JSheet's Cell class. value - the new contents of the cell that was updated permissions - A bit mapped integer containing read/write permissions for the updated cell. Permissions parameter has the following non-zero bits: read bit = the first bit: if (permissions & 1) != 0 then the cell can be read write bit = the second bit: if (permissions & 2) != 0 then the cell can be written

Specified by:
cellValueUpdated in interface SheetListener
Parameters:
e - a sheet event object.

clientJoined

public void clientJoined(BookEvent e)
For a given client, this method is called when another client loads the given client's workbook in shared mode. JavaScript function parameters: userName - name of logged on user for the client that just loaded his copy of the shared workbook

Specified by:
clientJoined in interface BookListener
Parameters:
e - a book event object.

clientLeft

public void clientLeft(BookEvent e)
Given multiple clients that are sharing a workbook. If one of the clients closes its copy of the workbook, then this method is called for the other clients. JavaScript function parameters: userName - name of logged on user for the client that just closed his copy of the shared workbook

Specified by:
clientLeft in interface BookListener
Parameters:
e - a book event object.

colWidthUpdated

public void colWidthUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called after width is adjusted for a column or columns. JavaScript function parameters: sheetIndex - index for sheet whose columns were changed (0 based indexing) leftColIndex - index for left column in the group of columns whose widths were adjusted (1 based indexing; column A has index 1) rightColIndex - index for right column in the group of columns whose widths were adjusted widths - array of adjusted column widths; width values are in pixels

Specified by:
colWidthUpdated in interface SheetListener
Parameters:
e - a sheet event object.

deletedLeft

public void deletedLeft(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a JSClient.deleteLeft call has been processed. JavaScript function parameters: range - A Range object for the range that was specified in the deleteLeft method call. For details on Range, see javadoc for JSheet's Range class.

Specified by:
deletedLeft in interface SheetListener
Parameters:
e - a sheet event object.

deletedUp

public void deletedUp(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a JSClient.deleteUp call has been processed. JavaScript function parameters: range - A Range object for the range that was specified in the deleteUp method call. For details on Range, see javadoc for JSheet's Range class.

Specified by:
deletedUp in interface SheetListener
Parameters:
e - a sheet event object.

doubleClicked

public void doubleClicked(SheetEvent e)
For a particular client, this method is called when a grid cell is double clicked. JavaScript function parameters: cell - A Cell object for the cell that was double clicked. For Cell details, see javadoc for JSheet's Cell class.

Specified by:
doubleClicked in interface SheetListener
Parameters:
e - a sheet event object.

exceptionThrown

public void exceptionThrown(int errorNumber,
                            java.lang.String errorText)
For a particular client, this method is called when a server generated exception has been thrown. JavaScript function parameters: errorNumber - the exception's error number errorText - the exception's error message

Specified by:
exceptionThrown in interface JavaScriptException
Parameters:
errorNumber - the exception's error number
errorText - the exception's error message

exceptionThrown

public void exceptionThrown(java.lang.String errorText)
For a particular client, this method is called when a server generated exception has been thrown. JavaScript function parameters: errorText - the exception's error message

Specified by:
exceptionThrown in interface JavaScriptException
Parameters:
errorText - the exception's error message

insertedDown

public void insertedDown(SheetEvent e)
For a given client, this method is called after a JSClient.insertDown call has been processed. JavaScript function parameters: range - A Range object for the range that was specified in the insertDown method call. For details on Range, see javadoc for JSheet's Range class.

Specified by:
insertedDown in interface SheetListener
Parameters:
e - a sheet event object.

insertedRight

public void insertedRight(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a JSClient.insertRight call has been processed. JavaScript function parameters: range - A Range object for the range that was specified in the insertRight method call. For details on Range, see javadoc for JSheet's Range class.

Specified by:
insertedRight in interface SheetListener
Parameters:
e - a sheet event object.

killClient

public void killClient(SessionEvent e)
For a given client x, this method is called when the server kills x. JavaScript function parameters: shutdownMode - true indicates server performed an immediate shutdown false indicates server performed a graceful shutdown

Specified by:
killClient in interface SessionListener
Parameters:
e - a session event object

leftColChanged

public void leftColChanged(SheetEvent e)
For a particular client, this method is called after workbook is horizontally scrolled such that there's a new left column. JavaScript function parameters: sheetIndex - index for sheet whose columns were changed (0 based indexing) leftColIndex - index for the new left column (0 based indexing; column 1 is indicated by 0)

Specified by:
leftColChanged in interface SheetListener
Parameters:
e - a sheet event object.

messageReceived

public void messageReceived(SessionEvent e)
For a given client x, this method is called when the server or another client sends a message to x. JavaScript function parameters: sender - user name for the message sender message - the sent message

Specified by:
messageReceived in interface SessionListener
Parameters:
e - a session event object

rangeStyleUpdated

public void rangeStyleUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a ranges's style is updated. JavaScript function parameters: range - A Range object for the range that was specified in the rangeStyleUpdated method call. For details on Range, see javadoc for JSheet's Range class.

Specified by:
rangeStyleUpdated in interface SheetListener
Parameters:
e - a sheet event object.

rowHeightUpdated

public void rowHeightUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called after height is adjusted for a row or rows. JavaScript function parameters: sheetIndex - index for sheet whose rows were changed (0 based indexing) topRowIndex - index for top row in the group of rows whose heights were adjusted (1 based indexing; row 1 has index 1) bottomRowIndex - index for bottom row in the group of rows whose heights were adjusted heights - array of adjusted row heights; height values are in pixels

Specified by:
rowHeightUpdated in interface SheetListener
Parameters:
e - a sheet event object.

setAddingObserver

public void setAddingObserver(int chartIndex)
Used by the JSP-Interactive Proxy applet handling a Chart Tag. When first setting an observer for a chart, a range is used. In order to ignore the flood of cellValueUpdated CORBA callbacks when the SheetObserver is established, an entry is made in the addObservermap Hashtable.

Parameters:
chartIndex - the javascript chart array index, should be unique for each chart. Used as the key into the hashtable

sheetInserted

public void sheetInserted(BookEvent e)
For all clients sharing a particular workbook, this method is called when a sheet is added to the shared workbook. JavaScript function parameters: sheetName - name for newly inserted sheet sheetIndex - index for newly inserted sheet (0 based indexing)

Specified by:
sheetInserted in interface BookListener
Parameters:
e - a book event object.

sheetMoved

public void sheetMoved(BookEvent e)
For all clients sharing a particular workbook, this method is called when a sheet is repositioned in the shared workbook. JavaScript function parameters: fromSheetIndex - index for moved sheet's original position(0 based indexing) toSheetIndex - index for moved sheet's new position (0 based indexing)

Specified by:
sheetMoved in interface BookListener
Parameters:
e - a book event object.

sheetNameChanged

public void sheetNameChanged(BookEvent e)
For all clients sharing a particular workbook, this method is called when a sheet name has changed in the shared workbook. JavaScript function parameters: sheetName - new name for the sheet sheetIndex - index for sheet whose name was changed (0 based indexing)

Specified by:
sheetNameChanged in interface BookListener
Parameters:
e - a book event object.

sheetPropertiesUpdated

public void sheetPropertiesUpdated(SheetEvent e)
For all clients sharing a particular workbook, this method is called after a sheet's properties are adjusted. JavaScript function parameters: none

Specified by:
sheetPropertiesUpdated in interface SheetListener
Parameters:
e - a sheet event object.

sheetRemoved

public void sheetRemoved(BookEvent e)
For all clients sharing a particular workbook, this method is called when one of its sheets has been removed from the shared workbook. JavaScript function parameters: sheetIndex - index for sheet that was removed (0 based indexing)

Specified by:
sheetRemoved in interface BookListener
Parameters:
e - a book event object.

styleIndexCleared

public void styleIndexCleared(SheetEvent e)
For all clients sharing a particular workbook, this method is called after formatting/style has been cleared. JavaScript function parameters: none

Specified by:
styleIndexCleared in interface SheetListener
Parameters:
e - a sheet event object.

textModified

public void textModified(SheetEvent e)
For a particular client, this method is called when the user presses a key while a grid cell is in edit mode. For a grid cell to be put into edit mode, the user has to double click inside the grid cell. JavaScript function parameters: cell - A Cell object for the cell that was updated. For Cell details, see javadoc for JSheet's Cell class. entryValue - the current contents of the cell

Specified by:
textModified in interface SheetListener
Parameters:
e - a sheet event object.

topRowChanged

public void topRowChanged(SheetEvent e)
For a particular client, this method is called after workbook is vertically scrolled such that there's a new top row. JavaScript function parameters: sheetIndex - index for sheet whose columns were changed (0 based indexing) topRowIndex - index for the new top row (0 based indexing; row 1 is indicated by 0)

Specified by:
topRowChanged in interface SheetListener
Parameters:
e - a sheet event object.

Email JSheet Support

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