net.sf.jasperreports.engine.export
Class JRXlsAbstractExporter

java.lang.Object
  extended by net.sf.jasperreports.engine.JRAbstractExporter
      extended by net.sf.jasperreports.engine.export.JRXlsAbstractExporter
All Implemented Interfaces:
JRExporter
Direct Known Subclasses:
JExcelApiExporter, JRXlsExporter

public abstract class JRXlsAbstractExporter
extends JRAbstractExporter

Version:
$Id: JRXlsAbstractExporter.java 2084 2008-02-08 14:44:57Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Nested Class Summary
protected static class JRXlsAbstractExporter.TextAlignHolder
           
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver
 
Field Summary
protected  java.lang.String currentSheetName
           
protected  JRFont defaultFont
           
protected  java.util.Map fontMap
           
protected  JRHyperlinkProducerFactory hyperlinkProducerFactory
           
protected  boolean isAutoDetectCellType
           
protected  boolean isCollapseRowSpan
           
protected  boolean isDetectCellType
           
protected  boolean isFontSizeFixEnabled
           
protected  boolean isIgnoreCellBorder
           
protected  boolean isIgnoreGraphics
           
protected  boolean isIgnorePageMargins
           
protected  boolean isOnePagePerSheet
           
protected  boolean isRemoveEmptySpaceBetweenColumns
           
protected  boolean isRemoveEmptySpaceBetweenRows
           
protected  boolean isWhitePageBackground
           
protected  java.util.List loadedFonts
           
protected  int maxRowsPerSheet
           
protected  JRExportProgressMonitor progressMonitor
           
protected  int reportIndex
           
protected  int sheetIndex
          used for counting the total number of sheets
protected  java.lang.String[] sheetNames
           
protected  java.util.Map sheetNamesMap
          used when indexing the identical sheet generated names with ordering numbers; contains sheet names as keys and the number of occurences of each sheet name as values
 
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
classLoader, classLoaderSet, dateFormatCache, endPageIndex, fileResolver, fileResolverSet, filter, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, startPageIndex, urlHandlerFactory, urlHandlerFactorySet
 
Constructor Summary
JRXlsAbstractExporter()
           
 
Method Summary
protected abstract  void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex)
           
protected abstract  void closeWorkbook(java.io.OutputStream os)
           
protected abstract  void createSheet(java.lang.String name)
           
