|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.JRAbstractExporter
net.sf.jasperreports.engine.export.JRXlsAbstractExporter
com.aspose.cells.jasperreports.ACXlsExporter
public class ACXlsExporter
Export a JasperReports file to xls format. This class is ported from the original JRXlsExporter, replaced dependency of poi to aspose.
Nested Class Summary | |
---|---|
protected class |
ACXlsExporter.BoxStyle
Style information for cell border |
protected class |
ACXlsExporter.StyleInfo
Style information for a cell. |
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
---|
net.sf.jasperreports.engine.export.JRXlsAbstractExporter.TextAlignHolder |
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
---|
net.sf.jasperreports.engine.JRAbstractExporter.ParameterOverriddenResolver, net.sf.jasperreports.engine.JRAbstractExporter.ParameterOverrideResolver, net.sf.jasperreports.engine.JRAbstractExporter.ParameterResolver |
Field Summary | |
---|---|
protected com.aspose.cells.Color |
blackColor
|
protected java.util.Map |
loadedCellStyles
|
protected short |
patternType
|
static java.lang.String |
RELEASE_VERSION_STR
|
protected com.aspose.cells.Color |
whiteColor
|
Fields inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
---|
currentSheetName, defaultFont, fontMap, hyperlinkProducerFactory, isAutoDetectCellType, isCollapseRowSpan, isDetectCellType, isFontSizeFixEnabled, isIgnoreCellBorder, isIgnoreGraphics, isIgnorePageMargins, isImageBorderFixEnabled, isOnePagePerSheet, isRemoveEmptySpaceBetweenColumns, isRemoveEmptySpaceBetweenRows, isWhitePageBackground, loadedFonts, maxRowsPerSheet, progressMonitor, reportIndex, sheetIndex, sheetNames, sheetNamesMap |
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
---|
classLoader, classLoaderSet, dateFormatCache, endPageIndex, fileResolver, fileResolverSet, filter, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, numberFormatCache, parameters, PROPERTY_CELL_FORMULA, startPageIndex, urlHandlerFactory, urlHandlerFactorySet |
Constructor Summary | |
---|---|
ACXlsExporter()
|
Method Summary | |
---|---|
protected void |
addBlankCell(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
Add a blank cell. |
protected void |
closeWorkbook(java.io.OutputStream os)
Close the opened workbook, save it to os. |
protected void |
createMergeRegion(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
com.aspose.cells.Style cellStyle)
Merge cells into a region. |
protected void |
createSheet(java.lang.String name)
Create a new work sheet. |
protected void |
createTextCell(net.sf.jasperreports.engine.JRPrintText textElement,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
net.sf.jasperreports.engine.util.JRStyledText styledText,
ACXlsExporter.StyleInfo baseStyle)
|
protected void |
endCreateCell(com.aspose.cells.Style cellStyle)
|
protected void |
exportChartImage(net.sf.jasperreports.engine.JRPrintImage element,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols)
|
protected void |
exportFrame(net.sf.jasperreports.engine.JRPrintFrame frame,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int x,
int y)
Export a frame |
protected void |
exportImage(net.sf.jasperreports.engine.JRPrintImage element,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols)
Export an image. |
protected void |
exportLine(net.sf.jasperreports.engine.JRPrintLine line,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
Export a line to a cell. |
protected void |
exportRectangle(net.sf.jasperreports.engine.JRPrintGraphicElement element,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
Export a rectangle. |
void |
exportReport()
Export report in the XLS format. |
protected void |
exportText(net.sf.jasperreports.engine.JRPrintText textElement,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex)
Export text. |
protected static int |
getBorderStyle(net.sf.jasperreports.engine.JRPen pen)
|
protected com.aspose.cells.Style |
getLoadedCellStyle(ACXlsExporter.StyleInfo style)
|
protected com.aspose.cells.Style |
getLoadedCellStyle(short mode,
com.aspose.cells.Color backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
com.aspose.cells.Font font,
ACXlsExporter.BoxStyle box)
|
protected com.aspose.cells.Style |
getLoadedCellStyle(short mode,
com.aspose.cells.Color backcolor,
short horizontalAlignment,
short verticalAlignment,
short rotation,
com.aspose.cells.Font font,
net.sf.jasperreports.engine.export.JRExporterGridCell gridCell)
|
protected com.aspose.cells.Font |
getLoadedFont(net.sf.jasperreports.engine.JRFont font,
com.aspose.cells.Color forecolor)
Get cached font |
protected net.sf.jasperreports.engine.export.ExporterNature |
getNature()
|
protected java.lang.String |
getNewDataSheetName()
|
static java.lang.String |
getReleaseVersion()
Get version of Aspose.Cells for JasperReports. |
protected com.aspose.cells.Style |
initCreateCell(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
ACXlsExporter.StyleInfo baseStyle)
|
protected void |
openWorkbook(java.io.OutputStream os)
Open a workbook to the OutputStream os. |
protected void |
removeColumn(int colIndex)
Remove a column. |
protected void |
setBackground()
Set default background. |
protected void |
setCell(int colIndex,
int rowIndex)
Create an empty cell. |
protected void |
setColumnWidth(int col,
int width)
Set width of a column. |
protected void |
setParameters()
Set parameters of the exporter. |
protected void |
setRowHeight(int rowIndex,
int lastRowHeight)
Set height of a row. |
protected void |
setStringCellValue(java.lang.String textStr)
|
protected com.aspose.cells.Color |
translateColor(java.awt.Color color)
Translate a color from java.awt.Color into com.aspose.cells.Color. |
Methods inherited from class net.sf.jasperreports.engine.export.JRXlsAbstractExporter |
---|
exportPage, exportReportToStream, getCustomHandler, getDefaultFont, getImageBorderCorrection, getStyledText, getTextAlignHolder, removeEmptyColumns, setColumnWidths |
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 |
---|
protected java.util.Map loadedCellStyles
protected com.aspose.cells.Color whiteColor
protected com.aspose.cells.Color blackColor
protected short patternType
public static final java.lang.String RELEASE_VERSION_STR
Constructor Detail |
---|
public ACXlsExporter()
Method Detail |
---|
protected java.lang.String getNewDataSheetName()
public static java.lang.String getReleaseVersion()
protected void setParameters()
setParameters
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
protected void setBackground()
setBackground
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
protected void openWorkbook(java.io.OutputStream os)
openWorkbook
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
os
- the OutputStream where the workbook will be saved to.protected void createSheet(java.lang.String name)
createSheet
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
name
- name of the work sheet.protected void closeWorkbook(java.io.OutputStream os) throws net.sf.jasperreports.engine.JRException
closeWorkbook
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
os
- OutputStream where the workbook is saved.
net.sf.jasperreports.engine.JRException
protected void setColumnWidth(int col, int width)
setColumnWidth
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
col
- The column indexwidth
- Width of the columnprotected void setRowHeight(int rowIndex, int lastRowHeight)
setRowHeight
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
rowIndex
- The row indexlastRowHeight
- Height of the rowprotected void setCell(int colIndex, int rowIndex)
setCell
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
colIndex
- Column index of the cellrowIndex
- Row index of the cellprotected void removeColumn(int colIndex)
removeColumn
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
colIndex
- Column indexprotected void addBlankCell(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex)
addBlankCell
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
gridCell
- Style for the cellcolIndex
- Column index of the cellrowIndex
- Row index of the cellprotected void exportLine(net.sf.jasperreports.engine.JRPrintLine line, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex)
exportLine
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
line
- The object which contains description for the line.gridCell
- Style information of the grids.colIndex
- Column index of the line.rowIndex
- Row index of the line.protected void exportRectangle(net.sf.jasperreports.engine.JRPrintGraphicElement element, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex)
exportRectangle
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
element
- The object which contains descriptions for the rectanglegridCell
- Style information of the gridscolIndex
- Column index of the rectanglerowIndex
- Row index of the rectangleprotected void exportText(net.sf.jasperreports.engine.JRPrintText textElement, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex) throws net.sf.jasperreports.engine.JRException
exportText
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
textElement
- The object which contains description of the text.gridCell
- Style information of the grids.colIndex
- Column index.rowIndex
- Row index.
net.sf.jasperreports.engine.JRException
protected void createTextCell(net.sf.jasperreports.engine.JRPrintText textElement, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex, net.sf.jasperreports.engine.util.JRStyledText styledText, ACXlsExporter.StyleInfo baseStyle) throws net.sf.jasperreports.engine.JRException
net.sf.jasperreports.engine.JRException
protected com.aspose.cells.Style initCreateCell(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex, ACXlsExporter.StyleInfo baseStyle)
protected void endCreateCell(com.aspose.cells.Style cellStyle)
protected final void setStringCellValue(java.lang.String textStr)
protected void createMergeRegion(net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex, com.aspose.cells.Style cellStyle)
gridCell
- Description of the grids, including row and column spanscolIndex
- Starting column indexrowIndex
- Starting row indexcellStyle
- Style of the merged regionprotected com.aspose.cells.Font getLoadedFont(net.sf.jasperreports.engine.JRFont font, com.aspose.cells.Color forecolor)
font
- JRFont of the fontforecolor
-
protected com.aspose.cells.Style getLoadedCellStyle(ACXlsExporter.StyleInfo style)
protected com.aspose.cells.Style getLoadedCellStyle(short mode, com.aspose.cells.Color backcolor, short horizontalAlignment, short verticalAlignment, short rotation, com.aspose.cells.Font font, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell)
protected com.aspose.cells.Style getLoadedCellStyle(short mode, com.aspose.cells.Color backcolor, short horizontalAlignment, short verticalAlignment, short rotation, com.aspose.cells.Font font, ACXlsExporter.BoxStyle box)
protected static int getBorderStyle(net.sf.jasperreports.engine.JRPen pen)
protected void exportImage(net.sf.jasperreports.engine.JRPrintImage element, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols) throws net.sf.jasperreports.engine.JRException
exportImage
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
net.sf.jasperreports.engine.JRException
protected void exportChartImage(net.sf.jasperreports.engine.JRPrintImage element, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols) throws net.sf.jasperreports.engine.JRException
net.sf.jasperreports.engine.JRException
protected void exportFrame(net.sf.jasperreports.engine.JRPrintFrame frame, net.sf.jasperreports.engine.export.JRExporterGridCell gridCell, int x, int y)
exportFrame
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
protected net.sf.jasperreports.engine.export.ExporterNature getNature()
getNature
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
protected com.aspose.cells.Color translateColor(java.awt.Color color)
public void exportReport() throws net.sf.jasperreports.engine.JRException
exportReport
in interface net.sf.jasperreports.engine.JRExporter
exportReport
in class net.sf.jasperreports.engine.export.JRXlsAbstractExporter
net.sf.jasperreports.engine.JRException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |