net.sf.jasperreports.engine.export
Class JExcelApiExporter
java.lang.Object
net.sf.jasperreports.engine.JRAbstractExporter
net.sf.jasperreports.engine.export.JRXlsAbstractExporter
net.sf.jasperreports.engine.export.JExcelApiExporter
- All Implemented Interfaces:
- JRExporter
public class JExcelApiExporter
- extends JRXlsAbstractExporter
- Version:
- $Id: JExcelApiExporter.java 3785 2010-05-11 10:24:13Z teodord $
- Author:
- Manuel Paul (mpaul@ratundtat.com)
Fields inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
currentSheetName, defaultFont, fontMap, isAutoDetectCellType, isCollapseRowSpan, isDetectCellType, isFontSizeFixEnabled, isIgnoreCellBackground, isIgnoreCellBorder, isIgnoreGraphics, isIgnorePageMargins, isImageBorderFixEnabled, isOnePagePerSheet, isRemoveEmptySpaceBetweenColumns, isRemoveEmptySpaceBetweenRows, isWhitePageBackground, loadedFonts, maxRowsPerSheet, pageIndex, progressMonitor, reportIndex, sheetIndex, sheetNames, sheetNamesMap, XLS_EXPORTER_PROPERTIES_PREFIX |
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
classLoader, classLoaderSet, dateFormatCache, endPageIndex, fileResolver, fileResolverSet, filter, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, PROPERTY_CELL_FORMULA, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, urlHandlerFactory, urlHandlerFactorySet |
Method Summary |
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)
|
protected void |
exportImage(JRPrintImage element,
JRExporterGridCell gridCell,
int col,
int row,
int emptyCols)
|
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 CellValue |
getAutoDetectedCellValue(int x,
int y,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
|
protected static BorderLineStyle |
getBorderLineStyle(JRPen pen)
|
protected jxl.write.DateFormat |
getDateFormat(java.lang.String pattern)
|
protected CellValue |
getDetectedCellValue(int x,
int y,
JRPrintText text,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
|
protected java.lang.String |
getExporterKey()
|
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 jxl.write.NumberFormat |
getNumberFormat(java.lang.String pattern)
|
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 void |
openWorkbook(java.io.OutputStream os)
|
protected void |
removeColumn(int col)
|
protected static int |
rgbDistance(java.awt.Color awtColor,
RGB rgb)
|
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)
|
protected void |
setParameters()
|
protected void |
setRowHeight(int y,
int lastRowHeight)
|
Methods inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, exportPage, exportReport, exportReportToStream, getDefaultFont, getImageBorderCorrection, getStyledText, removeEmptyColumns, setColumnWidths |
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getFloatParameter, getHyperlinkProducer, getIntegerParameter, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JXL_EXPORTER_KEY
public static final java.lang.String JXL_EXPORTER_KEY
- The exporter key, as used in
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String)
.
- See Also:
- Constant Field Values
WHITE
protected static final Colour WHITE
BLACK
protected static final Colour BLACK
EMPTY_SHEET_NAME
protected static final java.lang.String EMPTY_SHEET_NAME
- See Also:
- Constant Field Values
formatPatternsMap
protected java.util.Map formatPatternsMap
createCustomPalette
protected boolean createCustomPalette
workbookColours
protected java.util.Map workbookColours
usedColours
protected java.util.Map usedColours
password
protected java.lang.String password
nature
protected ExporterNature nature
exporterContext
protected JExcelApiExporterContext exporterContext
JExcelApiExporter
public JExcelApiExporter()
setParameters
protected void setParameters()
- Overrides:
setParameters
in class JRXlsAbstractExporter
initCustomPalette
protected void initCustomPalette()
setColourUsed
protected void setColourUsed(Colour colour)
setColourUsed
protected void setColourUsed(Colour colour,
java.awt.Color reportColour)
setBackground
protected void setBackground()
- Specified by:
setBackground
in class JRXlsAbstractExporter
openWorkbook
protected void openWorkbook(java.io.OutputStream os)
throws JRException
- Specified by:
openWorkbook
in class JRXlsAbstractExporter
- Throws:
JRException
createSheet
protected void createSheet(java.lang.String name)
- Specified by:
createSheet
in class JRXlsAbstractExporter
closeWorkbook
protected void closeWorkbook(java.io.OutputStream os)
throws JRException
- Specified by:
closeWorkbook
in class JRXlsAbstractExporter
- Throws:
JRException
setColumnWidth
protected void setColumnWidth(int col,
int width)
- Specified by:
setColumnWidth
in class JRXlsAbstractExporter
setRowHeight
protected void setRowHeight(int y,
int lastRowHeight)
throws JRException
- Specified by:
setRowHeight
in class JRXlsAbstractExporter
- Throws:
JRException
setCell
protected void setCell(JRExporterGridCell gridCell,
int x,
int y)
- Specified by:
setCell
in class JRXlsAbstractExporter
removeColumn
protected void removeColumn(int col)
- Specified by:
removeColumn
in class JRXlsAbstractExporter
addBlankCell
protected void addBlankCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
throws JRException
- Specified by:
addBlankCell
in class JRXlsAbstractExporter
- Throws:
JRException
addOccupiedCell
protected void addOccupiedCell(OccupiedGridCell occupiedGridCell,
int colIndex,
int rowIndex)
throws JRException
- Specified by:
addOccupiedCell
in class JRXlsAbstractExporter
- Throws:
JRException
exportLine
protected void exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int col,
int row)
throws JRException
- Specified by:
exportLine
in class JRXlsAbstractExporter
- Throws:
JRException
exportRectangle
protected void exportRectangle(JRPrintGraphicElement element,
JRExporterGridCell gridCell,
int col,
int row)
throws JRException
- Specified by:
exportRectangle
in class JRXlsAbstractExporter
- Throws:
JRException
exportText
public void exportText(JRPrintText text,
JRExporterGridCell gridCell,
int col,
int row)
throws JRException
- Specified by:
exportText
in class JRXlsAbstractExporter
- Throws:
JRException
addCell
protected void addCell(int x,
int y,
JRPrintText text,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws WriteException,
RowsExceededException,
JRException
- Throws:
WriteException
RowsExceededException
JRException
getDetectedCellValue
protected CellValue getDetectedCellValue(int x,
int y,
JRPrintText text,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws JRException
- Throws:
JRException
getNumberFormat
protected jxl.write.NumberFormat getNumberFormat(java.lang.String pattern)
getDateFormat
protected jxl.write.DateFormat getDateFormat(java.lang.String pattern)
getAutoDetectedCellValue
protected CellValue getAutoDetectedCellValue(int x,
int y,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws JRException
- Throws:
JRException
getLabelCell
protected CellValue getLabelCell(int x,
int y,
java.lang.String textStr,
JExcelApiExporter.StyleInfo baseStyle)
throws JRException
- Throws:
JRException
addMergeRegion
protected void addMergeRegion(JRExporterGridCell gridCell,
int x,
int y)
throws JRException
- Throws:
JRException
exportImage
protected void exportImage(JRPrintImage element,
JRExporterGridCell gridCell,
int col,
int row,
int emptyCols)
throws JRException
- Specified by:
exportImage
in class JRXlsAbstractExporter
- Throws:
JRException
getWorkbookColour
protected Colour getWorkbookColour(java.awt.Color awtColor,
boolean isBackcolor)
getWorkbookColour
protected Colour getWorkbookColour(java.awt.Color awtColor)
determineWorkbookColour
protected Colour determineWorkbookColour(java.awt.Color awtColor)
getNearestColour
protected static Colour getNearestColour(java.awt.Color awtColor)
rgbDistance
protected static int rgbDistance(java.awt.Color awtColor,
RGB rgb)
getLoadedCellStyle
protected WritableCellFormat getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey)
throws JRException
- Throws:
JRException
getBorderLineStyle
protected static BorderLineStyle getBorderLineStyle(JRPen pen)
getTextAlignHolder
public static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)
exportFrame
protected void exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell,
int col,
int row)
throws JRException
- Specified by:
exportFrame
in class JRXlsAbstractExporter
- Throws:
JRException
exportGenericElement
protected void exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols)
throws JRException
- Specified by:
exportGenericElement
in class JRXlsAbstractExporter
- Throws:
JRException
getNature
protected ExporterNature getNature()
- Specified by:
getNature
in class JRXlsAbstractExporter
getExporterKey
protected java.lang.String getExporterKey()
- Specified by:
getExporterKey
in class JRAbstractExporter
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com