public class JROdsExporter extends JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>
JROdsExporter exporter
implementation produces documents that comply with the Open Document Format for
Office Applications specifications for spreadsheets. These documents use the
.ods file extension.
Because spreadsheet documents are made of sheets containing cells, this exporter is a
grid exporter, as well, therefore having the known limitations of grid exporters.
Special exporter configuration settings, that can be applied to a
JROdsExporter instance
to control its behavior, can be found in OdsReportConfiguration
and in its XlsReportConfiguration superclass.OdsReportConfiguration,
XlsReportConfiguration| Modifier and Type | Class and Description |
|---|---|
protected class |
JROdsExporter.ExporterContext |
protected class |
JROdsExporter.OdsDocumentBuilder |
protected class |
JROdsExporter.OdsTableBuilder |
JRXlsAbstractExporter.SheetInfo, JRXlsAbstractExporter.TextAlignHolderJRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.Integer,java.lang.String> |
columnStyles |
protected static java.lang.String |
DEFAULT_ADDRESS |
protected static java.lang.String |
DEFAULT_COLUMN |
protected DocumentBuilder |
documentBuilder |
protected static java.lang.String |
JR_PAGE_ANCHOR_PREFIX |
protected java.lang.StringBuffer |
namedExpressions |
protected OasisZip |
oasisZip |
static java.lang.String |
ODS_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String). |
protected static java.lang.String |
ODS_EXPORTER_PROPERTIES_PREFIX |
protected java.util.Map<java.lang.Integer,java.lang.String> |
rowStyles |
protected boolean |
startPage |
protected StyleCache |
styleCache |
protected TableBuilder |
tableBuilder |
protected ExportZipEntry |
tempBodyEntry |
protected WriterHelper |
tempBodyWriter |
protected ExportZipEntry |
tempStyleEntry |
protected WriterHelper |
tempStyleWriter |
autoFilterEnd, autoFilterStart, DEFAULT_SHEET_NAME_PREFIX, defaultFont, firstPageNotSet, gridColumnFreezeIndex, gridRowFreezeIndex, invalidCharReplacement, isFreezeColumnEdge, isFreezeRowEdge, keepTemplateSheets, loadedFonts, maxColumnFreezeIndex, maxRowFreezeIndex, nature, onePagePerSheetMap, pageIndex, PROPERTY_AUTO_FILTER, PROPERTY_AUTO_FIT_COLUMN, PROPERTY_AUTO_FIT_ROW, PROPERTY_BREAK_AFTER_ROW, PROPERTY_BREAK_BEFORE_ROW, PROPERTY_CELL_FORMULA, PROPERTY_CELL_HIDDEN, PROPERTY_CELL_LOCKED, PROPERTY_CELL_PATTERN, PROPERTY_COLUMN_WIDTH, PROPERTY_COLUMN_WIDTH_RATIO, PROPERTY_FIRST_PAGE_NUMBER, PROPERTY_FIT_HEIGHT, PROPERTY_FIT_WIDTH, PROPERTY_FREEZE_COLUMN, PROPERTY_FREEZE_COLUMN_EDGE, PROPERTY_FREEZE_ROW, PROPERTY_FREEZE_ROW_EDGE, PROPERTY_IGNORE_ANCHORS, PROPERTY_IGNORE_HYPERLINK, PROPERTY_IMAGE_ANCHOR_TYPE, PROPERTY_PAGE_SCALE, PROPERTY_ROW_OUTLINE_LEVEL_PREFIX, PROPERTY_SHEET_DIRECTION, PROPERTY_SHEET_FOOTER_CENTER, PROPERTY_SHEET_FOOTER_LEFT, PROPERTY_SHEET_FOOTER_RIGHT, PROPERTY_SHEET_HEADER_CENTER, PROPERTY_SHEET_HEADER_LEFT, PROPERTY_SHEET_HEADER_RIGHT, PROPERTY_SHEET_NAME, PROPERTY_SHOW_GRIDLINES, PROPERTY_USE_TIMEZONE, PROPERTY_WORKBOOK_TEMPLATE, PROPERTY_WORKBOOK_TEMPLATE_KEEP_SHEETS, PROPERTY_WRAP_TEXT, reportIndex, sheetIndex, sheetNames, sheetNamesIndex, sheetNamesMap, sheetsBeforeCurrentReport, sheetsBeforeCurrentReportMap, workbookTemplate, XLS_EXPORTER_PROPERTIES_PREFIXallSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, styledTextUtil| Constructor and Description |
|---|
JROdsExporter() |
JROdsExporter(JasperReportsContext jasperReportsContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBlankCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
addOccupiedCell(OccupiedGridCell occupiedGridCell,
int colIndex,
int rowIndex) |
protected void |
closeSheet() |
protected void |
closeWorkbook(java.io.OutputStream os) |
protected void |
createSheet(CutsInfo xCuts,
JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell cell,
int colIndex,
int rowIndex) |
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
void |
exportImage(JRPrintImage image,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
exportRectangle(JRPrintGraphicElement rectangle,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
void |
exportText(JRPrintText text,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected java.lang.String |
getCellAddress(int row,
int col) |
protected java.lang.String |
getColumnName(int colIndex) |
protected java.lang.Class<OdsExporterConfiguration> |
getConfigurationInterface() |
java.lang.String |
getExporterKey() |
java.lang.String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected java.lang.Class<OdsReportConfiguration> |
getItemConfigurationInterface() |
protected void |
initExport() |
protected void |
initReport() |
protected void |
insertPageAnchor(TableBuilder tableBuilder) |
protected void |
openWorkbook(java.io.OutputStream os) |
protected void |
setAutoFilter(java.lang.String autoFilterRange) |
protected void |
setColumnWidth(int col,
int width,
boolean autoFit) |
protected void |
setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge) |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected void |
setRowLevels(XlsRowLevelInfo levelInfo,
java.lang.String level) |
protected void |
setScale(java.lang.Integer scale) |
protected void |
setSheetName(java.lang.String sheetName) |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, ensureOutput, exportPage, exportReport, exportReportToStream, exportSheet, getColumnIndex, getConvertedPattern, getDefaultFont, getFormula, getImageBorderCorrection, getNature, getSheetProps, getStyledText, getTextAlignHolder, getWorkbookTemplate, hasGlobalSheetNames, isCellHidden, isCellLocked, isUseTimeZone, isValidScale, isWorkbookTemplateKeepSheets, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setColumnWidths, setFreezePane, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValuecreateFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getReportContext, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContextprotected static final java.lang.String JR_PAGE_ANCHOR_PREFIX
protected static final java.lang.String DEFAULT_COLUMN
protected static final java.lang.String DEFAULT_ADDRESS
protected OasisZip oasisZip
protected ExportZipEntry tempBodyEntry
protected ExportZipEntry tempStyleEntry
protected WriterHelper tempBodyWriter
protected WriterHelper tempStyleWriter
protected StyleCache styleCache
protected DocumentBuilder documentBuilder
protected TableBuilder tableBuilder
protected boolean startPage
protected java.lang.StringBuffer namedExpressions
protected java.util.Map<java.lang.Integer,java.lang.String> rowStyles
protected java.util.Map<java.lang.Integer,java.lang.String> columnStyles
protected static final java.lang.String ODS_EXPORTER_PROPERTIES_PREFIX
public static final java.lang.String ODS_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String).public JROdsExporter()
JROdsExporter(JasperReportsContext)public JROdsExporter(JasperReportsContext jasperReportsContext)
protected void openWorkbook(java.io.OutputStream os)
throws JRException,
java.io.IOException
openWorkbook in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionjava.io.IOExceptionprotected void createSheet(CutsInfo xCuts, JRXlsAbstractExporter.SheetInfo sheetInfo)
createSheet in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void closeSheet()
protected void closeWorkbook(java.io.OutputStream os)
throws JRException,
java.io.IOException
closeWorkbook in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionjava.io.IOExceptionprotected void setColumnWidth(int col,
int width,
boolean autoFit)
setColumnWidth in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo)
throws JRException
setRowHeight in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex)
addBlankCell in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) throws JRException
addOccupiedCell in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionpublic void exportText(JRPrintText text, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportText in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionpublic void exportImage(JRPrintImage image, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected java.lang.String getCellAddress(int row,
int col)
protected java.lang.String getColumnName(int colIndex)
getColumnName in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void exportRectangle(JRPrintGraphicElement rectangle, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportRectangle in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportLine in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected void exportFrame(JRPrintFrame frame, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException
exportFrame in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>JRExceptionprotected void setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
setFreezePane in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void setSheetName(java.lang.String sheetName)
setSheetName in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void setAutoFilter(java.lang.String autoFilterRange)
setAutoFilter in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void setRowLevels(XlsRowLevelInfo levelInfo, java.lang.String level)
setRowLevels in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void setScale(java.lang.Integer scale)
setScale in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected java.lang.Class<OdsExporterConfiguration> getConfigurationInterface()
protected java.lang.Class<OdsReportConfiguration> getItemConfigurationInterface()
protected void initExport()
initExport in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>protected void initReport()
initReport in class JRXlsAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,JROdsExporterContext>public java.lang.String getExporterKey()
public java.lang.String getExporterPropertiesPrefix()
JRAbstractExportergetExporterPropertiesPrefix in class JRAbstractExporter<OdsReportConfiguration,OdsExporterConfiguration,OutputStreamExporterOutput,JROdsExporterContext>protected void insertPageAnchor(TableBuilder tableBuilder)
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com