net.sf.jasperreports.engine.export
Class JRXlsExporter
java.lang.Object
net.sf.jasperreports.engine.JRAbstractExporter
net.sf.jasperreports.engine.export.JRXlsAbstractExporter
net.sf.jasperreports.engine.export.JRXlsExporter
- All Implemented Interfaces:
- JRExporter
- public class JRXlsExporter
- extends JRXlsAbstractExporter
Exports a JasperReports document to XLS format. It has binary output type and exports the document to
a grid-based layout.
Since classic AWT fonts can be sometimes very different from system fonts (which are used by XLS viewers),
a font mapping feature was added. By using the JRExporterParameter.FONT_MAP
parameter, a logical
font like "sansserif" can be mapped to a system specific font, like "Comic Sans MS". Both map keys and values are strings.
- Version:
- $Id: JRXlsExporter.java,v 1.35 2005/09/01 14:04:58 teodord Exp $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
Field Summary |
protected short |
backgroundMode
|
protected short |
blackIndex
|
protected org.apache.poi.hssf.usermodel.HSSFCell |
cell
|
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
emptyCellStyle
|
protected org.apache.poi.hssf.usermodel.HSSFRow |
row
|
protected org.apache.poi.hssf.usermodel.HSSFSheet |
sheet
|
protected short |
whiteIndex
|
protected org.apache.poi.hssf.usermodel.HSSFWorkbook |
workbook
|
Fields inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
defaultFont, fontMap, grid, isAutoDetectCellType, isOnePagePerSheet, isRemoveEmptySpace, isRowNotEmpty, isWhitePageBackground, loadedCellStyles, loadedFonts, pageHeight, progressMonitor, reportIndex, styledTextParser, xCuts, yCuts |
Method Summary |
protected void |
addBlankCell(int colIndex,
int rowIndex)
|
protected void |
closeWorkbook(java.io.OutputStream os)
|
protected void |
createSheet(java.lang.String name)
|
protected void |
exportImage(JRPrintImage image,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
|
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
|
protected void |
exportRectangle(JRPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
|
protected void |
exportText(JRPrintText textElement,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
|
protected org.apache.poi.hssf.usermodel.HSSFCellStyle |
getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
org.apache.poi.hssf.usermodel.HSSFFont font,
short topBorder,
short topBorderColor,
short leftBorder,
short leftBorderColor,
short bottomBorder,
short bottomBorderColor,
short rightBorder,
short rightBorderColor)
|
protected org.apache.poi.hssf.usermodel.HSSFFont |
getLoadedFont(JRFont font,
short forecolor)
|
protected static org.apache.poi.hssf.util.HSSFColor |
getNearestColor(java.awt.Color awtColor)
|
protected boolean |
isToExport(JRPrintElement element)
|
protected void |
openWorkbook(java.io.OutputStream os)
|
protected void |
setBackground()
|
protected void |
setCell(int colIndex,
int rowIndex)
|
protected void |
setColumnWidth(short index,
short width)
|
protected void |
setRowHeight(int rowIndex,
int lastRowHeight)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workbook
protected org.apache.poi.hssf.usermodel.HSSFWorkbook workbook
sheet
protected org.apache.poi.hssf.usermodel.HSSFSheet sheet
row
protected org.apache.poi.hssf.usermodel.HSSFRow row
cell
protected org.apache.poi.hssf.usermodel.HSSFCell cell
emptyCellStyle
protected org.apache.poi.hssf.usermodel.HSSFCellStyle emptyCellStyle
whiteIndex
protected short whiteIndex
blackIndex
protected short blackIndex
backgroundMode
protected short backgroundMode
JRXlsExporter
public JRXlsExporter()
setBackground
protected void setBackground()
- Specified by:
setBackground
in class JRXlsAbstractExporter
openWorkbook
protected void openWorkbook(java.io.OutputStream os)
- Specified by:
openWorkbook
in class JRXlsAbstractExporter
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 rowIndex,
int lastRowHeight)
- Specified by:
setRowHeight
in class JRXlsAbstractExporter
setCell
protected void setCell(int colIndex,
int rowIndex)
- Specified by:
setCell
in class JRXlsAbstractExporter
addBlankCell
protected void addBlankCell(int colIndex,
int rowIndex)
- Specified by:
addBlankCell
in class JRXlsAbstractExporter
exportLine
protected void exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
- Specified by:
exportLine
in class JRXlsAbstractExporter
exportRectangle
protected void exportRectangle(JRPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
- Specified by:
exportRectangle
in class JRXlsAbstractExporter
exportText
protected void exportText(JRPrintText textElement,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
- Specified by:
exportText
in class JRXlsAbstractExporter
getNearestColor
protected static org.apache.poi.hssf.util.HSSFColor getNearestColor(java.awt.Color awtColor)
getLoadedFont
protected org.apache.poi.hssf.usermodel.HSSFFont getLoadedFont(JRFont font,
short forecolor)
getLoadedCellStyle
protected org.apache.poi.hssf.usermodel.HSSFCellStyle getLoadedCellStyle(short mode,
short backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
org.apache.poi.hssf.usermodel.HSSFFont font,
short topBorder,
short topBorderColor,
short leftBorder,
short leftBorderColor,
short bottomBorder,
short bottomBorderColor,
short rightBorder,
short rightBorderColor)
exportImage
protected void exportImage(JRPrintImage image,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
- Specified by:
exportImage
in class JRXlsAbstractExporter
isToExport
protected boolean isToExport(JRPrintElement element)
- Specified by:
isToExport
in class JRXlsAbstractExporter
© 2001-2005 JasperSoft Corporation www.jaspersoft.com