public abstract class JRXlsAbstractMetadataExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext> extends JRXlsAbstractExporter<RC,C,E>
JRXlsAbstractExporter.SheetInfo, JRXlsAbstractExporter.TextAlignHolderJRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
columnNames |
protected Map<String,Integer> |
columnNamesMap |
static String |
PROPERTY_COLUMN_NAME
A string that represents the name for the column that should appear in the XLS export.
|
static String |
PROPERTY_DATA
Property that specifies what value to associate with
PROPERTY_COLUMN_NAME. |
static String |
PROPERTY_REPEAT_VALUE
Property that specifies whether the value associated with
PROPERTY_COLUMN_NAME should be repeated or not
when it is missing. |
protected int |
rowIndex |
autoFilterEnd, autoFilterStart, DEFAULT_SHEET_NAME_PREFIX, defaultFont, EXCEPTION_MESSAGE_KEY_CANNOT_ADD_CELL, EXCEPTION_MESSAGE_KEY_CANNOT_MERGE_CELLS, EXCEPTION_MESSAGE_KEY_CELL_FORMAT_TEMPLATE_ERROR, EXCEPTION_MESSAGE_KEY_COLUMN_INDEX_BEYOND_LIMIT, EXCEPTION_MESSAGE_KEY_LOADED_FONTS_ERROR, EXCEPTION_MESSAGE_KEY_NEGATIVE_COLUMN_INDEX, EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_ERROR, EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, firstPageNotSet, invalidCharReplacement, keepTemplateSheets, loadedFonts, maxColumnIndex, nature, onePagePerSheetMap, pageFormat, 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, renderersCache, reportIndex, sheetIndex, sheetInfo, 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_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_MIXED_CALLS_NOT_ALLOWED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses| Constructor and Description |
|---|
JRXlsAbstractMetadataExporter() |
JRXlsAbstractMetadataExporter(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 abstract void |
closeWorkbook(OutputStream os) |
protected void |
createSheet(CutsInfo xCuts,
JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected abstract void |
createSheet(JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected abstract void |
exportFrame(JRPrintFrame frame) |
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell cell,
int colIndex,
int rowIndex) |
protected abstract void |
exportGenericElement(JRGenericPrintElement element) |
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell cell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
abstract void |
exportImage(JRPrintImage image) |
void |
exportImage(JRPrintImage image,
JRExporterGridCell cell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
protected abstract void |
exportLine(JRPrintLine line) |
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell cell,
int colIndex,
int rowIndex) |
protected int |
exportPage(JRPrintPage page) |
protected abstract void |
exportRectangle(JRPrintGraphicElement element) |
protected void |
exportRectangle(JRPrintGraphicElement element,
JRExporterGridCell cell,
int colIndex,
int rowIndex) |
protected void |
exportReportToStream(OutputStream os) |
protected abstract void |
exportText(JRPrintText textElement) |
protected void |
exportText(JRPrintText text,
JRExporterGridCell cell,
int colIndex,
int rowIndex) |
protected String |
getFormula(JRPrintText text) |
protected int |
getImageBorderCorrection(JRPen pen) |
protected abstract ExporterNature |
getNature() |
protected JRStyledText |
getStyledText(JRPrintText textElement) |
protected void |
initExport() |
protected void |
initReport() |
protected boolean |
isColumnReadOnTime(Map<String,Object> currentRow,
String currentColumnName)
Compares the highest index of the currentRow's columns with the index of the column to be inserted
to determine if the current column is read in the proper order
|
protected abstract void |
openWorkbook(OutputStream os) |
protected void |
setColumnNames() |
protected void |
setColumnWidth(int col,
int width) |
protected abstract void |
setColumnWidth(int col,
int width,
boolean autoFit) |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight) |
protected abstract void |
setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected abstract void |
writeCurrentRow(Map<String,Object> currentRow,
Map<String,Object> repeatedValues) |
protected abstract void |
writeReportHeader() |
addRowBreak, calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, closeSheet, ensureInput, ensureOutput, exportEmptyReport, exportPage, exportReport, exportSheet, getColumIndexName, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getMaxRowsPerSheet, getSheetProps, getTextAlignHolder, getWorkbookTemplate, hasGlobalSheetNames, isCellHidden, isCellLocked, isIgnoreTextFormatting, isShrinkToFit, isUseTimeZone, isValidScale, isWorkbookTemplateKeepSheets, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setAutoFilter, setColumnWidths, setFreezePane, setFreezePane, setRowLevels, setSheetName, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValuecreateFilter, defaultParseNumber, ensureJasperReportsContext, getBooleanCellValue, getConfigurationInterface, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterKey, getExporterOutput, getExporterPropertiesPrefix, getHyperlinkProducer, getItemConfigurationInterface, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getRendererUtil, getReportContext, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContextpublic static final String PROPERTY_COLUMN_NAME
XlsMetadataReportConfiguration.getColumnNames(), if provided.JRPropertiesUtil,
Constant Field Valuespublic static final String PROPERTY_REPEAT_VALUE
PROPERTY_COLUMN_NAME should be repeated or not
when it is missing.
The property itself defaults to false.
JRPropertiesUtil,
Constant Field Valuespublic static final String PROPERTY_DATA
PROPERTY_COLUMN_NAME.
The property itself defaults to the text value of the report element that this property is assigned to.
JRPropertiesUtil,
Constant Field Valuesprotected int rowIndex
public JRXlsAbstractMetadataExporter()
public JRXlsAbstractMetadataExporter(JasperReportsContext jasperReportsContext)
protected void initExport()
initExport in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected void initReport()
initReport in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected void setColumnNames()
protected void exportReportToStream(OutputStream os) throws JRException, IOException
exportReportToStream in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionIOExceptionprotected int exportPage(JRPrintPage page) throws JRException
JRExceptionprotected JRStyledText getStyledText(JRPrintText textElement)
getStyledText in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected int getImageBorderCorrection(JRPen pen)
getImageBorderCorrection in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected String getFormula(JRPrintText text)
getFormula in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected boolean isColumnReadOnTime(Map<String,Object> currentRow, String currentColumnName)
currentRow - currentColumnName - protected void exportText(JRPrintText text, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException
exportText in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionpublic void exportImage(JRPrintImage image, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException
exportRectangle in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void exportLine(JRPrintLine line, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException
exportLine in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void exportFrame(JRPrintFrame frame, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException
exportFrame in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
addBlankCell in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) throws JRException
addOccupiedCell in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected abstract ExporterNature getNature()
getNature in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected abstract void openWorkbook(OutputStream os) throws JRException
openWorkbook in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void createSheet(CutsInfo xCuts, JRXlsAbstractExporter.SheetInfo sheetInfo)
createSheet in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected abstract void createSheet(JRXlsAbstractExporter.SheetInfo sheetInfo)
protected abstract void closeWorkbook(OutputStream os) throws JRException
closeWorkbook in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected void setColumnWidth(int col,
int width)
protected abstract void setColumnWidth(int col,
int width,
boolean autoFit)
setColumnWidth in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>protected void setRowHeight(int rowIndex,
int lastRowHeight)
throws JRException
JRExceptionprotected abstract void setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo)
throws JRException
setRowHeight in class JRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>JRExceptionprotected abstract void exportText(JRPrintText textElement) throws JRException
JRExceptionpublic abstract void exportImage(JRPrintImage image) throws JRException
JRExceptionprotected abstract void exportRectangle(JRPrintGraphicElement element) throws JRException
JRExceptionprotected abstract void exportLine(JRPrintLine line) throws JRException
JRExceptionprotected abstract void exportFrame(JRPrintFrame frame) throws JRException
JRExceptionprotected abstract void exportGenericElement(JRGenericPrintElement element) throws JRException
JRExceptionprotected abstract void writeCurrentRow(Map<String,Object> currentRow, Map<String,Object> repeatedValues) throws JRException
JRExceptionprotected abstract void writeReportHeader()
throws JRException
JRExceptionCopyright © 2017. All rights reserved.