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.TextAlignHolder
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver
Modifier and Type | Field and Description |
---|---|
protected static Colour |
BLACK |
protected boolean |
complexFormat |
protected static java.lang.String |
EMPTY_SHEET_NAME |
protected JExcelApiExporterContext |
exporterContext |
static java.lang.String |
JXL_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String) . |
protected ExporterNature |
nature |
protected java.lang.String |
password |
static java.lang.String |
PROPERTY_COMPLEX_FORMAT
Boolean property specifying whether the cell format pattern is user-defined.
|
static java.lang.String |
PROPERTY_USE_TEMP_FILE
Boolean property enabling the JExcelApiExporter to use temporary files when creating large documents.
|
protected java.util.Map<Colour,RGB> |
usedColours |
protected boolean |
useTempFile |
protected static Colour |
WHITE |
protected java.util.Map<java.awt.Color,Colour> |
workbookColours |
autoFilterEnd, autoFilterStart, cellHidden, cellLocked, columnWidthRatio, createCustomPalette, defaultFont, fontMap, formatPatternsMap, gridColumnFreezeIndex, gridRowFreezeIndex, isCollapseRowSpan, isDetectCellType, isFontSizeFixEnabled, isFreezeColumnEdge, isFreezeRowEdge, isIgnoreCellBackground, isIgnoreCellBorder, isIgnoreGraphics, isIgnorePageMargins, isImageBorderFixEnabled, isOnePagePerSheet, isRemoveEmptySpaceBetweenColumns, isRemoveEmptySpaceBetweenRows, isWhitePageBackground, loadedFonts, MAX_COLUMN_INDEX, MAX_ROW_INDEX, 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_FIT_HEIGHT, PROPERTY_FIT_WIDTH, PROPERTY_FREEZE_COLUMN, PROPERTY_FREEZE_COLUMN_EDGE, PROPERTY_FREEZE_ROW, PROPERTY_FREEZE_ROW_EDGE, 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_WRAP_TEXT, reportIndex, sheetDirection, sheetFooterCenter, sheetFooterLeft, sheetFooterRight, sheetHeaderCenter, sheetHeaderLeft, sheetHeaderRight, sheetIndex, sheetNames, sheetNamesIndex, sheetNamesMap, wrapText, XLS_EXPORTER_PROPERTIES_PREFIX
dateFormatCache, endPageIndex, filter, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex
Constructor and Description |
---|
JExcelApiExporter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addBlankCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
addCell(int x,
int y,
JRPrintText text,
java.lang.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(java.io.OutputStream os) |
protected void |
createSheet(java.lang.String name) |
protected Colour |
determineWorkbookColour(java.awt.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 BorderLineStyle |
getBorderLineStyle(JRPen pen) |
protected double |
getColumnRelativePosition(JRGridLayout layout,
int col,
int offset) |
protected DateFormat |
getDateFormat(java.lang.String convertedPattern) |
protected CellValue |
getDetectedCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat) |
protected java.lang.String |
getExporterKey() |
protected CellValue |
getFormulaCellValue(int x,
int y,
JRPrintText textElement,
TextValue textValue,
java.lang.String formula,
JExcelApiExporter.StyleInfo baseStyle,
boolean complexFormat) |
protected CellValue |
getLabelCell(int x,
int y,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle) |
protected WritableCellFormat |
getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey) |
protected ExporterNature |
getNature() |
protected static Colour |
getNearestColour(java.awt.Color awtColor) |
protected NumberFormat |
getNumberFormat(java.lang.String convertedPattern,
boolean isComplexFormat) |
protected double |
getRowRelativePosition(JRGridLayout layout,
int row,
int offset) |
static JRXlsAbstractExporter.TextAlignHolder |
getTextAlignHolder(JRPrintText textElement) |
protected Colour |
getWorkbookColour(java.awt.Color awtColor) |
protected Colour |
getWorkbookColour(java.awt.Color awtColor,
boolean isBackcolor) |
protected void |
initCustomPalette() |
protected boolean |
isComplexFormat(JRPrintElement element) |
protected void |
openWorkbook(java.io.OutputStream os) |
protected void |
removeColumn(int col) |
protected static int |
rgbDistance(java.awt.Color awtColor,
RGB rgb) |
protected void |
setAutoFilter(java.lang.String autoFilterRange) |
protected void |
setBackground() |
protected void |
setCell(JRExporterGridCell gridCell,
int x,
int y) |
protected void |
setColourUsed(Colour colour) |
protected void |
setColourUsed(Colour colour,
java.awt.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,
java.lang.String level) |
protected void |
setSheetName(java.lang.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, isCellHidden, isCellLocked, isWrapText, mergeAndSetRowLevels, resetAutoFilters, setColumnWidths, setExporterHints, setFreezePane, setSheetNames, updateColumns
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getReportContext, getStringArrayParameter, getStringParameter, getStringParameterOrDefault, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setHyperlinkProducerFactory, setInput, setJasperPrint, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContext
public static final java.lang.String PROPERTY_USE_TEMP_FILE
false
).JRProperties
,
Constant Field Valuespublic static final java.lang.String PROPERTY_COMPLEX_FORMAT
JRProperties
,
Constant Field Valuespublic static final java.lang.String JXL_EXPORTER_KEY
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String)
.protected static final Colour WHITE
protected static final Colour BLACK
protected static final java.lang.String EMPTY_SHEET_NAME
protected java.util.Map<java.awt.Color,Colour> workbookColours
protected java.util.Map<Colour,RGB> usedColours
protected java.lang.String password
protected ExporterNature nature
protected boolean useTempFile
protected boolean complexFormat
protected JExcelApiExporterContext exporterContext
protected void setParameters()
setParameters
in class JRXlsAbstractExporter
protected void initCustomPalette()
protected void setColourUsed(Colour colour)
protected void setColourUsed(Colour colour, java.awt.Color reportColour)
protected void setBackground()
setBackground
in class JRXlsAbstractExporter
protected void openWorkbook(java.io.OutputStream os) throws JRException
openWorkbook
in class JRXlsAbstractExporter
JRException
protected void createSheet(java.lang.String name)
createSheet
in class JRXlsAbstractExporter
protected void closeWorkbook(java.io.OutputStream os) throws JRException
closeWorkbook
in class JRXlsAbstractExporter
JRException
protected void setColumnWidth(int col, int width, boolean autoFit)
setColumnWidth
in class JRXlsAbstractExporter
protected void updateColumn(int col, boolean autoFit)
updateColumn
in class JRXlsAbstractExporter
protected void setRowHeight(int rowIndex, int lastRowHeight, Cut yCut, XlsRowLevelInfo levelInfo) throws JRException
setRowHeight
in class JRXlsAbstractExporter
JRException
protected void setCell(JRExporterGridCell gridCell, int x, int y)
setCell
in class JRXlsAbstractExporter
protected void removeColumn(int col)
removeColumn
in class JRXlsAbstractExporter
protected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
addBlankCell
in class JRXlsAbstractExporter
JRException
protected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex) throws JRException
addOccupiedCell
in class JRXlsAbstractExporter
JRException
protected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int col, int row) throws JRException
exportLine
in class JRXlsAbstractExporter
JRException
protected void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell gridCell, int col, int row) throws JRException
exportRectangle
in class JRXlsAbstractExporter
JRException
public void exportText(JRPrintText text, JRExporterGridCell gridCell, int col, int row) throws JRException
exportText
in class JRXlsAbstractExporter
JRException
protected void addCell(int x, int y, JRPrintText text, java.lang.String textStr, JExcelApiExporter.StyleInfo baseStyle) throws WriteException, RowsExceededException, JRException
WriteException
RowsExceededException
JRException
protected CellValue getFormulaCellValue(int x, int y, JRPrintText textElement, TextValue textValue, java.lang.String formula, JExcelApiExporter.StyleInfo baseStyle, boolean complexFormat) throws JRException
JRException
protected CellValue getDetectedCellValue(int x, int y, JRPrintText textElement, TextValue textValue, JExcelApiExporter.StyleInfo baseStyle, boolean complexFormat) throws JRException
JRException
protected NumberFormat getNumberFormat(java.lang.String convertedPattern, boolean isComplexFormat)
protected DateFormat getDateFormat(java.lang.String convertedPattern)
protected CellValue getLabelCell(int x, int y, java.lang.String textStr, JExcelApiExporter.StyleInfo baseStyle) throws JRException
JRException
protected void addMergeRegion(JRExporterGridCell gridCell, int x, int y) throws JRException
JRException
public void exportImage(JRPrintImage element, JRExporterGridCell gridCell, int col, int row, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage
in class JRXlsAbstractExporter
JRException
protected double getColumnRelativePosition(JRGridLayout layout, int col, int offset)
protected double getRowRelativePosition(JRGridLayout layout, int row, int offset)
protected Colour getWorkbookColour(java.awt.Color awtColor, boolean isBackcolor)
protected Colour getWorkbookColour(java.awt.Color awtColor)
protected Colour determineWorkbookColour(java.awt.Color awtColor)
protected static Colour getNearestColour(java.awt.Color awtColor)
protected static int rgbDistance(java.awt.Color awtColor, RGB rgb)
protected WritableCellFormat getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey) throws JRException
JRException
protected static 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 JRXlsAbstractExporter
JRException
protected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement
in class JRXlsAbstractExporter
JRException
protected ExporterNature getNature()
getNature
in class JRXlsAbstractExporter
protected java.lang.String getExporterKey()
getExporterKey
in class JRAbstractExporter
protected boolean isComplexFormat(JRPrintElement element)
protected void setFreezePane(int rowIndex, int colIndex, boolean isRowEdge, boolean isColumnEdge)
setFreezePane
in class JRXlsAbstractExporter
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
protected void setAutoFilter(java.lang.String autoFilterRange)
setAutoFilter
in class JRXlsAbstractExporter
protected void setRowLevels(XlsRowLevelInfo levelInfo, java.lang.String level)
setRowLevels
in class JRXlsAbstractExporter
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com