public class JExcelApiExporter extends JRXlsAbstractExporter
| Modifier and Type | Class and Description |
|---|---|
protected class |
JExcelApiExporter.BoxStyle |
protected class |
JExcelApiExporter.CellTextValueHandler |
protected class |
JExcelApiExporter.ExporterContext |
protected class |
JExcelApiExporter.FormulaTextValueHandler |
protected class |
JExcelApiExporter.StyleInfo |
JRXlsAbstractExporter.TextAlignHolderJRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver| Modifier and Type | Field and Description |
|---|---|
protected static jxl.format.Colour |
BLACK |
protected boolean |
complexFormat |
protected static String |
EMPTY_SHEET_NAME |
protected JExcelApiExporterContext |
exporterContext |
static String |
JXL_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String). |
protected ExporterNature |
nature |
protected String |
password |
static String |
PROPERTY_COMPLEX_FORMAT
Boolean property specifying whether the cell format pattern is user-defined.
|
static String |
PROPERTY_USE_TEMP_FILE
Boolean property enabling the JExcelApiExporter to use temporary files when creating large documents.
|
protected Map<jxl.format.Colour,jxl.format.RGB> |
usedColours |
protected boolean |
useTempFile |
protected static jxl.format.Colour |
WHITE |
protected Map<Color,jxl.format.Colour> |
workbookColours |
autoFilterEnd, autoFilterStart, cellHidden, cellLocked, columnWidthRatio, createCustomPalette, defaultFont, documentFirstPageNumber, documentPageScale, documentShowGridlines, firstPageNotSet, formatPatternsMap, gridColumnFreezeIndex, gridRowFreezeIndex, ignoreAnchors, invalidCharReplacement, isCollapseRowSpan, isDetectCellType, isFontSizeFixEnabled, isFreezeColumnEdge, isFreezeRowEdge, isIgnoreCellBackground, isIgnoreCellBorder, isIgnoreGraphics, isIgnorePageMargins, isImageBorderFixEnabled, isOnePagePerSheet, isRemoveEmptySpaceBetweenColumns, isRemoveEmptySpaceBetweenRows, isWhitePageBackground, keepTemplateSheets, loadedFonts, maxColumnFreezeIndex, maxRowFreezeIndex, maxRowsPerSheet, pageIndex, progressMonitor, PROPERTY_AUTO_FILTER, PROPERTY_AUTO_FIT_COLUMN, PROPERTY_AUTO_FIT_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_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_SHOW_GRIDLINES, PROPERTY_USE_TIMEZONE, PROPERTY_WORKBOOK_TEMPLATE, PROPERTY_WORKBOOK_TEMPLATE_KEEP_SHEETS, PROPERTY_WRAP_TEXT, reportIndex, sheetDirection, sheetFirstPageNumber, sheetFooterCenter, sheetFooterLeft, sheetFooterRight, sheetHeaderCenter, sheetHeaderLeft, sheetHeaderRight, sheetIndex, sheetNames, sheetNamesIndex, sheetNamesMap, sheetPageScale, sheetShowGridlines, workbookTemplate, wrapText, XLS_EXPORTER_PROPERTIES_PREFIXallSelector, dateFormatCache, endPageIndex, filter, fontMap, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, styledTextUtil| Constructor and Description |
|---|
JExcelApiExporter() |
JExcelApiExporter(JasperReportsContext jasperReportsContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBlankCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
addCell(int x,
int y,
JRPrintText text,
String textStr,
JExcelApiExporter.StyleInfo baseStyle) |
protected void |
addMergeRegion(JRExporterGridCell gridCell,
int x,
int y) |
protected void |
addOccupiedCell(OccupiedGridCell occupiedGridCell,
int colIndex,
int rowIndex) |
protected void |
closeWorkbook(OutputStream os) |
protected void |
createSheet(String name) |
protected jxl.format.Colour |
determineWorkbookColour(Color awtColor) |
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell,
int col,
int row) |
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
void |
exportImage(JRPrintImage element,
JRExporterGridCell gridCell,
int col,
int row,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int col,
int row) |
protected void |
exportRectangle(JRPrintGraphicElement element,
JRExporterGridCell gridCell,
int col,
int row) |
void |
exportText(JRPrintText text,
JRExporterGridCell gridCell,
int col,
int row) |
protected static jxl.format.BorderLineStyle |
getBorderLineStyle(JRPen pen) |
protected double |
getColumnRelativePosition(JRGridLayout layout,
int col,
int offset) |
protected jxl.write.DateFormat |
getDateFormat(String convertedPattern) |
protected jxl.write.biff.CellValue |
getDetectedCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat) |
protected String |
getExporterKey() |
protected jxl.write.biff.CellValue |
getFormulaCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
String formula,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat) |
protected jxl.write.biff.CellValue |
getLabelCell(int x,
int y,
String textStr,
JExcelApiExporter.StyleInfo baseStyle) |
protected jxl.write.WritableCellFormat |
getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey) |
protected ExporterNature |
getNature() |
protected static jxl.format.Colour |
getNearestColour(Color awtColor) |
protected jxl.write.NumberFormat |
getNumberFormat(String convertedPattern,
boolean isComplexFormat) |
protected double |
getRowRelativePosition(JRGridLayout layout,
int row,
int offset) |
static JRXlsAbstractExporter.TextAlignHolder |
getTextAlignHolder(JRPrintText textElement) |
protected jxl.format.Colour |
getWorkbookColour(Color awtColor) |
protected jxl.format.Colour |
getWorkbookColour(Color awtColor,
boolean isBackcolor) |
protected void |
initCustomPalette() |
protected boolean |
isComplexFormat(JRPrintElement element) |
protected void |
openWorkbook(OutputStream os) |
protected void |
removeColumn(int col) |
protected static int |
rgbDistance(Color awtColor,
jxl.format.RGB rgb) |
protected void |
setAutoFilter(String autoFilterRange) |
protected void |
setBackground() |
protected void |
setCell(JRExporterGridCell gridCell,
int x,
int y) |
protected void |
setColourUsed(jxl.format.Colour colour) |
protected void |
setColourUsed(jxl.format.Colour colour,
Color reportColour) |
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 |
setParameters() |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected void |
setRowLevels(XlsRowLevelInfo levelInfo,
String level) |
protected void |
setScale(Integer scale) |
protected void |
setSheetName(String sheetName) |
protected void |
updateColumn(int col,
boolean autoFit) |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, exportPage, exportReport, exportReportToStream, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getFormula, getImageBorderCorrection, getStyledText, getWorkbookTemplate, isCellHidden, isCellLocked, isIgnoreAnchors, isValidScale, isWorkbookTemplateKeepSheets, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setColumnWidths, setExporterHints, setFreezePane, setIgnoreAnchors, setScale, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValue, updateColumnscreateFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getPropertiesUtil, getReportContext, getStringArrayParameter, getStringParameter, getStringParameterOrDefault, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFontMap, setFrameElementsOffset, setHyperlinkProducerFactory, setInput, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContextpublic static final String PROPERTY_USE_TEMP_FILE
false).JRPropertiesUtil,
Constant Field Valuespublic static final String PROPERTY_COMPLEX_FORMAT
JRPropertiesUtil,
Constant Field Valuespublic static final String JXL_EXPORTER_KEY
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String).protected static final jxl.format.Colour WHITE
protected static final jxl.format.Colour BLACK
protected static final String EMPTY_SHEET_NAME
protected Map<jxl.format.Colour,jxl.format.RGB> usedColours
protected String password
protected ExporterNature nature
protected boolean useTempFile
protected boolean complexFormat
protected JExcelApiExporterContext exporterContext
public JExcelApiExporter()
public JExcelApiExporter(JasperReportsContext jasperReportsContext)
protected void setParameters()
setParameters in class JRXlsAbstractExporterprotected void initCustomPalette()
protected void setColourUsed(jxl.format.Colour colour)
protected void setColourUsed(jxl.format.Colour colour,
Color reportColour)
protected void setBackground()
setBackground in class JRXlsAbstractExporterprotected void openWorkbook(OutputStream os) throws JRException
openWorkbook in class JRXlsAbstractExporterJRExceptionprotected void createSheet(String name)
createSheet in class JRXlsAbstractExporterprotected void closeWorkbook(OutputStream os) throws JRException
closeWorkbook in class JRXlsAbstractExporterJRExceptionprotected void setColumnWidth(int col,
int width,
boolean autoFit)
setColumnWidth in class JRXlsAbstractExporterprotected void updateColumn(int col,
boolean autoFit)
updateColumn in class JRXlsAbstractExporterprotected void setRowHeight(int rowIndex,
int lastRowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo)
throws JRException
setRowHeight in class JRXlsAbstractExporterJRExceptionprotected void setCell(JRExporterGridCell gridCell, int x, int y)
setCell in class JRXlsAbstractExporterprotected void removeColumn(int col)
removeColumn in class JRXlsAbstractExporterprotected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
addBlankCell in class JRXlsAbstractExporterJRExceptionprotected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) throws JRException
addOccupiedCell in class JRXlsAbstractExporterJRExceptionprotected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int col, int row) throws JRException
exportLine in class JRXlsAbstractExporterJRExceptionprotected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell gridCell, int col, int row) throws JRException
exportRectangle in class JRXlsAbstractExporterJRExceptionpublic void exportText(JRPrintText text, JRExporterGridCell gridCell, int col, int row) throws JRException
exportText in class JRXlsAbstractExporterJRExceptionprotected void addCell(int x,
int y,
JRPrintText text,
String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws jxl.write.WriteException,
jxl.write.biff.RowsExceededException,
JRException
jxl.write.WriteExceptionjxl.write.biff.RowsExceededExceptionJRExceptionprotected jxl.write.biff.CellValue getFormulaCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
String formula,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat)
throws JRException
JRExceptionprotected jxl.write.biff.CellValue getDetectedCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat)
throws JRException
JRExceptionprotected jxl.write.NumberFormat getNumberFormat(String convertedPattern, boolean isComplexFormat)
protected jxl.write.DateFormat getDateFormat(String convertedPattern)
protected jxl.write.biff.CellValue getLabelCell(int x,
int y,
String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws JRException
JRExceptionprotected void addMergeRegion(JRExporterGridCell gridCell, int x, int y) throws JRException
JRExceptionpublic void exportImage(JRPrintImage element, JRExporterGridCell gridCell, int col, int row, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage in class JRXlsAbstractExporterJRExceptionprotected double getColumnRelativePosition(JRGridLayout layout, int col, int offset)
protected double getRowRelativePosition(JRGridLayout layout, int row, int offset)
protected jxl.format.Colour getWorkbookColour(Color awtColor, boolean isBackcolor)
protected jxl.format.Colour getWorkbookColour(Color awtColor)
protected jxl.format.Colour determineWorkbookColour(Color awtColor)
protected static jxl.format.Colour getNearestColour(Color awtColor)
protected static int rgbDistance(Color awtColor, jxl.format.RGB rgb)
protected jxl.write.WritableCellFormat getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey) throws JRException
JRExceptionprotected static jxl.format.BorderLineStyle getBorderLineStyle(JRPen pen)
public static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)
protected void exportFrame(JRPrintFrame frame, JRExporterGridCell gridCell, int col, int row) throws JRException
exportFrame in class JRXlsAbstractExporterJRExceptionprotected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement in class JRXlsAbstractExporterJRExceptionprotected ExporterNature getNature()
getNature in class JRXlsAbstractExporterprotected String getExporterKey()
getExporterKey in class JRAbstractExporterprotected boolean isComplexFormat(JRPrintElement element)
protected void setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
setFreezePane in class JRXlsAbstractExporterrowIndex - 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(String sheetName)
setSheetName in class JRXlsAbstractExporterprotected void setAutoFilter(String autoFilterRange)
setAutoFilter in class JRXlsAbstractExporterprotected void setRowLevels(XlsRowLevelInfo levelInfo, String level)
setRowLevels in class JRXlsAbstractExporterprotected void setScale(Integer scale)
setScale in class JRXlsAbstractExporterCopyright © 2012. All Rights Reserved.