|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet com.iisc.jwc.jsheet.JSClient com.iisc.jwc.jsheet.JSClientSession
Field Summary |
Fields inherited from class com.iisc.jwc.jsheet.JSClient |
PROTECTION_GRANT, PROTECTION_LOCKED, PROTECTION_READ, PROTECTION_SAVE, PROTECTION_WRITE |
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 | |
JSClientSession()
Constructs a JSClient and adds self to instances. |
Method Summary | |
JSDatabase |
_dbConnect(java.lang.String dbName,
java.lang.String userName,
java.lang.String password)
Connects to a database through JSServer. |
short |
_getActiveSheet()
Returns the current active sheet. |
java.awt.Color |
_getBGColor()
Returns the background color of the current sheet. |
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. |
CellStyle |
_getCellStyle(Cell cell)
Returns the CellStyle object of the specified cell. |
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. |
int |
_getColWidth(int col)
Returns the column width, in pixels, for the specified column in the specified sheet. |
com.iisc.jwc.orb.CSheet |
_getCSheet(short sheetIndex)
Returns the CORBA CSheetView class |
com.iisc.jwc.orb.CSheetView |
_getCSheetView(short sheetIndex)
Returns the CORBA CSheetView class |
Cell |
_getLastCell(short sheetIndex,
int type,
int roworcol)
Returns the largest cell that is needed to contain all of the data in the sheet. |
int |
_getMyPermissionOnCell(Cell cell)
Returns the permission settings for the current user for a specified cell within a specified sheet. |
Range |
_getNamedRange(java.lang.String name)
Returns the range for the specified named range. |
java.lang.String[] |
_getRangeDisplay(Range range)
Returns the displayed text of the range. |
int |
_getRowHeight(int row)
Returns the row height, in pixels, for the specified row, in the specified sheet. |
com.iisc.jwc.jsheet.ISheet |
_getSheet(short sheetIndex)
Returns the requested sheet interface class |
int |
_getSheetCount()
Returns the number of sheets in this book. |
short |
_getSheetIndex(java.lang.String sheet)
Returns the sheet index based on the current sheet attribute. |
short |
_getSheetIndexForName(java.lang.String sheetname)
Returns the sheet index for a sheet name. |
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. |
void |
_setActiveSheet(short sheet)
Sets the current active sheet. |
void |
_setActiveSheetUsingString(java.lang.String sheetname)
Sets the current active sheet. |
void |
_setCellEntry(Cell cell,
java.lang.String data)
Sets the value of the cell. |
void |
activeCellChanged(SheetEvent e)
Invoked when the user selects a new cell. |
void |
activeSheetChanged(BookEvent e)
Invoked when the active sheet is changed. |
void |
bookClosed(BookEvent e)
Invoked when this book is closed on the server while this client is still accessing it. |
void |
bookClosed(SessionEvent e)
Invoked when a book is closed by this client. |
void |
bookOpened(SessionEvent e)
Invoked when a book is opened by this client. |
void |
bookSaved(BookEvent e)
Invoked when the book is saved on the server. |
void |
cellStyleUpdated(SheetEvent e)
Invoked when the style of a cell that is being observed changes on the server. |
void |
cellValueUpdated(SheetEvent e)
Invoked when the value of a cell that is being observed changes on the server. |
void |
clientJoined(BookEvent e)
Invoked when another user first accesses this shared book. |
void |
clientLeft(BookEvent e)
Invoked when another user stops accessing this book. |
void |
colWidthUpdated(SheetEvent e)
Invoked when a column size is changed. |
void |
connect(java.lang.String host,
java.lang.String user,
java.lang.String pwd)
Connects to the server. |
void |
deletedLeft(SheetEvent e)
Invoked when a cell or column is deleted. |
void |
deletedUp(SheetEvent e)
Invoked when a cell or row is deleted. |
void |
disconnect()
Disconnects from JSServer and remove self from instances. |
void |
doubleClicked(SheetEvent e)
Invoked when the user double-clicks in a cell. |
java.lang.String |
echo(java.lang.String echo)
Sends the string passed from the client back. |
void |
finalize()
Removes self from instances. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the object bound with the specified name |
java.lang.String |
getCellHTML(Cell cell,
java.lang.Integer flags)
Wrapper for getCellHTML. |
java.io.ByteArrayOutputStream |
getEvents()
Returns the ByteArrayOutputStream containing the events that have been sent from JSServer. |
static JSClientSession |
getInstance(java.lang.Object instanceID)
Get the instance of JSClient identified by the instance ID. |
java.lang.Object |
getInstanceID()
Get the instance ID of this JSClient. |
void |
insertedDown(SheetEvent e)
Invoked when a cell or row is inserted. |
void |
insertedRight(SheetEvent e)
Invoked when a cell or column is inserted. |
long |
jdate2wzdate(long jdate)
|
void |
killClient(SessionEvent e)
Invoked when a terminate message is sent from the server. |
void |
leftColChanged(SheetEvent e)
Invoked when the user scrolls the sheet left or right. |
boolean |
lockJSClient(java.lang.Object who)
Try and "lock" JSClient so no other instance can use this one by accident. |
void |
messageReceived(SessionEvent e)
Invoked when a message is sent from the server to this client. |
void |
rangeStyleUpdated(SheetEvent e)
Invoked when a range of values that is being observed changes on the server. |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name. |
void |
removeInstance()
Remove this instance of JSClient from the list of JSClients. |
static JSClientSession |
removeInstance(java.lang.Object instanceID)
Remove the instance of JSClient identified from the list of JSClients being maintained. |
void |
resetSheets()
Resets the internal information kept about "Sheets" |
java.lang.String |
reverseEcho(java.lang.String echo)
Sends the string passed from the client back, reverse. |
void |
rowHeightUpdated(SheetEvent e)
Invoked when a row size is changed. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object, using the name specified. |
void |
sheetInserted(BookEvent e)
Invoked when a new sheet is inserted into the book. |
void |
sheetMoved(BookEvent e)
Invoked when a sheet is moved in the book. |
void |
sheetNameChanged(BookEvent e)
Invoked when a sheet name changes in the book. |
void |
sheetPropertiesUpdated(SheetEvent e)
Invoked when one of the sheet properties has changed. |
void |
sheetRemoved(BookEvent e)
Invoked when a sheet is removed from the book. |
void |
start(boolean interactive)
Over-ridden to attach our listeners and prepare the event stream. |
void |
styleIndexCleared(SheetEvent e)
Invoked when a style is no longer being used. |
void |
textModified(SheetEvent e)
Invoked when the value of the cell is being edited. |
void |
topRowChanged(SheetEvent e)
Invoked when the user scrolls the sheet down or up. |
boolean |
unlockJSClient(java.lang.Object who)
Unlock the client so other instances can use this one. |
void |
valueBound(HttpSessionBindingEvent event)
Notifies the object that it is being bound to a session and identifies the session. |
void |
valueUnbound(HttpSessionBindingEvent event)
Notifies the object that it is being unbound from a session and identifies the session. |
long |
wzdate2jdate(double wzdate)
|
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 |
Constructor Detail |
public JSClientSession()
Method Detail |
public JSDatabase _dbConnect(java.lang.String dbName, java.lang.String userName, java.lang.String password) throws JSDbException
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.
JSDbException
- An exception occurred while communicating with the server.public short _getActiveSheet() throws JSException
JSException
- An exception occurred while communicating with the server.public java.awt.Color _getBGColor() throws JSException
JSException
- An exception occurred while communicating with the server.public java.lang.String _getCellDisplay(Cell cell) throws JSException
cell
- The cell reference.
JSException
- An exception occurred while communicating with the server.public java.lang.String _getCellEntry(Cell cell) throws JSException
cell
- The cell reference.
JSException
- An exception occurred while communicating with the server.public java.lang.String _getCellHTML(Cell cell, int flags) throws JSException
cell
- The cell reference.flags
- 0 = No HTML table tags, 1 = HTML table tags.
JSException
- An exception occurred while communicating with the server.public CellStyle _getCellStyle(Cell cell) throws JSException
cell
- The cell reference.
JSException
- An exception occurred while communicating with the server.public JSValue _getCellValue(Cell cell) throws JSException
cell
- The cell reference.
JSException
- An exception occurred while communicating with the server.public byte[] _getChartAsBytes(java.lang.String name, int imgType, short sheetIdx) throws JSException
name
- The name of the chart.imgType
- The image type to use. 1: GIF, 2: JPEGsheetIdx
- The sheet index.
JSException
- An exception occurred while communicating with the server.public int _getColWidth(int col) throws JSException
col
- The column whose width is to be retrieved.
JSException
- An exception occurred while communicating with the server.public com.iisc.jwc.orb.CSheet _getCSheet(short sheetIndex) throws JSException
JSException
- An exception occurred while communicating with the server.public com.iisc.jwc.orb.CSheetView _getCSheetView(short sheetIndex) throws JSException
JSException
- An exception occurred while communicating with the server.public Cell _getLastCell(short sheetIndex, int type, int roworcol) throws JSException
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 dataroworcol
- The column for last row (types 1 and 3), row for last column (types 2 and 4), and unused for types 5 and 6
JSException
- An exception occurred while communicating with the server.public int _getMyPermissionOnCell(Cell cell) throws JSException
cell
- The cell on which to return protection information.
JSException
- An exception occurred while communicating with the server.public Range _getNamedRange(java.lang.String name) throws JSException
name
- The name of the range.
JSException
- An exception occurred while communicating with the server.public java.lang.String[] _getRangeDisplay(Range range) throws JSException
range
- The range reference.
JSException
- An exception occurred while communicating with the server.public int _getRowHeight(int row) throws JSException
row
- The row whose height is to be retrieved.
JSException
- An exception occurred while communicating with the server.public com.iisc.jwc.jsheet.ISheet _getSheet(short sheetIndex) throws JSException
sheetIndex
- the index of the sheet
JSException
- An exception occurred while communicating with the server.public int _getSheetCount()
public short _getSheetIndex(java.lang.String sheet) throws JSException
sheet
- the value of the sheet attribute.
JSException
- An exception occurred while communicating with the server.public short _getSheetIndexForName(java.lang.String sheetname) throws JSException
sheetname
- The name of the sheet for which an index is desired.
JSException
- An exception occurred while communicating with the server.public byte[] _newChartAsBytes(java.lang.String cdfFileName, java.lang.String cdfText, Range range, int width, int height) throws JSException
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.
JSException
- An exception occurred while communicating with the server.public void _setActiveSheet(short sheet) throws JSException
sheet
- The index of the sheet that is to be made active.
JSException
- An exception occurred while communicating with the server.public void _setActiveSheetUsingString(java.lang.String sheetname) throws JSException
sheetname
- The name of the sheet that is to be made active.
JSException
- An exception occurred while communicating with the server.public void _setCellEntry(Cell cell, java.lang.String data) throws JSException
cell
- The cell reference.data
- The data value.
JSException
- An exception occurred while communicating with the server.public void activeCellChanged(SheetEvent e)
activeCellChanged
in interface SheetListener
e
- getCell() returns the new active cell.public void activeSheetChanged(BookEvent e)
activeSheetChanged
in interface BookListener
e
- getSheetIndex() returns the index of the new active sheet.public void bookClosed(BookEvent e)
bookClosed
in interface BookListener
e
- the BookEvent, no extra parameters.public void bookClosed(SessionEvent e)
bookClosed
in interface SessionListener
e
- getName() returns the name of the book that was closed.public void bookOpened(SessionEvent e)
bookOpened
in interface SessionListener
e
- getName() returns the name of the book that was opened.public void bookSaved(BookEvent e)
bookSaved
in interface BookListener
e
- getName() returns the name of the user that saved the book.public void cellStyleUpdated(SheetEvent e)
cellStyleUpdated
in interface SheetListener
e
- getRange() returns the range and getStyleIndexes() returns array of indices for the styles applied.public void cellValueUpdated(SheetEvent e)
cellValueUpdated
in interface SheetListener
e
- getSheetIndex() returns the sheet index and
getCellData() returns the CCellData changed.public void clientJoined(BookEvent e)
clientJoined
in interface BookListener
e
- getName() returns the user name.public void clientLeft(BookEvent e)
clientLeft
in interface BookListener
e
- getName() returns the user name.public void colWidthUpdated(SheetEvent e)
colWidthUpdated
in interface SheetListener
e
- getSheetIndex() returns the sheet index,
getStart() returns the starting row,
getEnd() returns the ending row, and
getSizes() returns an array of sizes for each of those columns.public void connect(java.lang.String host, java.lang.String user, java.lang.String pwd) throws JSException
connect
in class JSClient
host
- Hostname to which to connect.user
- User name to connect as.pwd
- User password.
JSException
- An exception occurred while connecting to the server.public void deletedLeft(SheetEvent e)
deletedLeft
in interface SheetListener
e
- getRange() returns the range that was deleted.public void deletedUp(SheetEvent e)
deletedUp
in interface SheetListener
e
- getRange() returns the range that was deleted.public void disconnect() throws JSException
disconnect
in class JSClient
JSException
- An exception occurred while disconnecting from the server.public void doubleClicked(SheetEvent e)
doubleClicked
in interface SheetListener
e
- getCell() returns the cell that is double-clicked.public java.lang.String echo(java.lang.String echo)
echo
- The string to return to the client.
public void finalize()
public java.lang.Object getAttribute(java.lang.String name)
name
- A string specifying the name of the object.
public java.lang.String getCellHTML(Cell cell, java.lang.Integer flags) throws JSException
cell
- The cell reference.flags
- 0 = No HTML table tags, 1 = HTML table tags.
JSException
- An exception occurred while communicating with the server.public java.io.ByteArrayOutputStream getEvents()
public static JSClientSession getInstance(java.lang.Object instanceID)
instanceID
- the instance ID of the JSClient to return.
public java.lang.Object getInstanceID()
public void insertedDown(SheetEvent e)
insertedDown
in interface SheetListener
e
- getRange() returns the range that was inserted.public void insertedRight(SheetEvent e)
insertedRight
in interface SheetListener
e
- getRange() returns the range that was inserted.public long jdate2wzdate(long jdate)
public void killClient(SessionEvent e)
killClient
in interface SessionListener
e
- getFlag() returns true
if the server has already cleaned up,
and false
if the client should clean up as quickly as possible.public void leftColChanged(SheetEvent e)
leftColChanged
in interface SheetListener
e
- getSheetIndex() returns the sheet index and getValue() returns the new left column.public boolean lockJSClient(java.lang.Object who)
unlockJSClient(java.lang.Object)
public void messageReceived(SessionEvent e)
messageReceived
in interface SessionListener
e
- getSender() returns the name of the sender and getMsg() returns the message sent.public void rangeStyleUpdated(SheetEvent e)
rangeStyleUpdated
in interface SheetListener
e
- getRange() returns the range and getStyleIndexes() returns array of indices for the styles applied.public void removeAttribute(java.lang.String name)
name
- The name of the object to be removed.public void removeInstance()
public static JSClientSession removeInstance(java.lang.Object instanceID)
instanceID
- the instance ID of the JSClient to remove.public void resetSheets()
public java.lang.String reverseEcho(java.lang.String echo)
echo
- The string to send to the server.
public void rowHeightUpdated(SheetEvent e)
rowHeightUpdated
in interface SheetListener
e
- getSheetIndex() returns the sheet index,
getStart() returns the starting row,
getEnd() returns the ending row, and
getSizes() returns an array of sizes for each of those rows.public void setAttribute(java.lang.String name, java.lang.Object value)
name
- The name to which the object is bound; cannot be null.value
- The object to be bound; cannot be null.public void sheetInserted(BookEvent e)
sheetInserted
in interface BookListener
e
- getName(), getSheetIndex(), and getNameID() returns the new sheet name, new sheet index and net sheet internal ID.public void sheetMoved(BookEvent e)
sheetMoved
in interface BookListener
e
- getFrom() and getTo() return the moved indices of the sheets.public void sheetNameChanged(BookEvent e)
sheetNameChanged
in interface BookListener
e
- getName() and, getSheetIndex() return the new sheet name and the new sheet index.public void sheetPropertiesUpdated(SheetEvent e)
sheetPropertiesUpdated
in interface SheetListener
e
- getSheetIndex() reutnrs the sheet index and
getSheetProperties() returns the CSheetProperties that have changed.public void sheetRemoved(BookEvent e)
sheetRemoved
in interface BookListener
e
- getSheetIndex() returns the index of the removed sheet.public void start(boolean interactive)
public void styleIndexCleared(SheetEvent e)
styleIndexCleared
in interface SheetListener
e
- getRange() returns the range and getStyleIndex() returns the index for the style that was cleared.public void textModified(SheetEvent e)
textModified
in interface SheetListener
e
- getCell() returns the cell and getEntryString() returns the new string in the cell.public void topRowChanged(SheetEvent e)
topRowChanged
in interface SheetListener
e
- getSheetIndex() returns the sheet index and getValue() returns the new top row.public boolean unlockJSClient(java.lang.Object who)
who
- the object that wants to unlock this JSClientSession.
lockJSClient(java.lang.Object)
public void valueBound(HttpSessionBindingEvent event)
event
- the event that identifies the sessionpublic void valueUnbound(HttpSessionBindingEvent event)
event
- the event that identifies the sessionpublic long wzdate2jdate(double wzdate)
|
Email JSheet Support | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |