net.sf.jasperreports.engine.export
Class JRXlsAbstractMetadataExporter

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.JRXlsAbstractMetadataExporter
All Implemented Interfaces:
JRExporter
Direct Known Subclasses:
JExcelApiMetadataExporter

public abstract class JRXlsAbstractMetadataExporter
extends JRXlsAbstractExporter

Version:
$Id: JRXlsAbstractMetadataExporter.java 5180 2012-03-29 13:23:12Z teodord $
Author:
sanda zaharia (shertage@users.sourceforge.net)

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
JRXlsAbstractExporter.TextAlignHolder
 
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver
 
Field Summary
protected  java.util.List<java.lang.String> columnNames
           
protected  java.util.Map<java.lang.String,java.lang.Integer> columnNamesMap
           
protected  int rowIndex
           
protected  boolean writeHeader
           
 
Fields inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
autoFilterEnd, autoFilterStart, cellHidden, cellLocked, columnWidthRatio, createCustomPalette, defaultFont, documentFirstPageNumber, documentPageScale, firstPageNotSet, formatPatternsMap, gridColumnFreezeIndex, gridRowFreezeIndex, ignoreAnchors, 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_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, workbookTemplate, wrapText, XLS_EXPORTER_PROPERTIES_PREFIX
 
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter
dateFormatCache, endPageIndex, filter, fontMap, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, jasperReportsContext, numberFormatCache, parameters, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex
 
Constructor Summary
JRXlsAbstractMetadataExporter()
           
JRXlsAbstractMetadataExporter(JasperReportsContext jasperReportsContext)
           
 
Method Summary
protected  void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex)
           
protected  void addOccupiedCell(OccupiedGridCell occupiedGridCell, 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)
           
protected  void exportFrame(JRPrintFrame frame, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected abstract  void exportGenericElement(JRGenericPrintElement element)
           
protected  void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout)
           
abstract  void exportImage(JRPrintImage image)
           
 void exportImage(JRPrintImage image, JRExporterGridCell cell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout)
           
protected abstract  void exportLine(JRPrintLine line)
           
