|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nl.fountain.xelem.lex.DefaultExcelReaderListener nl.fountain.xelem.lex.WorkbookListener
public class WorkbookListener
A concrete implementation of ExcelReaderListener
. Listens to
events, values and instances fired by ExcelReader
and (re)constructs
the Workbook
. After the read has completed
the current workbook may be obtained by getWorkbook()
.
Constructor Summary | |
---|---|
WorkbookListener()
|
Method Summary | |
---|---|
Workbook |
getWorkbook()
Gets the current workbook. |
void |
setAutoFilter(int sheetIndex,
String sheetName,
AutoFilter autoFilter)
Called by event dispatcher. |
void |
setColumn(int sheetIndex,
String sheetName,
Column column)
Called by event dispatcher. |
void |
setDocumentProperties(DocumentProperties docProps)
Called by event dispatcher. |
void |
setExcelWorkbook(ExcelWorkbook excelWb)
Called by event dispatcher. |
void |
setNamedRange(int sheetIndex,
String sheetName,
NamedRange namedRange)
Called by event dispatcher. |
void |
setNamedRange(NamedRange namedRange)
Called by event dispatcher. |
void |
setRow(int sheetIndex,
String sheetName,
Row row)
Called by event dispatcher. |
void |
setWorksheetOptions(int sheetIndex,
String sheetName,
WorksheetOptions wsOptions)
Called by event dispatcher. |
void |
startTable(int sheetIndex,
String sheetName,
Table table)
Called by event dispatcher. |
void |
startWorkbook(String systemID)
Called by event dispatcher. |
void |
startWorksheet(int sheetIndex,
Worksheet sheet)
Called by event dispatcher. |
Methods inherited from class nl.fountain.xelem.lex.DefaultExcelReaderListener |
---|
endDocument, endWorksheet, processingInstruction, setCell, startDocument |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkbookListener()
Method Detail |
---|
public Workbook getWorkbook()
public void startWorkbook(String systemID)
XLWorkbook
.
The workbookName may be set to a relevant portion of the passed
systemID
.
The fileName of the workbook is set to systemID
.
The newly constructed Workbook is made the current workbook.
startWorkbook
in interface ExcelReaderListener
startWorkbook
in class DefaultExcelReaderListener
systemID
- the systemID or "source" if no systemID was encounteredpublic void setDocumentProperties(DocumentProperties docProps)
setDocumentProperties
in interface ExcelReaderListener
setDocumentProperties
in class DefaultExcelReaderListener
docProps
- fully populated instance of DocumentPropertiespublic void setExcelWorkbook(ExcelWorkbook excelWb)
setExcelWorkbook
in interface ExcelReaderListener
setExcelWorkbook
in class DefaultExcelReaderListener
excelWb
- fully populated instance of ExcelWorkbookpublic void setNamedRange(NamedRange namedRange)
setNamedRange
in interface ExcelReaderListener
setNamedRange
in class DefaultExcelReaderListener
namedRange
- fully populated instance of NamedRangepublic void startWorksheet(int sheetIndex, Worksheet sheet)
startWorksheet
in interface ExcelReaderListener
startWorksheet
in class DefaultExcelReaderListener
sheetIndex
- the index of the encountered sheet. 0-based.sheet
- dummy instance of Worksheet. Only the (xml-)attributes
of the Worksheet-element have been set on the instancepublic void setNamedRange(int sheetIndex, String sheetName, NamedRange namedRange)
setNamedRange
in interface ExcelReaderListener
setNamedRange
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the namedRange was foundnamedRange
- fully populated instance of NamedRangepublic void startTable(int sheetIndex, String sheetName, Table table)
startTable
in interface ExcelReaderListener
startTable
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the table was foundtable
- dummy instance of Table. Only the (xml-)attributes
of the Table-element have been set on the instancepublic void setColumn(int sheetIndex, String sheetName, Column column)
column.getIndex()
.
The passed column is added to the current table.
setColumn
in interface ExcelReaderListener
setColumn
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the column was foundcolumn
- fully populated instance of Columnpublic void setRow(int sheetIndex, String sheetName, Row row)
row.getIndex()
.
The passed row is added to the current table.
setRow
in interface ExcelReaderListener
setRow
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the row was foundrow
- fully populated instance of Rowpublic void setWorksheetOptions(int sheetIndex, String sheetName, WorksheetOptions wsOptions)
setWorksheetOptions
in interface ExcelReaderListener
setWorksheetOptions
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the worksheetOptions was foundwsOptions
- fully populated instance of WorksheetOptionspublic void setAutoFilter(int sheetIndex, String sheetName, AutoFilter autoFilter)
setAutoFilter
in interface ExcelReaderListener
setAutoFilter
in class DefaultExcelReaderListener
sheetIndex
- the index of the worksheet (0-based)sheetName
- the name of the worksheet where the autoFilter was foundautoFilter
- fully populated instance of AutoFilter
|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |