public class BookImpl extends AbstractBookAdv
| Constructor and Description |
|---|
BookImpl(java.lang.String bookName) |
| Modifier and Type | Method and Description |
|---|---|
int |
addDefaultCellStyle(SCellStyle cellStyle)
Add one more default cell style and return its index.
|
void |
addEventListener(ModelEventListener listener)
add event listener to this book
|
void |
addNamedCellstyle(SNamedStyle namedStyle)
Add one more named cell style.
|
SPictureData |
addPictureData(SPicture.Format format,
byte[] data)
Add
SPictureData into this book |
void |
addTable(STable table) |
protected void |
checkOwnership(SName name) |
protected void |
checkOwnership(SSheet sheet) |
void |
clearDefaultCellStyles() |
void |
clearNamedStyles() |
SCellStyle |
createCellStyle(boolean inStyleTable)
Create a cell style
|
SCellStyle |
createCellStyle(SCellStyle src,
boolean inStyleTable)
Create a cell style and copy the style from the src style.
|
SColor |
createColor(byte r,
byte g,
byte b) |
SColor |
createColor(java.lang.String htmlColor) |
SFont |
createFont(boolean inFontTable) |
SFont |
createFont(SFont src,
boolean inFontTable) |
SName |
createName(java.lang.String namename) |
SName |
createName(java.lang.String namename,
java.lang.String sheetName)
Create a defined name on specified sheet
|
SSheet |
createSheet(java.lang.String name)
Create a sheet
|
SSheet |
createSheet(java.lang.String name,
SSheet src)
Create a sheet and copy the contain form the sheet sheet
|
SName |
createTableName(STable table) |
void |
deleteName(SName name)
Delete a defined name
|
void |
deleteSheet(SSheet sheet)
Delete the sheet
|
void |
dump(java.lang.StringBuilder builder) |
java.lang.Object |
getAttribute(java.lang.String name)
Get the runtime custom attribute that stored in this book
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Get the unmodifiable runtime attributes map
|
java.lang.String |
getBookName()
Get the book name, a book name is unique for book in
SBookSeries |
SBookSeries |
getBookSeries()
Get the book series, it contains a group of book that might refer to other by book name
|
java.util.List<SCellStyle> |
getCellStyleTable() |
SCellStyle |
getDefaultCellStyle()
Get the default style of this book
|
SCellStyle |
getDefaultCellStyle(int index)
Get the nth default style of this book
|
java.util.Collection<SCellStyle> |
getDefaultCellStyles()
Get all default cell styles.
|
SFont |
getDefaultFont() |
EvaluationContributor |
getEvaluationContributor() |
java.util.List<SFont> |
getFontTable() |
java.lang.String |
getId() |
int |
getMaxColumnIndex()
Get the max column index of this book, it is
SBook.getMaxColumnIndex()-1 |
int |
getMaxColumnSize()
Get the max column size of this book
|
int |
getMaxRowIndex()
Get the max row index of this book, it is
SBook.getMaxRowSize()-1 |
int |
getMaxRowSize()
Get the max row size of this book
|
SName |
getName(int idx) |
SName |
getNameByName(java.lang.String namename) |
SName |
getNameByName(java.lang.String namename,
java.lang.String sheetName) |
SNamedStyle |
getNamedStyle(java.lang.String name)
Get the named style of this book
|
java.util.Collection<SNamedStyle> |
getNamedStyles()
Get all name styles.
|
java.util.List<SName> |
getNames() |
int |
getNumOfName() |
int |
getNumOfSheet()
Get the number of sheet
|
SCellStyle |
getOrCreateDefaultHyperlinkStyle()
Returns existing or create SCellStyle for hyperlink.
|
SPictureData |
getPictureData(int index)
Get
SPictureData of the specified index from this book; null if not exist |
java.util.Collection<SPictureData> |
getPicturesDatas()
Returns all
SPictureData fo this book. |
protected Ref |
getRef() |
java.lang.String |
getShareScope() |
SSheet |
getSheet(int i)
Get sheet at the index
|
SSheet |
getSheetById(java.lang.String id)
Get the sheet by id
|
SSheet |
getSheetByName(java.lang.String name)
Get the sheet by name
|
int |
getSheetIndex(SSheet sheet)
Get the index of sheet
|
int |
getSheetIndex(java.lang.String sheetName)
Get the index of sheet
|
java.util.List<SSheet> |
getSheets()
Get all sheets
|
STable |
getTable(java.lang.String name) |
void |
initDefaultCellStyles() |
boolean |
isDirty()
Get if book is changed
|
void |
moveSheetTo(SSheet sheet,
int index)
Move the sheet to new position
|
void |
optimizeCellStyle()
Optimize CellStyle, usually called when export book or after many style operation
|
void |
removeEventListener(ModelEventListener listener)
remove event listener from this book
|
STable |
removeTable(java.lang.String name) |
SCellStyle |
searchCellStyle(CellStyleMatcher matcher)
Search the style table and return the first matched style.
|
SFont |
searchFont(FontMatcher matcher) |
void |
sendModelEvent(ModelEvent event) |
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
Set the runtime custom attribute to stored in this book, the attribute is only use for developer to stored runtime data in the book,
values will not stored to excel when exporting.
|
void |
setDefaultCellStyle(SCellStyle cellStyle)
Set the default style of this book
|
void |
setDirty(boolean dirty)
Set dirty flag
|
void |
setEvaluationContributor(EvaluationContributor contributor) |
void |
setNameName(SName name,
java.lang.String newname) |
void |
setNameName(SName name,
java.lang.String newname,
java.lang.String sheetName) |
void |
setShareScope(java.lang.String scope) |
void |
setSheetName(SSheet sheet,
java.lang.String newname)
Set the sheet to a new name
|
java.lang.String |
setTableColumnName(STable table,
java.lang.String oldName,
java.lang.String newName) |
public void initDefaultCellStyles()
initDefaultCellStyles in class AbstractBookAdvpublic SBookSeries getBookSeries()
SBookpublic java.lang.String getBookName()
SBookSBookSeriespublic SSheet getSheet(int i)
SBooki - the sheet indexpublic int getNumOfSheet()
SBookpublic SSheet getSheetByName(java.lang.String name)
SBookname - the name of sheetpublic SSheet getSheetById(java.lang.String id)
SBookid - the id of sheetprotected void checkOwnership(SSheet sheet)
protected void checkOwnership(SName name)
public void sendModelEvent(ModelEvent event)
sendModelEvent in class AbstractBookAdvpublic SSheet createSheet(java.lang.String name)
SBookname - the name of sheetpublic SSheet createSheet(java.lang.String name, SSheet src)
SBookname - the name of sheetsrc - the source sheet to copyprotected Ref getRef()
public void setSheetName(SSheet sheet, java.lang.String newname)
SBooksheet - the sheetnewname - the new namepublic void deleteSheet(SSheet sheet)
SBooksheet - the sheetpublic void moveSheetTo(SSheet sheet, int index)
SBooksheet - the sheetindex - the new positionpublic void dump(java.lang.StringBuilder builder)
public SCellStyle getDefaultCellStyle()
SBookpublic SCellStyle getDefaultCellStyle(int index)
SBookpublic void setDefaultCellStyle(SCellStyle cellStyle)
SBookpublic SCellStyle createCellStyle(boolean inStyleTable)
SBookinStyleTable - if true, the new created style will be stored inside this book,
then you can use SBook.searchCellStyle(CellStyleMatcher) to search and reuse this style.public SCellStyle createCellStyle(SCellStyle src, boolean inStyleTable)
SBooksrc - the source style to copy from.inStyleTable - if true, the new created style will be stored inside this book,
then you can use SBook.searchCellStyle(CellStyleMatcher) to search and reuse this style.public SCellStyle searchCellStyle(CellStyleMatcher matcher)
SBookmatcher - the style matcherpublic SFont getDefaultFont()
public SFont createFont(boolean inFontTable)
public SFont searchFont(FontMatcher matcher)
public int getMaxRowSize()
SBookpublic int getMaxColumnSize()
SBookpublic void optimizeCellStyle()
SBookpublic java.util.List<SCellStyle> getCellStyleTable()
public java.util.List<SFont> getFontTable()
public void addEventListener(ModelEventListener listener)
SBooklistener - the listenerpublic void removeEventListener(ModelEventListener listener)
SBooklistener - the listenerpublic java.lang.Object getAttribute(java.lang.String name)
SBookname - the attribute namepublic java.lang.Object setAttribute(java.lang.String name,
java.lang.Object value)
SBookname - name the attribute namevalue - the attribute valuepublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
SBookpublic SColor createColor(byte r, byte g, byte b)
public SColor createColor(java.lang.String htmlColor)
public java.util.List<SSheet> getSheets()
SBookpublic SName createName(java.lang.String namename)
public SName createName(java.lang.String namename, java.lang.String sheetName)
SBookpublic void setNameName(SName name, java.lang.String newname)
public void setNameName(SName name, java.lang.String newname, java.lang.String sheetName)
public void deleteName(SName name)
SBookpublic int getNumOfName()
public SName getName(int idx)
public SName getNameByName(java.lang.String namename)
public SName getNameByName(java.lang.String namename, java.lang.String sheetName)
public java.util.List<SName> getNames()
public int getSheetIndex(SSheet sheet)
SBooksheet - the sheetpublic int getSheetIndex(java.lang.String sheetName)
SBookpublic void setShareScope(java.lang.String scope)
public java.lang.String getShareScope()
public EvaluationContributor getEvaluationContributor()
public void setEvaluationContributor(EvaluationContributor contributor)
public int getMaxRowIndex()
SBookSBook.getMaxRowSize()-1public int getMaxColumnIndex()
SBookSBook.getMaxColumnIndex()-1public java.lang.String getId()
getId in class AbstractBookAdvpublic SPictureData addPictureData(SPicture.Format format, byte[] data)
SBookSPictureData into this bookformat - picture formatdata - picture raw datapublic SPictureData getPictureData(int index)
SBookSPictureData of the specified index from this book; null if not existpublic java.util.Collection<SPictureData> getPicturesDatas()
SBookSPictureData fo this book.public SNamedStyle getNamedStyle(java.lang.String name)
SBookpublic int addDefaultCellStyle(SCellStyle cellStyle)
SBookpublic java.util.Collection<SCellStyle> getDefaultCellStyles()
SBookpublic void addNamedCellstyle(SNamedStyle namedStyle)
SBookpublic java.util.Collection<SNamedStyle> getNamedStyles()
SBookpublic void clearDefaultCellStyles()
clearDefaultCellStyles in class AbstractBookAdvpublic void clearNamedStyles()
clearNamedStyles in class AbstractBookAdvpublic boolean isDirty()
SBook#resetDirty()public void setDirty(boolean dirty)
SBookSBook.isDirty()public SName createTableName(STable table)
createTableName in class AbstractBookAdvpublic void addTable(STable table)
addTable in class AbstractBookAdvpublic STable getTable(java.lang.String name)
getTable in class AbstractBookAdvpublic STable removeTable(java.lang.String name)
removeTable in class AbstractBookAdvpublic java.lang.String setTableColumnName(STable table, java.lang.String oldName, java.lang.String newName)
setTableColumnName in class AbstractBookAdvpublic SCellStyle getOrCreateDefaultHyperlinkStyle()
SBookCopyright © 2005-2010 Potix Corporation. All Rights Reserved.