org.zkoss.zss.engine
Interface RefBook

All Known Implementing Classes:
RefBookImpl

public interface RefBook

Internal Use Only. Book that handle the RefSheets.

Author:
henrichen

Method Summary
 java.lang.String getBookName()
          Returns the book name of this reference book.
 java.util.Set<Ref>[] getBothDependents(java.lang.String name)
          Returns both all and last dependent cell references that are affected by the specified variable.
 int getMaxcol()
          Returns the maximum column index of this refernece book (e.g. 255 is the maximum column index of Excel 97, 16K-1 is of Excel 2007).
 int getMaxrow()
          Returns the maximum row index of this reference book (e.g. 64K-1 is the maximum row index of Excel 97, 1M-1 is of Excel 2007).
 RefSheet getOrCreateRefSheet(java.lang.String sheetname)
          Returns (or create then return if not exist) the RefSheet at specified index.
 Ref getOrCreateVariableRef(java.lang.String name, RefSheet dummy)
          Return or create if not exist the specified variable reference.
 RefSheet getRefSheet(java.lang.String sheetname)
          Returns the RefSheet of the specified sheet name; return null if not exists.
 java.lang.String getShareScope()
          Returns share scope of this reference book.
 void publish(org.zkoss.zk.ui.event.Event event)
          Publish an event to this reference book.
 RefSheet removeRefSheet(java.lang.String sheetname)
          Remove and return the RefSheet for the data sheet of the specified sheet name; return null if not exists.
 Ref removeVariableRef(java.lang.String name)
          Remove the specified variable reference.
 void setShareScope(java.lang.String scope)
          Sets share scope of this reference book.
 void setSheetName(java.lang.String oldsheetname, java.lang.String newsheetname)
          Update the sheet name of the specified sheet to new sheet name.
 void subscribe(org.zkoss.zk.ui.event.EventListener listener)
          Subscribe a event listener to this reference book.
 void unsubscribe(org.zkoss.zk.ui.event.EventListener listener)
          Un-subscribe the event listener from this reference book.
 

Method Detail

getBookName

java.lang.String getBookName()
Returns the book name of this reference book.

Returns:
the book name of this reference book.

getOrCreateRefSheet

RefSheet getOrCreateRefSheet(java.lang.String sheetname)
Returns (or create then return if not exist) the RefSheet at specified index.

Parameters:
sheetname - the name of the sheet to be gotten/created
Returns:
the RefSheet for the data sheet at specified index.

getRefSheet

RefSheet getRefSheet(java.lang.String sheetname)
Returns the RefSheet of the specified sheet name; return null if not exists.

Parameters:
sheetname - the name of the sheet to be gotten
Returns:
the RefSheet of the specified sheet name; return null if not exists.

removeRefSheet

RefSheet removeRefSheet(java.lang.String sheetname)
Remove and return the RefSheet for the data sheet of the specified sheet name; return null if not exists.

Parameters:
sheetname - the name of the sheet to be removed
Returns:
the removed RefSheet; return null if not exists.

setSheetName

void setSheetName(java.lang.String oldsheetname,
                  java.lang.String newsheetname)
Update the sheet name of the specified sheet to new sheet name.

Parameters:
oldsheetname - old sheet name used to located the sheet
newsheetname - new sheet name to be set into the located sheet

getMaxrow

int getMaxrow()
Returns the maximum row index of this reference book (e.g. 64K-1 is the maximum row index of Excel 97, 1M-1 is of Excel 2007).

Returns:
The maximum row index of this reference book

getMaxcol

int getMaxcol()
Returns the maximum column index of this refernece book (e.g. 255 is the maximum column index of Excel 97, 16K-1 is of Excel 2007).

Returns:
the maximum column index of this refernece book

subscribe

void subscribe(org.zkoss.zk.ui.event.EventListener listener)
Subscribe a event listener to this reference book.

Parameters:
listener - the event listener that will handle event fired by this reference book.

unsubscribe

void unsubscribe(org.zkoss.zk.ui.event.EventListener listener)
Un-subscribe the event listener from this reference book.

Parameters:
listener - the event listener that will handle event fired by this reference book.

publish

void publish(org.zkoss.zk.ui.event.Event event)
Publish an event to this reference book.

Parameters:
event - the event to be fired by this reference book.

getOrCreateVariableRef

Ref getOrCreateVariableRef(java.lang.String name,
                           RefSheet dummy)
Return or create if not exist the specified variable reference.

Parameters:
name - the name of the specified variable reference
dummy - dummy sheet, used to locate associated RefBook
Returns:
the variable reference.

removeVariableRef

Ref removeVariableRef(java.lang.String name)
Remove the specified variable reference.

Parameters:
name - the name of the specified variable reference
Returns:
the removed variable reference

getBothDependents

java.util.Set<Ref>[] getBothDependents(java.lang.String name)
Returns both all and last dependent cell references that are affected by the specified variable.

Parameters:
name - the variable name
Returns:
reference set: [0] the "last" dependent cell references to be re-evaluated the associated cell value; [1] the "all" dependent cell references to be reloaded the associated cell value.

setShareScope

void setShareScope(java.lang.String scope)
Sets share scope of this reference book.

Parameters:
scope - share scope of thie reference book.

getShareScope

java.lang.String getShareScope()
Returns share scope of this reference book.

Returns:
share scope of this reference book.


Copyright © 2005-2010 Potix Corporation. All Rights Reserved. SourceForge.net Logo