|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.core.Workbook
public class Workbook
A workbook which can contain several spreadsheets.
| Constructor Summary | |
|---|---|
Workbook()
Creates a new empty workbook. |
|
Workbook(int sheets)
Creates a new workbook, which initially contains the given number of blank spreadsheets. |
|
Workbook(String[][]... contents)
Creates a new workbook, using the given content matrix to create spreadsheets initially. |
|
| Method Summary | |
|---|---|
void |
addSpreadsheet()
Adds a blank spreadsheet to the end of the workbook. |
void |
addSpreadsheet(String[][] content)
Adds a new spreadsheet to the workbook, in which cells are initialized with data from the given content matrix. |
void |
addWorkbookListener(WorkbookListener listener)
Registers the given listener on the workbook. |
Spreadsheet |
getSpreadsheet(int index)
Returns the spreadsheet at the given index. |
int |
getSpreadsheetCount()
Returns the number of spreadsheets in the the workbook. |
WorkbookListener[] |
getWorkbookListeners()
Returns the listeners that have been registered on the workbook. |
Iterator<Spreadsheet> |
iterator()
Returns an iterator over the spreadsheets in the workbook. |
void |
removeSpreadsheet(Spreadsheet spreadsheet)
Adds a new blank spreadsheet to the workbook. |
void |
removeWorkbookListener(WorkbookListener listener)
Removes the given listener from the workbook. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Workbook()
public Workbook(int sheets)
sheets - the number of sheets to create initiallypublic Workbook(String[][]... contents)
contents - the content matrices to use when creating spreadsheets| Method Detail |
|---|
public void addSpreadsheet()
public void addSpreadsheet(String[][] content)
content - the contents of the cells in the spreadsheetpublic void removeSpreadsheet(Spreadsheet spreadsheet)
public Spreadsheet getSpreadsheet(int index)
throws IndexOutOfBoundsException
index - the index of the spreadsheet in the workbook
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= |spreadsheets|)public int getSpreadsheetCount()
public Iterator<Spreadsheet> iterator()
iterator in interface Iterable<Spreadsheet>public void addWorkbookListener(WorkbookListener listener)
listener - the listener to be addedpublic void removeWorkbookListener(WorkbookListener listener)
listener - the listener to be removedpublic WorkbookListener[] getWorkbookListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||