protected abstract  void exportFrame(JRPrintFrame frame, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected abstract  void exportImage(JRPrintImage image, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols)
           
protected abstract  void exportLine(JRPrintLine line, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected  int exportPage(JRPrintPage page, CutsInfo xCuts, int startRow)
           
protected abstract  void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell cell, int colIndex, int rowIndex)
           
 void exportReport()
          Actually starts the export process.
protected  void exportReportToStream(java.io.OutputStream os)
           
protected abstract  void exportText(JRPrintText text, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected  JRHyperlinkProducer getCustomHandler(JRPrintHyperlink link)
           
protected  JRFont getDefaultFont()
           
protected static int getImageBorderCorrection(JRPen pen)
           
protected abstract  ExporterNature getNature()
           
protected  JRStyledText getStyledText(JRPrintText textElement)
           
protected static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)
           
protected abstract  void openWorkbook(java.io.OutputStream os)
           
protected abstract  void removeColumn(int col)
           
protected  void removeEmptyColumns(CutsInfo xCuts)
           
protected abstract  void setBackground()
           
protected abstract  void setCell(int colIndex, int rowIndex)
           
protected abstract  void setColumnWidth(int col, int width)
           
protected  void setColumnWidths(CutsInfo xCuts)
           
protected  void setParameters()
           
protected abstract  void setRowHeight(int rowIndex, int lastRowHeight)
           
 
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
defaultParseNumber, getBooleanCellValue, getBooleanParameter, getDateCellValue, getDateFormat, getIntegerParameter, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getParameter, getParameterResolver, getParameters, getStringParameter, getStringParameterOrDefault, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setExportContext, setFrameElementsOffset, setInput, setOffset, 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

loadedFonts

protected java.util.List loadedFonts

isOnePagePerSheet

protected boolean isOnePagePerSheet

isRemoveEmptySpaceBetweenRows

protected boolean isRemoveEmptySpaceBetweenRows

isRemoveEmptySpaceBetweenColumns

protected boolean isRemoveEmptySpaceBetweenColumns

isWhitePageBackground

protected boolean isWhitePageBackground

isAutoDetectCellType

protected boolean isAutoDetectCellType

isDetectCellType

protected boolean isDetectCellType

isFontSizeFixEnabled

protected boolean isFontSizeFixEnabled

isIgnoreGraphics

protected boolean isIgnoreGraphics

isCollapseRowSpan

protected boolean isCollapseRowSpan

isIgnoreCellBorder

protected boolean isIgnoreCellBorder

maxRowsPerSheet

protected int maxRowsPerSheet

hyperlinkProducerFactory

protected JRHyperlinkProducerFactory hyperlinkProducerFactory

sheetNames

protected java.lang.String[] sheetNames

progressMonitor

protected JRExportProgressMonitor progressMonitor

reportIndex

protected int reportIndex

fontMap

protected java.util.Map fontMap

defaultFont

protected JRFont defaultFont

sheetIndex

protected int sheetIndex
used for counting the total number of sheets


sheetNamesMap

protected java.util.Map sheetNamesMap
used when indexing the identical sheet generated names with ordering numbers; contains sheet names as keys and the number of occurences of each sheet name as values


currentSheetName

protected java.lang.String currentSheetName

isIgnorePageMargins

protected boolean isIgnorePageMargins
Constructor Detail

JRXlsAbstractExporter

public JRXlsAbstractExporter()
Method Detail

getDefaultFont

protected JRFont getDefaultFont()

getCustomHandler

protected JRHyperlinkProducer getCustomHandler(JRPrintHyperlink link)

exportReport

public void exportReport()
                  throws JRException
Description copied from interface: JRExporter
Actually starts the export process.

Specified by:
exportReport in interface JRExporter
Specified by:
exportReport in class JRAbstractExporter
Throws:
JRException

setParameters

protected void setParameters()

setBackground

protected abstract void setBackground()

exportReportToStream

protected void exportReportToStream(java.io.OutputStream os)
                             throws JRException
Throws:
JRException

exportPage

protected int exportPage(JRPrintPage page,
                         CutsInfo xCuts,
                         int startRow)
                  throws JRException
Returns:
the number of rows added.
Throws:
JRException

setColumnWidths

protected void setColumnWidths(CutsInfo xCuts)

removeEmptyColumns

protected void removeEmptyColumns(CutsInfo xCuts)

getStyledText

protected JRStyledText getStyledText(JRPrintText textElement)
Overrides:
getStyledText in class JRAbstractExporter

getTextAlignHolder

protected static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)

getImageBorderCorrection

protected static int getImageBorderCorrection(JRPen pen)

getNature

protected abstract ExporterNature getNature()

openWorkbook

protected abstract void openWorkbook(java.io.OutputStream os)
                              throws JRException
Throws:
JRException

createSheet

protected abstract void createSheet(java.lang.String name)

closeWorkbook

protected abstract void closeWorkbook(java.io.OutputStream os)
                               throws JRException
Throws:
JRException

setColumnWidth

protected abstract void setColumnWidth(int col,
                                       int width)

removeColumn

protected abstract void removeColumn(int col)

setRowHeight

protected abstract void setRowHeight(int rowIndex,
                                     int lastRowHeight)
                              throws JRException
Throws:
JRException

setCell

protected abstract void setCell(int colIndex,
                                int rowIndex)

addBlankCell

protected abstract void addBlankCell(JRExporterGridCell gridCell,
                                     int colIndex,
                                     int rowIndex)
                              throws JRException
Throws:
JRException

exportText

protected abstract void exportText(JRPrintText text,
                                   JRExporterGridCell cell,
                                   int colIndex,
                                   int rowIndex)
                            throws JRException
Throws:
JRException

exportImage

protected abstract void exportImage(JRPrintImage image,
                                    JRExporterGridCell cell,
                                    int colIndex,
                                    int rowIndex,
                                    int emptyCols)
                             throws JRException
Throws:
JRException

exportRectangle

protected abstract void exportRectangle(JRPrintGraphicElement element,
                                        JRExporterGridCell cell,
                                        int colIndex,
                                        int rowIndex)
                                 throws JRException
Throws:
JRException

exportLine

protected abstract void exportLine(JRPrintLine line,
                                   JRExporterGridCell cell,
                                   int colIndex,
                                   int rowIndex)
                            throws JRException
Throws:
JRException

exportFrame

protected abstract void exportFrame(JRPrintFrame frame,
                                    JRExporterGridCell cell,
                                    int colIndex,
                                    int rowIndex)
                             throws JRException
Throws:
JRException


© 2001-2006 JasperSoft Corporation www.jaspersoft.com