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.TextAlignHolderJRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.util.List<Hyperlink>> |
anchorLinks |
protected java.util.Map<java.lang.String,HSSFName> |
anchorNames |
protected java.util.Map<HSSFSheet,java.util.List<java.lang.Integer>> |
autofitColumns |
protected short |
backgroundMode |
protected short |
blackIndex |
protected HSSFCell |
cell |
protected CreationHelper |
createHelper |
protected short |
customColorIndex |
protected HSSFDataFormat |
dataFormat |
protected HSSFCellStyle |
emptyCellStyle |
protected java.util.Map<JRXlsExporter.StyleInfo,HSSFCellStyle> |
loadedCellStyles |
static short |
MAX_COLOR_INDEX |
static short |
MIN_COLOR_INDEX |
protected java.util.Map<java.lang.Integer,java.util.List<Hyperlink>> |
pageLinks |
protected HSSFPatriarch |
patriarch |
protected HSSFRow |
row |
protected HSSFSheet |
sheet |
protected short |
whiteIndex |
protected HSSFWorkbook |
workbook |
static java.lang.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, gridColumnFreezeIndex, gridRowFreezeIndex, invalidCharReplacement, isFreezeColumnEdge, isFreezeRowEdge, keepTemplateSheets, loadedFonts, maxColumnFreezeIndex, maxColumnIndex, maxRowFreezeIndex, 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, 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, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, 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(java.io.OutputStream os) |
protected void |
createMergeRegion(JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
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(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 java.lang.Class<XlsExporterConfiguration> |
getConfigurationInterface() |
java.lang.String |
getExporterKey() |
java.lang.String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected java.lang.Class<XlsReportConfiguration> |
getItemConfigurationInterface() |
protected HSSFCellStyle |
getLoadedCellStyle(JRXlsExporter.StyleInfo style) |
protected HSSFCellStyle |
getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
HSSFFont font,
JRExporterGridCell gridCell,
boolean isWrapText,
boolean isCellLocked,
boolean isCellHidden,
boolean isShrinkToFit) |
protected HSSFCellStyle |
getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
HSSFFont font,
net.sf.jasperreports.engine.export.JRXlsExporter.BoxStyle box,
boolean isWrapText,
boolean isCellLocked,
boolean isCellHidden,
boolean isShrinkToFit) |
protected HSSFFont |
getLoadedFont(JRFont font,
short forecolor,
java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes,
java.util.Locale locale) |
protected java.lang.Integer |
getMaxRowsPerSheet() |
protected HSSFColor |
getNearestColor(java.awt.Color awtColor) |
protected HSSFRichTextString |
getRichTextString(JRStyledText styledText,
short forecolor,
JRFont defaultFont,
java.util.Locale locale) |
protected double |
getRowRelativePosition(JRGridLayout layout,
int row,
int offset) |
protected HSSFColor |
getWorkbookColor(java.awt.Color awtColor) |
protected HSSFCellStyle |
initCreateCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
JRXlsExporter.StyleInfo baseStyle) |
protected void |
initExport() |
protected void |
initReport() |
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)
Creates a freeze pane for the current sheet.
|
protected void |
setHyperlinkCell(JRPrintHyperlink hyperlink) |
protected void |
setRichTextStringCellValue(JRStyledText styledText,
short forecolor,
JRFont defaultFont,
java.util.Locale locale) |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected void |
setRowLevels(XlsRowLevelInfo levelInfo,
java.lang.String level) |
protected void |
setSheetName(java.lang.String sheetName) |
protected void |
setStringCellValue(java.lang.String textStr) |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, ensureInput, ensureOutput, 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, setFreezePane, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValuecreateFilter, defaultParseNumber, 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, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContextpublic static final java.lang.String XLS_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String).public static short MAX_COLOR_INDEX
public static short MIN_COLOR_INDEX
protected java.util.Map<JRXlsExporter.StyleInfo,HSSFCellStyle> loadedCellStyles
protected java.util.Map<java.lang.String,java.util.List<Hyperlink>> anchorLinks
protected java.util.Map<java.lang.Integer,java.util.List<Hyperlink>> pageLinks
protected java.util.Map<java.lang.String,HSSFName> anchorNames
protected java.util.Map<HSSFSheet,java.util.List<java.lang.Integer>> autofitColumns
protected HSSFWorkbook workbook
protected HSSFSheet sheet
protected HSSFRow row
protected HSSFCell cell
protected HSSFCellStyle emptyCellStyle
protected CreationHelper createHelper
protected short whiteIndex
protected short blackIndex
protected short customColorIndex
protected short backgroundMode
protected HSSFDataFormat dataFormat
protected HSSFPatriarch patriarch
public JRXlsExporter()
JRXlsExporter(JasperReportsContext)public JRXlsExporter(JasperReportsContext jasperReportsContext)
protected java.lang.Class<XlsExporterConfiguration> getConfigurationInterface()
protected java.lang.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(java.io.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(java.io.OutputStream os)
throws JRException
closeWorkbook in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>JRExceptionprotected 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>JRExceptionprotected void createTextCell(JRPrintText textElement, JRExporterGridCell gridCell, int colIndex, int rowIndex, JRStyledText styledText, JRXlsExporter.StyleInfo baseStyle, short forecolor) throws JRException
JRExceptionprotected HSSFCellStyle initCreateCell(JRExporterGridCell gridCell, int colIndex, int rowIndex, JRXlsExporter.StyleInfo baseStyle)
protected void endCreateCell(HSSFCellStyle cellStyle)
protected final void setStringCellValue(java.lang.String textStr)
protected final void setRichTextStringCellValue(JRStyledText styledText, short forecolor, JRFont defaultFont, java.util.Locale locale)
protected HSSFRichTextString getRichTextString(JRStyledText styledText, short forecolor, JRFont defaultFont, java.util.Locale locale)
protected void createMergeRegion(JRExporterGridCell gridCell, int colIndex, int rowIndex, HSSFCellStyle cellStyle)
protected HSSFColor getWorkbookColor(java.awt.Color awtColor)
protected HSSFColor getNearestColor(java.awt.Color awtColor)
protected HSSFFont getLoadedFont(JRFont font, short forecolor, java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> attributes, java.util.Locale locale)
protected HSSFCellStyle getLoadedCellStyle(JRXlsExporter.StyleInfo style)
protected HSSFCellStyle getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
HSSFFont font,
JRExporterGridCell gridCell,
boolean isWrapText,
boolean isCellLocked,
boolean isCellHidden,
boolean isShrinkToFit)
protected HSSFCellStyle getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
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>JRExceptionprotected 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>JRExceptionprotected void setHyperlinkCell(JRPrintHyperlink hyperlink)
protected java.lang.Integer getMaxRowsPerSheet()
public java.lang.String getExporterKey()
public java.lang.String getExporterPropertiesPrefix()
JRAbstractExportergetExporterPropertiesPrefix in class JRAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,OutputStreamExporterOutput,JRXlsExporterContext>protected void setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
setFreezePane in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>rowIndex - the freeze 0-based row indexcolIndex - the freeze 0-based column indexisRowEdge - specifies if the freeze row index is set at element levelisColumnEdge - specifies if the freeze column index is set at element levelprotected void setSheetName(java.lang.String sheetName)
setSheetName in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>protected void setAutoFilter(java.lang.String autoFilterRange)
setAutoFilter in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>protected void setRowLevels(XlsRowLevelInfo levelInfo, java.lang.String level)
setRowLevels in class JRXlsAbstractExporter<XlsReportConfiguration,XlsExporterConfiguration,JRXlsExporterContext>© 2001-2014 TIBCO Software Inc. www.jaspersoft.com