protected  void exportLine(JRPrintLine line, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected  int exportPage(JRPrintPage page)
           
protected abstract  void exportRectangle(JRPrintGraphicElement element)
           
protected  void exportRectangle(JRPrintGraphicElement element, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected  void exportReportToStream(java.io.OutputStream os)
           
protected abstract  void exportText(JRPrintText textElement)
           
protected  void exportText(JRPrintText text, JRExporterGridCell cell, int colIndex, int rowIndex)
           
protected  java.lang.String getFormula(JRPrintText text)
           
protected  int getImageBorderCorrection(JRPen pen)
           
protected abstract  ExporterNature getNature()
           
protected  JRStyledText getStyledText(JRPrintText textElement)
           
protected static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)
           
protected  boolean isCellHidden(JRPrintElement element)
           
protected  boolean isCellLocked(JRPrintElement element)
           
protected  boolean isColumnReadOnTime(java.util.Map<java.lang.String,java.lang.Object> currentRow, java.lang.String currentColumnName)
          Compares the highest index of the currentRow's columns with the index of the column to be inserted to determine if the current column is read in the proper order
protected  boolean isWrapText(JRPrintElement element)
           
protected abstract  void openWorkbook(java.io.OutputStream os)
           
protected abstract  void removeColumn(int col)
           
protected  void setCell(JRExporterGridCell gridCell, int x, int y)
           
protected  void setColumnNames()
           
protected  void setColumnWidth(int col, int width)
           
protected abstract  void setColumnWidth(int col, int width, boolean autoFit)
           
protected  void setParameters()
           
protected  void setRowHeight(int rowIndex, int lastRowHeight)
           
protected abstract  void setRowHeight(int rowIndex, int lastRowHeight, Cut yCut, XlsRowLevelInfo levelInfo)
           
protected  void setSheetNames()
           
protected abstract  void writeCurrentRow(java.util.Map<java.lang.String,java.lang.Object> currentRow, java.util.Map<java.lang.String,java.lang.Object> repeatedValues)
           
 
Methods inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, exportPage, exportReport, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getWorkbookTemplate, isIgnoreAnchors, isValidScale, isWorkbookTemplateKeepSheets, mergeAndSetRowLevels, resetAutoFilters, setAutoFilter, setBackground, setColumnWidths, setExporterHints, setFreezePane, setFreezePane, setIgnoreAnchors, setRowLevels, setScale, setScale, setSheetName, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValue, updateColumn, updateColumns
 
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCustomHandler, getDateCellValue, getDateFormat, getExporterKey, 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, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writeHeader

protected boolean writeHeader

columnNames

protected java.util.List<java.lang.String> columnNames

columnNamesMap

protected java.util.Map<java.lang.String,java.lang.Integer> columnNamesMap

rowIndex

protected int rowIndex
Constructor Detail

JRXlsAbstractMetadataExporter

public JRXlsAbstractMetadataExporter()
See Also:
JRXlsAbstractMetadataExporter(JasperReportsContext)

JRXlsAbstractMetadataExporter

public JRXlsAbstractMetadataExporter(JasperReportsContext jasperReportsContext)
Method Detail

setParameters

protected void setParameters()
Overrides:
setParameters in class JRXlsAbstractExporter

setColumnNames

protected void setColumnNames()

exportReportToStream

protected void exportReportToStream(java.io.OutputStream os)
                             throws JRException
Overrides:
exportReportToStream in class JRXlsAbstractExporter
Throws:
JRException

exportPage

protected int exportPage(JRPrintPage page)
                  throws JRException
Throws:
JRException

getStyledText

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

getTextAlignHolder

protected static JRXlsAbstractExporter.TextAlignHolder getTextAlignHolder(JRPrintText textElement)

getImageBorderCorrection

protected int getImageBorderCorrection(JRPen pen)
Overrides:
getImageBorderCorrection in class JRXlsAbstractExporter

isWrapText

protected boolean isWrapText(JRPrintElement element)
Overrides:
isWrapText in class JRXlsAbstractExporter

isCellLocked

protected boolean isCellLocked(JRPrintElement element)
Overrides:
isCellLocked in class JRXlsAbstractExporter

getFormula

protected java.lang.String getFormula(JRPrintText text)
Overrides:
getFormula in class JRXlsAbstractExporter

setSheetNames

protected void setSheetNames()
Overrides:
setSheetNames in class JRXlsAbstractExporter

isCellHidden

protected boolean isCellHidden(JRPrintElement element)
Overrides:
isCellHidden in class JRXlsAbstractExporter

isColumnReadOnTime

protected boolean isColumnReadOnTime(java.util.Map<java.lang.String,java.lang.Object> currentRow,
                                     java.lang.String currentColumnName)
Compares the highest index of the currentRow's columns with the index of the column to be inserted to determine if the current column is read in the proper order

Parameters:
currentRow -
currentColumnName -

exportText

protected void exportText(JRPrintText text,
                          JRExporterGridCell cell,
                          int colIndex,
                          int rowIndex)
                   throws JRException
Specified by:
exportText in class JRXlsAbstractExporter
Throws:
JRException

exportImage

public void exportImage(JRPrintImage image,
                        JRExporterGridCell cell,
                        int colIndex,
                        int rowIndex,
                        int emptyCols,
                        int yCutsRow,
                        JRGridLayout layout)
                 throws JRException
Specified by:
exportImage in class JRXlsAbstractExporter
Throws:
JRException

exportRectangle

protected void exportRectangle(JRPrintGraphicElement element,
                               JRExporterGridCell cell,
                               int colIndex,
                               int rowIndex)
                        throws JRException
Specified by:
exportRectangle in class JRXlsAbstractExporter
Throws:
JRException

exportLine

protected void exportLine(JRPrintLine line,
                          JRExporterGridCell cell,
                          int colIndex,
                          int rowIndex)
                   throws JRException
Specified by:
exportLine in class JRXlsAbstractExporter
Throws:
JRException

exportFrame

protected void exportFrame(JRPrintFrame frame,
                           JRExporterGridCell cell,
                           int colIndex,
                           int rowIndex)
                    throws JRException
Specified by:
exportFrame in class JRXlsAbstractExporter
Throws:
JRException

exportGenericElement

protected void exportGenericElement(JRGenericPrintElement element,
                                    JRExporterGridCell cell,
                                    int colIndex,
                                    int rowIndex,
                                    int emptyCols,
                                    int yCutsRow,
                                    JRGridLayout layout)
                             throws JRException
Specified by:
exportGenericElement in class JRXlsAbstractExporter
Throws:
JRException

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

setCell

protected void setCell(JRExporterGridCell gridCell,
                       int x,
                       int y)
Specified by:
setCell in class JRXlsAbstractExporter

getNature

protected abstract ExporterNature getNature()
Specified by:
getNature in class JRXlsAbstractExporter

openWorkbook

protected abstract void openWorkbook(java.io.OutputStream os)
                              throws JRException
Specified by:
openWorkbook in class JRXlsAbstractExporter
Throws:
JRException

createSheet

protected abstract void createSheet(java.lang.String name)
Specified by:
createSheet in class JRXlsAbstractExporter

closeWorkbook

protected abstract void closeWorkbook(java.io.OutputStream os)
                               throws JRException
Specified by:
closeWorkbook in class JRXlsAbstractExporter
Throws:
JRException

setColumnWidth

protected void setColumnWidth(int col,
                              int width)

setColumnWidth

protected abstract void setColumnWidth(int col,
                                       int width,
                                       boolean autoFit)
Specified by:
setColumnWidth in class JRXlsAbstractExporter

removeColumn

protected abstract void removeColumn(int col)
Specified by:
removeColumn in class JRXlsAbstractExporter

setRowHeight

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

setRowHeight

protected abstract void setRowHeight(int rowIndex,
                                     int lastRowHeight,
                                     Cut yCut,
                                     XlsRowLevelInfo levelInfo)
                              throws JRException
Specified by:
setRowHeight in class JRXlsAbstractExporter
Throws:
JRException

exportText

protected abstract void exportText(JRPrintText textElement)
                            throws JRException
Throws:
JRException

exportImage

public abstract void exportImage(JRPrintImage image)
                          throws JRException
Throws:
JRException

exportRectangle

protected abstract void exportRectangle(JRPrintGraphicElement element)
                                 throws JRException
Throws:
JRException

exportLine

protected abstract void exportLine(JRPrintLine line)
                            throws JRException
Throws:
JRException

exportFrame

protected abstract void exportFrame(JRPrintFrame frame)
                             throws JRException
Throws:
JRException

exportGenericElement

protected abstract void exportGenericElement(JRGenericPrintElement element)
                                      throws JRException
Throws:
JRException

writeCurrentRow

protected abstract void writeCurrentRow(java.util.Map<java.lang.String,java.lang.Object> currentRow,
                                        java.util.Map<java.lang.String,java.lang.Object> repeatedValues)
                                 throws JRException
Throws:
JRException


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com