public class JRXlsExporter extends JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
JRXlsAbstractExporter
,
XlsExporterConfiguration
,
XlsReportConfiguration
Modifier and Type | Class and Description |
---|---|
protected class |
JRXlsExporter.ExporterContext |
protected class |
JRXlsExporter.StyleInfo |
JRXlsAbstractExporter.SheetInfo, JRXlsAbstractExporter.TextAlignHolder
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange
Modifier and Type | Field and Description |
---|---|
protected Map<String,List<org.apache.poi.ss.usermodel.Hyperlink>> |
anchorLinks |
protected Map<String,org.apache.poi.hssf.usermodel.HSSFName> |
anchorNames |
protected Map<org.apache.poi.hssf.usermodel.HSSFSheet,List<Integer>> |
autofitColumns |
protected short |
backgroundMode |
protected short |
blackIndex |
protected org.apache.poi.hssf.usermodel.HSSFCell |
cell |
protected org.apache.poi.ss.usermodel.CreationHelper |
createHelper |
protected short |
customColorIndex |
protected org.apache.poi.hssf.usermodel.HSSFDataFormat |
dataFormat |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
emptyCellStyle |
protected Map<JRXlsExporter.StyleInfo,org.apache.poi.hssf.usermodel.HSSFCellStyle> |
loadedCellStyles |
static short |
MAX_COLOR_INDEX |
static short |
MIN_COLOR_INDEX |
protected Map<Integer,List<org.apache.poi.ss.usermodel.Hyperlink>> |
pageLinks |
protected org.apache.poi.hssf.usermodel.HSSFPatriarch |
patriarch |
protected org.apache.poi.hssf.usermodel.HSSFRow |
row |
protected org.apache.poi.hssf.usermodel.HSSFSheet |
sheet |
protected short |
whiteIndex |
protected org.apache.poi.hssf.usermodel.HSSFWorkbook |
workbook |
static String |
XLS_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String) . |
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_PREFIX
allSelector, 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 |
---|
JRXlsExporter() |
JRXlsExporter(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 |
addRowBreak(int rowIndex) |
protected void |
closeSheet() |
protected void |
closeWorkbook(OutputStream os) |
protected void |
createMergeRegion(JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle) |
protected void |
createSheet(CutsInfo xCuts,
JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected void |
createTextCell(JRPrintText textElement,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
JRStyledText styledText,
JRXlsExporter.StyleInfo baseStyle,
short forecolor) |
protected void |
endCreateCell(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle) |
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell,
int x,
int y) |
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
void |
exportImage(JRPrintImage element,
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 element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
void |
exportText(JRPrintText textElement,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected static short |
getBorderStyle(JRPen pen) |
protected double |
getColumnRelativePosition(JRGridLayout layout,
int col,
int offset) |
protected Class<XlsExporterConfiguration> |
getConfigurationInterface() |
String |
getExporterKey() |
String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected Class<XlsReportConfiguration> |
getItemConfigurationInterface() |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
getLoadedCellStyle(JRXlsExporter.StyleInfo style) |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
org.apache.poi.hssf.usermodel.HSSFFont font,
JRExporterGridCell gridCell,
boolean isWrapText,
boolean isCellLocked,
boolean isCellHidden,
boolean isShrinkToFit) |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
org.apache.poi.hssf.usermodel.HSSFFont font,
net.sf.jasperreports.engine.export.JRXlsExporter.BoxStyle box,
boolean isWrapText,
boolean isCellLocked,
boolean isCellHidden,
boolean isShrinkToFit) |
protected org.apache.poi.hssf.usermodel.HSSFFont |
getLoadedFont(JRFont font,
short forecolor,
Map<AttributedCharacterIterator.Attribute,Object> attributes,
Locale locale) |
protected Integer |
getMaxRowsPerSheet() |
protected org.apache.poi.hssf.util.HSSFColor |
getNearestColor(Color awtColor) |
protected org.apache.poi.hssf.usermodel.HSSFRichTextString |
getRichTextString(JRStyledText styledText,
short forecolor,
JRFont defaultFont,
Locale locale) |
protected double |
getRowRelativePosition(JRGridLayout layout,
int row,
int offset) |
protected org.apache.poi.hssf.util.HSSFColor |
getWorkbookColor(Color awtColor) |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
initCreateCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
JRXlsExporter.StyleInfo baseStyle) |
protected void |
initExport() |
protected void |
initReport() |
protected void |
openWorkbook(OutputStream os) |
protected void |
setAutoFilter(String autoFilterRange) |
protected void |
setColumnWidth(int col,
int width,
boolean autoFit) |
protected void |
setFreezePane(int rowIndex,
int colIndex)
Creates a freeze pane for the current sheet.
|
protected void |
setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
Deprecated.
to be removed; replaced by
setFreezePane(int, int) |
protected void |
setHyperlinkCell(JRPrintHyperlink hyperlink) |
protected void |
setRichTextStringCellValue(JRStyledText styledText,
short forecolor,
JRFont defaultFont,
Locale locale) |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected void |
setRowLevels(XlsRowLevelInfo levelInfo,
String level) |
protected void |
setSheetName(String sheetName) |
protected void |
setStringCellValue(String textStr) |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, ensureInput, ensureOutput, exportEmptyReport, exportPage, exportReport, exportReportToStream, exportSheet, getColumIndexName, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getFormula, getImageBorderCorrection, getNature, getSheetProps, getStyledText, getTextAlignHolder, getWorkbookTemplate, hasGlobalSheetNames, isCellHidden, isCellLocked, isIgnoreTextFormatting, isShrinkToFit, isUseTimeZone, isValidScale, isWorkbookTemplateKeepSheets, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setColumnWidths, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValue
createFilter, defaultParseNumber, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, 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, setReportContext
public static final String XLS_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String)
.public static short MAX_COLOR_INDEX
public static short MIN_COLOR_INDEX
protected Map<JRXlsExporter.StyleInfo,org.apache.poi.hssf.usermodel.HSSFCellStyle> loadedCellStyles
protected org.apache.poi.hssf.usermodel.HSSFWorkbook workbook
protected org.apache.poi.hssf.usermodel.HSSFSheet sheet
protected org.apache.poi.hssf.usermodel.HSSFRow row
protected org.apache.poi.hssf.usermodel.HSSFCell cell
protected org.apache.poi.hssf.usermodel.HSSFCellStyle emptyCellStyle
protected org.apache.poi.ss.usermodel.CreationHelper createHelper
protected short whiteIndex
protected short blackIndex
protected short customColorIndex
protected short backgroundMode
protected org.apache.poi.hssf.usermodel.HSSFDataFormat dataFormat
protected org.apache.poi.hssf.usermodel.HSSFPatriarch patriarch
public JRXlsExporter()
JRXlsExporter(JasperReportsContext)
public JRXlsExporter(JasperReportsContext jasperReportsContext)
protected Class<XlsExporterConfiguration> getConfigurationInterface()
protected Class<XlsReportConfiguration> getItemConfigurationInterface()
protected void initExport()
initExport
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void initReport()
initReport
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void openWorkbook(OutputStream os)
openWorkbook
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void createSheet(CutsInfo xCuts, JRXlsAbstractExporter.SheetInfo sheetInfo)
createSheet
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void closeSheet()
closeSheet
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void closeWorkbook(OutputStream os) throws JRException
closeWorkbook
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
JRException
protected void setColumnWidth(int col, int width, boolean autoFit)
setColumnWidth
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void setRowHeight(int rowIndex, int lastRowHeight, Cut yCut, XlsRowLevelInfo levelInfo)
setRowHeight
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void addRowBreak(int rowIndex)
addRowBreak
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex)
addBlankCell
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex)
addOccupiedCell
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int colIndex, int rowIndex)
exportLine
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex)
exportRectangle
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
public void exportText(JRPrintText textElement, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportText
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
JRException
protected void createTextCell(JRPrintText textElement, JRExporterGridCell gridCell, int colIndex, int rowIndex, JRStyledText styledText, JRXlsExporter.StyleInfo baseStyle, short forecolor) throws JRException
JRException
protected org.apache.poi.hssf.usermodel.HSSFCellStyle initCreateCell(JRExporterGridCell gridCell, int colIndex, int rowIndex, JRXlsExporter.StyleInfo baseStyle)
protected void endCreateCell(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle)
protected final void setStringCellValue(String textStr)
protected final void setRichTextStringCellValue(JRStyledText styledText, short forecolor, JRFont defaultFont, Locale locale)
protected org.apache.poi.hssf.usermodel.HSSFRichTextString getRichTextString(JRStyledText styledText, short forecolor, JRFont defaultFont, Locale locale)
protected void createMergeRegion(JRExporterGridCell gridCell, int colIndex, int rowIndex, org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle)
protected org.apache.poi.hssf.util.HSSFColor getWorkbookColor(Color awtColor)
protected org.apache.poi.hssf.util.HSSFColor getNearestColor(Color awtColor)
protected org.apache.poi.hssf.usermodel.HSSFFont getLoadedFont(JRFont font, short forecolor, Map<AttributedCharacterIterator.Attribute,Object> attributes, Locale locale)
protected org.apache.poi.hssf.usermodel.HSSFCellStyle getLoadedCellStyle(JRXlsExporter.StyleInfo style)
protected org.apache.poi.hssf.usermodel.HSSFCellStyle getLoadedCellStyle(short mode, short backcolor, short horizontalAlignment, short verticalAlignment, short rotation, org.apache.poi.hssf.usermodel.HSSFFont font, JRExporterGridCell gridCell, boolean isWrapText, boolean isCellLocked, boolean isCellHidden, boolean isShrinkToFit)
protected org.apache.poi.hssf.usermodel.HSSFCellStyle getLoadedCellStyle(short mode, short backcolor, short horizontalAlignment, short verticalAlignment, short rotation, org.apache.poi.hssf.usermodel.HSSFFont font, net.sf.jasperreports.engine.export.JRXlsExporter.BoxStyle box, boolean isWrapText, boolean isCellLocked, boolean isCellHidden, boolean isShrinkToFit)
protected static short getBorderStyle(JRPen pen)
public void exportImage(JRPrintImage element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
JRException
protected double getColumnRelativePosition(JRGridLayout layout, int col, int offset)
protected double getRowRelativePosition(JRGridLayout layout, int row, int offset)
protected void exportFrame(JRPrintFrame frame, JRExporterGridCell gridCell, int x, int y)
exportFrame
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
JRException
protected void setHyperlinkCell(JRPrintHyperlink hyperlink)
protected Integer getMaxRowsPerSheet()
public String getExporterKey()
public String getExporterPropertiesPrefix()
JRAbstractExporter
getExporterPropertiesPrefix
in class JRAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,OutputStreamExporterOutput,JRXlsExporterContext>
protected void setFreezePane(int rowIndex, int colIndex)
setFreezePane
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
rowIndex
- the freeze 0-based row indexcolIndex
- the freeze 0-based column indexprotected void setFreezePane(int rowIndex, int colIndex, boolean isRowEdge, boolean isColumnEdge)
setFreezePane(int, int)
setFreezePane
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void setSheetName(String sheetName)
setSheetName
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void setAutoFilter(String autoFilterRange)
setAutoFilter
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
protected void setRowLevels(XlsRowLevelInfo levelInfo, String level)
setRowLevels
in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>
Copyright © 2016. All rights reserved.