Class JRXlsAbstractMetadataExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>
java.lang.Object
net.sf.jasperreports.engine.JRAbstractExporter<RC,C,OutputStreamExporterOutput,E>
net.sf.jasperreports.engine.export.ExcelAbstractExporter<RC,C,E>
net.sf.jasperreports.engine.export.JRXlsAbstractExporter<RC,C,E>
net.sf.jasperreports.engine.export.JRXlsAbstractMetadataExporter<RC,C,E>
- All Implemented Interfaces:
Exporter<ExporterInput,
RC, C, OutputStreamExporterOutput>
- Direct Known Subclasses:
JRXlsMetadataExporter
public abstract class JRXlsAbstractMetadataExporter<RC extends XlsMetadataReportConfiguration,C extends XlsMetadataExporterConfiguration,E extends JRExporterContext>
extends JRXlsAbstractExporter<RC,C,E>
- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
JRXlsAbstractExporter.SheetInfo
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.ExcelAbstractExporter
ExcelAbstractExporter.NameScope, ExcelAbstractExporter.TextAlignHolder
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected int
Fields inherited from class net.sf.jasperreports.engine.export.ExcelAbstractExporter
autoFilterEnd, autoFilterStart, collapseRowSpan, CURRENT_ROW_AUTOFIT, CURRENT_ROW_HEIGHT, DEFAULT_DEFINED_NAME_SCOPE, DEFAULT_DEFINED_NAME_SCOPE_SEPARATOR, DEFAULT_SHEET_NAME_PREFIX, defaultCellHidden, defaultCellLocked, defaultFont, defaultIgnoreHyperlink, defaultIgnoreTextFormatting, defaultImageAnchorType, defaultShrinkToFit, defaultUseTimeZone, defaultWrapText, definedNamesMap, detectCellType, 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, formatPatternsMap, ignoreAnchors, imageBorderFixEnabled, invalidCharReplacement, keepTemplateSheets, loadedFonts, maxColumnIndex, nature, onePagePerSheet, onePagePerSheetMap, pageFormat, pageIndex, PROPERTY_AUTO_FILTER, PROPERTY_AUTO_FIT_COLUMN, PROPERTY_AUTO_FIT_ROW, PROPERTY_AVERAGE_CHAR_WIDTH_FACTOR, PROPERTY_BREAK_AFTER_ROW, PROPERTY_BREAK_BEFORE_ROW, PROPERTY_CELL_FORMULA, PROPERTY_CELL_PATTERN, PROPERTY_COLUMN_NAME, PROPERTY_COLUMN_WIDTH, PROPERTY_COLUMN_WIDTH_METADATA, PROPERTY_DATA, PROPERTY_FREEZE_COLUMN_EDGE, PROPERTY_FREEZE_ROW_EDGE, PROPERTY_IGNORE_ROW_HEIGHT, PROPERTY_REPEAT_VALUE, PROPERTY_ROW_OUTLINE_LEVEL_PREFIX, PROPERTY_SHEET_NAME, renderersCache, reportIndex, sheetIndex, sheetInfo, sheetNames, sheetNamesIndex, sheetNamesMap, sheetsBeforeCurrentReport, sheetsBeforeCurrentReportMap, workbookTemplate, XLS_EXPORTER_PROPERTIES_PREFIX
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
allSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_EMPTY_INPUT_SOURCE_IN_BATCH_MODE, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_NO_INPUT_SOURCE, EXCEPTION_MESSAGE_KEY_NO_OUTPUT_SPECIFIED, 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, hyperlinkProducerFactory, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBlankCell
(JRExporterGridCell gridCell, int colIndex, int rowIndex) protected void
addOccupiedCell
(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) protected abstract void
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
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
protected abstract void
exportText
(JRPrintText textElement) protected void
exportText
(JRPrintText text, JRExporterGridCell cell, int colIndex, int rowIndex) protected String
getFormula
(JRPrintText text) protected int
protected abstract ExporterNature
protected String
getSheetName
(String sheetName) protected JRStyledText
getStyledText
(JRPrintText textElement) protected void
protected void
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 orderprotected abstract void
protected void
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
updateSheet
(JRPrintElement element) protected abstract void
protected abstract void
Methods inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
configureHeaderFooter, configurePrintSettings, exportEmptyReport, exportPage, exportSheet, getSheetProps, setColumnWidths
Methods inherited from class net.sf.jasperreports.engine.export.ExcelAbstractExporter
addRowBreak, calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, closeSheet, configureDefinedNames, configureDefinedNames, configureDefinedNames, ensureInput, exportReport, getColumIndexName, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getMaxRowsPerSheet, getSheetName, getTextAlignHolder, hasGlobalSheetNames, isCellHidden, isCellLocked, isIgnoreTextFormatting, isShrinkToFit, isUseTimeZone, isValidScale, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setAutoFilter, setFreezePane, setRowLevels, setSheetName, setSheetNames, toExcelName, translateDateValue, updateHeaderFooter, updatePrintSettings
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
checkInterrupted, createFilter, defaultParseNumber, ensureJasperReportsContext, ensureOutput, getBooleanCellValue, getConfigurationInterface, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getDateCellValue, getDateFormat, getExporterConfiguration, getExporterContext, getExporterInput, getExporterKey, getExporterOutput, getExporterPropertiesPrefix, getHyperlinkProducer, getItemConfigurationInterface, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getPropertiesUtil, getRendererUtil, getReportContext, getReportExportConfiguration, getRepository, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetExportContext, restoreElementOffsets, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperReportsContext, setOffset, setOffset, setReportContext
-
Field Details
-
columnNames
-
columnNamesMap
-
rowIndex
protected int rowIndex -
hasDefinedColumns
protected boolean hasDefinedColumns -
currentRow
-
repeatedValues
-
-
Constructor Details
-
JRXlsAbstractMetadataExporter
public JRXlsAbstractMetadataExporter()- See Also:
-
JRXlsAbstractMetadataExporter
-
-
Method Details
-
initExport
protected void initExport()- Overrides:
initExport
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
initReport
protected void initReport()- Overrides:
initReport
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
setColumnNames
protected void setColumnNames() -
exportReportToStream
- Overrides:
exportReportToStream
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
IOException
-
exportPage
- Throws:
JRException
-
getStyledText
- Overrides:
getStyledText
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
getImageBorderCorrection
- Overrides:
getImageBorderCorrection
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
getSheetName
- Overrides:
getSheetName
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
getFormula
- Overrides:
getFormula
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
isColumnReadOnTime
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- Parameters:
currentRow
-currentColumnName
-
-
exportText
protected void exportText(JRPrintText text, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException - Specified by:
exportText
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportImage
public void exportImage(JRPrintImage image, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException - Specified by:
exportImage
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportRectangle
protected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException - Specified by:
exportRectangle
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportLine
protected void exportLine(JRPrintLine line, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException - Specified by:
exportLine
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportFrame
protected void exportFrame(JRPrintFrame frame, JRExporterGridCell cell, int colIndex, int rowIndex) throws JRException - Specified by:
exportFrame
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportGenericElement
protected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException - Specified by:
exportGenericElement
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
addBlankCell
protected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException - Specified by:
addBlankCell
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
addOccupiedCell
protected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) throws JRException - Specified by:
addOccupiedCell
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
getNature
- Overrides:
getNature
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
openWorkbook
- Specified by:
openWorkbook
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
createSheet
- Specified by:
createSheet
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
createSheet
-
closeWorkbook
- Specified by:
closeWorkbook
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
setColumnWidth
protected void setColumnWidth(int col, int width) -
setColumnWidth
protected abstract void setColumnWidth(int col, int width, boolean autoFit) - Specified by:
setColumnWidth
in classExcelAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext>
-
setRowHeight
- Throws:
JRException
-
setRowHeight
protected abstract void setRowHeight(int rowIndex, int lastRowHeight, Cut yCut, XlsRowLevelInfo levelInfo) throws JRException - Specified by:
setRowHeight
in classJRXlsAbstractExporter<RC extends XlsMetadataReportConfiguration,
C extends XlsMetadataExporterConfiguration, E extends JRExporterContext> - Throws:
JRException
-
exportText
- Throws:
JRException
-
exportImage
- Throws:
JRException
-
exportRectangle
- Throws:
JRException
-
exportLine
- Throws:
JRException
-
exportFrame
- Throws:
JRException
-
exportGenericElement
- Throws:
JRException
-
writeCurrentRow
protected abstract void writeCurrentRow(Map<String, Object> currentRow, Map<String, throws JRExceptionObject> repeatedValues) - Throws:
JRException
-
writeReportHeader
- Throws:
JRException
-
updateSheet
-