public class JRXlsMetadataExporter extends JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
Modifier and Type | Class and Description |
---|---|
protected class |
JRXlsMetadataExporter.BoxStyle |
protected class |
JRXlsMetadataExporter.CellSettings |
protected class |
JRXlsMetadataExporter.ExporterContext |
protected class |
JRXlsMetadataExporter.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 short |
backgroundMode |
protected short |
blackIndex |
protected org.apache.poi.hssf.usermodel.HSSFCell |
cell |
protected Map<String,org.apache.poi.hssf.usermodel.HSSFCellStyle> |
columnStylesMap |
protected Map<String,Integer> |
columnWidths |
protected org.apache.poi.ss.usermodel.CreationHelper |
createHelper |
static String |
CURRENT_ROW_HEIGHT |
protected short |
customColorIndex |
protected org.apache.poi.hssf.usermodel.HSSFDataFormat |
dataFormat |
protected static String |
EMPTY_SHEET_NAME |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
emptyCellStyle |
protected DateFormat |
isoDateFormat |
protected Map<JRXlsMetadataExporter.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) . |
columnNames, columnNamesMap, PROPERTY_COLUMN_NAME, PROPERTY_DATA, PROPERTY_REPEAT_VALUE, 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_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 |
---|
JRXlsMetadataExporter() |
JRXlsMetadataExporter(JasperReportsContext jasperReportsContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
addBlankCell(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle,
Map<String,Object> cellValueMap,
String currentColumnName) |
protected void |
addBlankElement(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle,
boolean repeatValue,
String currentColumnName) |
protected void |
addCell(JRXlsMetadataExporter.CellSettings cellSettings,
Map<String,Object> cellValueMap,
String currentColumnName) |
protected void |
addRowBreak(int rowIndex) |
protected void |
addTextElement(JRXlsMetadataExporter.CellSettings cellSettings,
String textStr,
boolean repeatValue,
String currentColumnName) |
protected void |
adjustColumnWidth(String columnName,
int columnWidth,
Boolean isAutofit) |
protected void |
adjustRowHeight(int rowHeight,
Boolean isAutofit) |
protected void |
closeSheet() |
protected void |
closeWorkbook(OutputStream os) |
protected void |
createSheet(CutsInfo xCuts,
JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected void |
createSheet(JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected void |
exportFrame(JRPrintFrame frame) |
protected void |
exportGenericElement(JRGenericPrintElement element) |
void |
exportImage(JRPrintImage element) |
protected void |
exportLine(JRPrintLine line) |
protected void |
exportRectangle(JRPrintGraphicElement element) |
protected void |
exportText(JRPrintText textElement) |
protected static short |
getBorderStyle(JRPen pen) |
protected Class<XlsMetadataExporterConfiguration> |
getConfigurationInterface() |
String |
getExporterKey() |
String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected Class<XlsMetadataReportConfiguration> |
getItemConfigurationInterface() |
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
getLoadedCellStyle(JRXlsMetadataExporter.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,
JRXlsMetadataExporter.BoxStyle box,
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 ExporterNature |
getNature() |
protected static 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 org.apache.poi.hssf.util.HSSFColor |
getWorkbookColor(Color awtColor) |
protected void |
initExport() |
protected void |
initReport() |
protected void |
openWorkbook(OutputStream os) |
protected void |
setAutoFilter(String autoFilterRange) |
protected void |
setColumnName(String currentColumnName) |
protected void |
setColumnWidth(int col,
int width) |
protected void |
setColumnWidth(int col,
int width,
boolean autoFit) |
protected void |
setFreezePane(int rowIndex,
int colIndex) |
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,
JRXlsMetadataExporter.CellSettings cellSettings) |
protected void |
setRowHeight(org.apache.poi.hssf.usermodel.HSSFRow row) |
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 |
writeCurrentRow(Map<String,Object> currentRow,
Map<String,Object> repeatedValues) |
protected void |
writeReportHeader()
Writes the header column names
|
addBlankCell, addOccupiedCell, exportFrame, exportGenericElement, exportImage, exportLine, exportPage, exportRectangle, exportReportToStream, exportText, getFormula, getImageBorderCorrection, getStyledText, isColumnReadOnTime, setColumnNames, setRowHeight
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, 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, 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
public static String CURRENT_ROW_HEIGHT
protected final DateFormat isoDateFormat
protected Map<JRXlsMetadataExporter.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
protected static final String EMPTY_SHEET_NAME
public JRXlsMetadataExporter()
public JRXlsMetadataExporter(JasperReportsContext jasperReportsContext)
protected Class<XlsMetadataExporterConfiguration> getConfigurationInterface()
protected Class<XlsMetadataReportConfiguration> getItemConfigurationInterface()
protected void initExport()
protected void initReport()
protected void openWorkbook(OutputStream os) throws JRException
openWorkbook
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void createSheet(JRXlsAbstractExporter.SheetInfo sheetInfo)
protected void closeSheet()
protected void closeWorkbook(OutputStream os) throws JRException
closeWorkbook
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void setColumnWidth(int col, int width)
protected void setRowHeight(org.apache.poi.hssf.usermodel.HSSFRow row)
protected void adjustRowHeight(int rowHeight, Boolean isAutofit)
protected void adjustColumnWidth(String columnName, int columnWidth, Boolean isAutofit)
protected void addBlankCell(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle, Map<String,Object> cellValueMap, String currentColumnName) throws JRException
JRException
protected void writeCurrentRow(Map<String,Object> currentRow, Map<String,Object> repeatedValues) throws JRException
writeCurrentRow
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void exportLine(JRPrintLine line) throws JRException
exportLine
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void exportRectangle(JRPrintGraphicElement element) throws JRException
exportRectangle
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void exportText(JRPrintText textElement) throws JRException
exportText
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void setHyperlinkCell(JRPrintHyperlink hyperlink, JRXlsMetadataExporter.CellSettings cellSettings)
protected void addTextElement(JRXlsMetadataExporter.CellSettings cellSettings, String textStr, boolean repeatValue, String currentColumnName) throws JRException
JRException
protected void addBlankElement(org.apache.poi.hssf.usermodel.HSSFCellStyle cellStyle, boolean repeatValue, String currentColumnName) throws JRException
JRException
protected void addCell(JRXlsMetadataExporter.CellSettings cellSettings, Map<String,Object> cellValueMap, String currentColumnName) throws JRException
JRException
protected org.apache.poi.hssf.usermodel.HSSFRichTextString getRichTextString(JRStyledText styledText, short forecolor, JRFont defaultFont, Locale locale)
public void exportImage(JRPrintImage element) throws JRException
exportImage
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected org.apache.poi.hssf.usermodel.HSSFCellStyle getLoadedCellStyle(JRXlsMetadataExporter.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, JRXlsMetadataExporter.BoxStyle box, boolean isCellLocked, boolean isCellHidden, boolean isShrinkToFit)
protected static short getBorderStyle(JRPen pen)
protected void exportFrame(JRPrintFrame frame) throws JRException
exportFrame
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void exportGenericElement(JRGenericPrintElement element) throws JRException
exportGenericElement
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected ExporterNature getNature()
public String getExporterKey()
public String getExporterPropertiesPrefix()
JRAbstractExporter
getExporterPropertiesPrefix
in class JRAbstractExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,OutputStreamExporterOutput,JRXlsExporterContext>
protected void setColumnName(String currentColumnName)
protected void writeReportHeader() throws JRException
writeReportHeader
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void setSheetName(String sheetName)
protected void setFreezePane(int rowIndex, int colIndex)
protected void setFreezePane(int rowIndex, int colIndex, boolean isRowEdge, boolean isColumnEdge)
setFreezePane(int, int)
protected void setAutoFilter(String autoFilterRange)
protected void setRowLevels(XlsRowLevelInfo levelInfo, String level)
protected org.apache.poi.hssf.util.HSSFColor getWorkbookColor(Color awtColor)
protected static 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 void createSheet(CutsInfo xCuts, JRXlsAbstractExporter.SheetInfo sheetInfo)
protected void setRowHeight(int rowIndex, int lastRowHeight, Cut yCut, XlsRowLevelInfo levelInfo) throws JRException
setRowHeight
in class JRXlsAbstractMetadataExporter<XlsMetadataReportConfiguration,XlsMetadataExporterConfiguration,JRXlsExporterContext>
JRException
protected void addRowBreak(int rowIndex)
protected void setColumnWidth(int col, int width, boolean autoFit)
Copyright © 2017. All rights reserved.