|
||||||||||
| 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.JRHtmlExporter
public class JRHtmlExporter
Exports a JasperReports document to HTML format. It has character output type and exports the document to a grid-based layout.
Since classic AWT fonts can be sometimes very different from HTML fonts, a font mapping feature was added.
By using the JRExporterParameter.FONT_MAP parameter, a logical font like "sansserif" can be mapped to a
list of HTML specific fonts, like "Arial, Verdana, Tahoma". Both map keys and values are strings.
| Nested Class Summary | |
|---|---|
protected static interface |
JRHtmlExporter.StringProvider
|
| Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
|---|
JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver |
| Field Summary | |
|---|---|
protected java.lang.String |
betweenPagesHtml
|
protected static java.lang.String |
CSS_TEXT_ALIGN_CENTER
|
protected static java.lang.String |
CSS_TEXT_ALIGN_JUSTIFY
|
protected static java.lang.String |
CSS_TEXT_ALIGN_LEFT
|
protected static java.lang.String |
CSS_TEXT_ALIGN_RIGHT
|
protected boolean |
deepGrid
|
protected JRHtmlExporter.StringProvider |
emptyCellStringProvider
|
protected java.lang.String |
encoding
|
protected java.util.Map |
fontMap
|
static java.lang.String |
HTML_EXPORTER_KEY
The exporter key, as used in GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String). |
protected static java.lang.String |
HTML_VERTICAL_ALIGN_BOTTOM
|
protected static java.lang.String |
HTML_VERTICAL_ALIGN_MIDDLE
|
protected static java.lang.String |
HTML_VERTICAL_ALIGN_TOP
|
protected java.lang.String |
htmlFooter
|
protected java.lang.String |
htmlHeader
|
protected JRHyperlinkProducerFactory |
hyperlinkProducerFactory
|
static java.lang.String |
IMAGE_NAME_PREFIX
|
protected static int |
IMAGE_NAME_PREFIX_LEGTH
|
protected java.util.Map |
imageMaps
|
protected java.util.Map |
imageNameToImageDataMap
|
protected java.io.File |
imagesDir
|
protected java.util.List |
imagesToProcess
|
protected java.lang.String |
imagesURI
|
protected boolean |
isIgnorePageMargins
|
protected boolean |
isOutputImagesToDir
|
protected boolean |
isPxImageLoaded
|
protected boolean |
isRemoveEmptySpace
|
protected boolean |
isUsingImagesToAlign
|
protected boolean |
isWhitePageBackground
|
protected boolean |
isWrapBreakWord
|
protected static java.lang.String |
JR_PAGE_ANCHOR_PREFIX
|
protected ExporterNature |
nature
|
protected int |
pageIndex
|
protected JRExportProgressMonitor |
progressMonitor
|
static java.lang.String |
PROPERTY_FRAMES_AS_NESTED_TABLES
Deprecated. Replaced by JRHtmlExporterParameter.PROPERTY_FRAMES_AS_NESTED_TABLES. |
protected java.util.Map |
rendererToImagePathMap
|
protected int |
reportIndex
|
protected java.lang.String |
sizeUnit
|
protected java.io.Writer |
writer
|
| 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, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, urlHandlerFactory, urlHandlerFactorySet |
| Constructor Summary | |
|---|---|
JRHtmlExporter()
|
|
| Method Summary | |
|---|---|
protected java.awt.Color |
appendBackcolorStyle(JRExporterGridCell gridCell,
java.lang.StringBuffer styleBuffer)
|
protected boolean |
appendBorderStyle(JRLineBox box,
java.lang.StringBuffer styleBuffer)
|
protected void |
endHyperlink()
|
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell)
|
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell)
|
protected void |
exportGrid(JRGridLayout gridLayout,
boolean whitePageBackground)
|
protected void |
exportImage(JRPrintImage image,
JRExporterGridCell gridCell)
|
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell gridCell)
|
protected void |
exportPage(JRPrintPage page)
|
protected void |
exportRectangle(JRPrintGraphicElement element,
JRExporterGridCell gridCell)
|
void |
exportReport()
Actually starts the export process. |
protected void |
exportReportToWriter()
|
protected void |
exportStyledText(JRStyledText styledText)
|
protected void |
exportStyledText(JRStyledText styledText,
java.lang.String tooltip)
|
protected void |
exportStyledTextRun(java.util.Map attributes,
java.lang.String text)
|
protected void |
exportStyledTextRun(java.util.Map attributes,
java.lang.String text,
java.lang.String tooltip)
|
protected void |
exportText(JRPrintText text,
JRExporterGridCell gridCell)
|
protected JRHyperlinkProducer |
getCustomHandler(JRPrintHyperlink link)
|
protected JRPrintElementIndex |
getElementIndex(JRExporterGridCell gridCell)
|
JasperPrint |
getExportedReport()
Returns the report which is currently exported. |
java.util.Map |
getExportParameters()
Returns the map of export parameters. |
java.lang.String |
getExportPropertiesPrefix()
Returns the properties prefix for the current exporter. |
protected java.lang.String |
getHyperlinkTarget(JRPrintHyperlink link)
|
protected java.lang.String |
getHyperlinkURL(JRPrintHyperlink link)
|
static JRPrintImage |
getImage(java.util.List jasperPrintList,
JRPrintElementIndex imageIndex)
|
static JRPrintImage |
getImage(java.util.List jasperPrintList,
java.lang.String imageName)
|
static java.lang.String |
getImageName(JRPrintElementIndex printElementIndex)
|
static JRPrintElementIndex |
getPrintElementIndex(java.lang.String imageName)
|
protected void |
loadPxImage()
|
protected void |
restoreBackcolor()
|
protected void |
setBackcolor(java.awt.Color color)
|
protected void |
setDeepGrid()
|
protected void |
setHyperlinkProducerFactory()
|
protected boolean |
startHyperlink(JRPrintHyperlink link)
|
protected void |
writeCellTDStart(JRExporterGridCell gridCell)
|
protected void |
writeEmptyCell(JRExporterGridCell cell,
int rowHeight)
|
protected void |
writeImageAreaCoordinates(int[] coords)
|
protected void |
writeImageAreaHyperlink(JRPrintHyperlink hyperlink)
|
protected void |
writeImageMap(java.lang.String imageMapName,
JRPrintImage image,
java.util.List imageMapAreas)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String HTML_EXPORTER_KEY
GenericElementHandlerEnviroment.getHandler(net.sf.jasperreports.engine.JRGenericElementType, String).
public static final java.lang.String PROPERTY_FRAMES_AS_NESTED_TABLES
JRHtmlExporterParameter.PROPERTY_FRAMES_AS_NESTED_TABLES.protected static final java.lang.String JR_PAGE_ANCHOR_PREFIX
protected static final java.lang.String CSS_TEXT_ALIGN_LEFT
protected static final java.lang.String CSS_TEXT_ALIGN_RIGHT
protected static final java.lang.String CSS_TEXT_ALIGN_CENTER
protected static final java.lang.String CSS_TEXT_ALIGN_JUSTIFY
protected static final java.lang.String HTML_VERTICAL_ALIGN_TOP
protected static final java.lang.String HTML_VERTICAL_ALIGN_MIDDLE
protected static final java.lang.String HTML_VERTICAL_ALIGN_BOTTOM
public static final java.lang.String IMAGE_NAME_PREFIX
protected static final int IMAGE_NAME_PREFIX_LEGTH
protected java.io.Writer writer
protected JRExportProgressMonitor progressMonitor
protected java.util.Map rendererToImagePathMap
protected java.util.Map imageMaps
protected java.util.Map imageNameToImageDataMap
protected java.util.List imagesToProcess
protected boolean isPxImageLoaded
protected int reportIndex
protected int pageIndex
protected java.io.File imagesDir
protected java.lang.String imagesURI
protected boolean isOutputImagesToDir
protected boolean isRemoveEmptySpace
protected boolean isWhitePageBackground
protected java.lang.String encoding
protected java.lang.String sizeUnit
protected boolean isUsingImagesToAlign
protected boolean isWrapBreakWord
protected boolean isIgnorePageMargins
protected java.lang.String htmlHeader
protected java.lang.String betweenPagesHtml
protected java.lang.String htmlFooter
protected JRHtmlExporter.StringProvider emptyCellStringProvider
protected java.util.Map fontMap
protected JRHyperlinkProducerFactory hyperlinkProducerFactory
protected boolean deepGrid
protected ExporterNature nature
| Constructor Detail |
|---|
public JRHtmlExporter()
| Method Detail |
|---|
public void exportReport()
throws JRException
JRExporter
exportReport in interface JRExporterexportReport in class JRAbstractExporterJRExceptionprotected void setHyperlinkProducerFactory()
protected void setDeepGrid()
public static JRPrintImage getImage(java.util.List jasperPrintList,
java.lang.String imageName)
public static JRPrintImage getImage(java.util.List jasperPrintList,
JRPrintElementIndex imageIndex)
protected void exportReportToWriter()
throws JRException,
java.io.IOException
JRException
java.io.IOException
protected void exportPage(JRPrintPage page)
throws JRException,
java.io.IOException
JRException
java.io.IOException
protected void exportGrid(JRGridLayout gridLayout,
boolean whitePageBackground)
throws java.io.IOException,
JRException
java.io.IOException
JRException
protected void writeEmptyCell(JRExporterGridCell cell,
int rowHeight)
throws java.io.IOException
java.io.IOException
protected void exportLine(JRPrintLine line,
JRExporterGridCell gridCell)
throws java.io.IOException
java.io.IOException
protected void writeCellTDStart(JRExporterGridCell gridCell)
throws java.io.IOException
java.io.IOException
protected void exportRectangle(JRPrintGraphicElement element,
JRExporterGridCell gridCell)
throws java.io.IOException
java.io.IOException
protected void exportStyledText(JRStyledText styledText)
throws java.io.IOException
java.io.IOException
protected void exportStyledText(JRStyledText styledText,
java.lang.String tooltip)
throws java.io.IOException
java.io.IOException
protected void exportStyledTextRun(java.util.Map attributes,
java.lang.String text)
throws java.io.IOException
java.io.IOException
protected void exportStyledTextRun(java.util.Map attributes,
java.lang.String text,
java.lang.String tooltip)
throws java.io.IOException
java.io.IOException
protected void exportText(JRPrintText text,
JRExporterGridCell gridCell)
throws java.io.IOException
java.io.IOException
protected boolean startHyperlink(JRPrintHyperlink link)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getHyperlinkTarget(JRPrintHyperlink link)
protected java.lang.String getHyperlinkURL(JRPrintHyperlink link)
protected JRHyperlinkProducer getCustomHandler(JRPrintHyperlink link)
protected void endHyperlink()
throws java.io.IOException
java.io.IOException
protected boolean appendBorderStyle(JRLineBox box,
java.lang.StringBuffer styleBuffer)
protected java.awt.Color appendBackcolorStyle(JRExporterGridCell gridCell,
java.lang.StringBuffer styleBuffer)
protected void exportImage(JRPrintImage image,
JRExporterGridCell gridCell)
throws JRException,
java.io.IOException
JRException
java.io.IOExceptionprotected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
protected void writeImageMap(java.lang.String imageMapName,
JRPrintImage image,
java.util.List imageMapAreas)
throws java.io.IOException
java.io.IOException
protected void writeImageAreaCoordinates(int[] coords)
throws java.io.IOException
java.io.IOException
protected void writeImageAreaHyperlink(JRPrintHyperlink hyperlink)
throws java.io.IOException
java.io.IOException
protected void loadPxImage()
throws JRException
JRExceptionpublic static java.lang.String getImageName(JRPrintElementIndex printElementIndex)
public static JRPrintElementIndex getPrintElementIndex(java.lang.String imageName)
protected void exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell)
throws java.io.IOException,
JRException
java.io.IOException
JRExceptionprotected void setBackcolor(java.awt.Color color)
protected void restoreBackcolor()
protected void exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Map getExportParameters()
JRExporterContext
The map uses JRExporterParameter instances as keys.
getExportParameters in interface JRExporterContextpublic java.lang.String getExportPropertiesPrefix()
JRExporterContext
getExportPropertiesPrefix in interface JRExporterContextpublic JasperPrint getExportedReport()
JRExporterContext
getExportedReport in interface JRExporterContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||