net.sf.jasperreports.engine.export
Class JExcelApiExporter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRAbstractExporter
      extended by net.sf.jasperreports.engine.export.JRXlsAbstractExporter
          extended by net.sf.jasperreports.engine.export.JExcelApiExporter
All Implemented Interfaces:
JRExporter

public class JExcelApiExporter
extends JRXlsAbstractExporter

Version:
$Id: JExcelApiExporter.java 1508 2006-11-28 19:09:17 +0200 (Tue, 28 Nov 2006) teodord $
Author:
Manuel Paul (mpaul@ratundtat.com)

Nested Class Summary
protected static class JExcelApiExporter.BoxStyle
           
protected  class JExcelApiExporter.CellTextValueHandler
           
protected static class JExcelApiExporter.StyleInfo
           
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
JRXlsAbstractExporter.TextAlignHolder
 
Field Summary
protected static jxl.format.Colour BLACK
           
protected static jxl.format.Colour WHITE
           
 
Fields inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
defaultFont, fontMap, isAutoDetectCellType, isDetectCellType, isFontSizeFixEnabled, isOnePagePerSheet, isRemoveEmptySpace, isWhitePageBackground, loadedFonts, pageHeight, progressMonitor, reportIndex, sheetIndex, sheetNames, sheetNamesMap, styledTextParser
 
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
classLoader, classLoaderSet, dateFormatCache, endPageIndex, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, startPageIndex, urlHandlerFactory, urlHandlerFactorySet
 
Constructor Summary
JExcelApiExporter()
           
 
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 closeWorkbook(java.io.OutputStream os)
           
protected  void createSheet(java.lang.String name)
           
protected  void exportFrame(JRPrintFrame frame, JRExporterGridCell gridCell, int x, int y)
           
protected  void exportImage(JRPrintImage element, JRExporterGridCell gridCell, int x, int y)
           
protected  void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int x, int y)
           
protected  void exportRectangle(JRPrintElement element, JRExporterGridCell gridCell, int x, int y)
           
protected  void exportText(JRPrintText text, JRExporterGridCell gridCell, int x, int y)
           
protected  jxl.write.biff.CellValue getAutoDetectedCellValue(int x, int y, java.lang.String textStr, JExcelApiExporter.StyleInfo baseStyle)
           
protected static jxl.format.BorderLineStyle getBorderLineStyle(byte lineStyle)
           
protected  jxl.write.DateFormat getDateFormat(java.lang.String pattern)
           
protected  jxl.write.biff.CellValue getDetectedCellValue(int x, int y, JRPrintText text, java.lang.String textStr, JExcelApiExporter.StyleInfo baseStyle)
           
protected  JRGridLayout.ExporterElements getExporterElements()
           
protected  jxl.write.biff.CellValue getLabelCell(int x, int y, java.lang.String textStr, JExcelApiExporter.StyleInfo baseStyle)
           
protected  jxl.write.WritableCellFormat getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey)
           
protected static jxl.format.Colour getNearestColour(java.awt.Color awtColor)
           
protected  jxl.write.NumberFormat getNumberFormat(java.lang.String pattern)
           
static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)
           
protected  void openWorkbook(java.io.OutputStream os)
           
protected  void setBackground()
           
protected  void setCell(int x, int y)
           
protected  void setColumnWidth(short index, short width)
           
protected  void setRowHeight(int y, int lastRowHeight)
           
 
Methods inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
exportPage, exportReport, exportReportToStream, getDefaultFont, getStyledText, setParameters
 
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
defaultParseNumber, getBooleanCellValue, getBox, getDateCellValue, getDateFormat, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameters, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setInput, setOffset, setOutput, setPageRange, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITE

protected static final jxl.format.Colour WHITE

BLACK

protected static final jxl.format.Colour BLACK
Constructor Detail

JExcelApiExporter

public JExcelApiExporter()
Method Detail

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(short index,
                              short 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(int x,
                       int y)
Specified by:
setCell in class JRXlsAbstractExporter

addBlankCell

protected void addBlankCell(JRExporterGridCell gridCell,
                            int colIndex,
                            int rowIndex)
                     throws JRException
Specified by:
addBlankCell in class JRXlsAbstractExporter
Throws:
JRException

exportLine

protected void exportLine(JRPrintLine line,
                          JRExporterGridCell gridCell,
                          int x,
                          int y)
                   throws JRException
Specified by:
exportLine in class JRXlsAbstractExporter
Throws:
JRException

exportRectangle

protected void exportRectangle(JRPrintElement element,
                               JRExporterGridCell gridCell,
                               int x,
                               int y)
                        throws JRException
Specified by:
exportRectangle in class JRXlsAbstractExporter
Throws:
JRException

exportText

protected void exportText(JRPrintText text,
                          JRExporterGridCell gridCell,
                          int x,
                          int y)
                   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 jxl.write.WriteException,
                       jxl.write.biff.RowsExceededException,
                       JRException
Throws:
jxl.write.WriteException
jxl.write.biff.RowsExceededException
JRException

getDetectedCellValue

protected jxl.write.biff.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 jxl.write.biff.CellValue getAutoDetectedCellValue(int x,
                                                            int y,
                                                            java.lang.String textStr,
                                                            JExcelApiExporter.StyleInfo baseStyle)
                                                     throws JRException
Throws:
JRException

getLabelCell

protected jxl.write.biff.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 x,
                           int y)
                    throws JRException
Specified by:
exportImage in class JRXlsAbstractExporter
Throws:
JRException

getNearestColour

protected static jxl.format.Colour getNearestColour(java.awt.Color awtColor)

getLoadedCellStyle

protected jxl.write.WritableCellFormat getLoadedCellStyle(JExcelApiExporter.StyleInfo styleKey)
                                                   throws JRException
Throws:
JRException

getBorderLineStyle

protected static jxl.format.BorderLineStyle getBorderLineStyle(byte lineStyle)
Parameters:
lineStyle -

getTextAlignHolder

public static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)

getExporterElements

protected JRGridLayout.ExporterElements getExporterElements()
Specified by:
getExporterElements in class JRXlsAbstractExporter

exportFrame

protected void exportFrame(JRPrintFrame frame,
                           JRExporterGridCell gridCell,
                           int x,
                           int y)
                    throws JRException
Specified by:
exportFrame in class JRXlsAbstractExporter
Throws:
JRException


© 2001-2006 JasperSoft Corporation www.jaspersoft.com