public class JRTextExporter extends JRAbstractExporter
As a conclusion, the text exporter will yield the better results if the space needed for displaying a text is large. So users have to either design reports with few text or export to big text pages. Another good practice is to arrange text elements at design time as similar as possible to a grid.
JRExporterParameterJRAbstractExporter.BaseExporterContext, JRAbstractExporter.ParameterOverriddenResolver, JRAbstractExporter.ParameterOverrideResolver, JRAbstractExporter.ParameterResolver| Modifier and Type | Field and Description |
|---|---|
protected String |
betweenPagesText |
protected float |
charHeight |
protected float |
charWidth |
protected String |
lineSeparator |
protected int |
pageHeightInChars |
protected int |
pageWidthInChars |
protected JRExportProgressMonitor |
progressMonitor |
protected static String |
systemLineSeparator |
protected Writer |
writer |
allSelector, dateFormatCache, endPageIndex, filter, fontMap, globalOffsetX, globalOffsetY, hyperlinkProducerFactory, isModeBatch, jasperPrint, jasperPrintList, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, startPageIndex, styledTextUtil| Constructor and Description |
|---|
JRTextExporter() |
JRTextExporter(JasperReportsContext jasperReportsContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
exportElements(List<JRPrintElement> elements) |
protected void |
exportPage(JRPrintPage page)
Exports a page to the output writer.
|
void |
exportReport()
Actually starts the export process.
|
protected void |
exportReportToWriter() |
protected void |
exportText(JRPrintText element)
Renders a text and places it in the output matrix.
|
String |
getExporterKey() |
protected int |
getHeightInChars(int height)
Transforms height from pixel space to character space.
|
protected JRStyledText |
getStyledText(JRPrintText textElement) |
protected int |
getWidthInChars(int width)
Transforms width from pixel space to character space.
|
void |
setReportParameters() |
createFilter, defaultParseNumber, getBooleanCellValue, getBooleanParameter, getCharacterParameter, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, 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, setJasperReportsContext, setOffset, setOffset, setOutput, setPageRange, setParameter, setParameters, setReportContextprotected int pageWidthInChars
protected int pageHeightInChars
protected float charWidth
protected float charHeight
protected JRExportProgressMonitor progressMonitor
protected Writer writer
protected String betweenPagesText
protected String lineSeparator
protected static final String systemLineSeparator
public JRTextExporter()
JRTextExporter(JasperReportsContext)public JRTextExporter(JasperReportsContext jasperReportsContext)
public void exportReport()
throws JRException
JRExporterexportReport in interface JRExporterexportReport in class JRAbstractExporterJRExceptionpublic void setReportParameters()
throws JRException
JRExceptionprotected void exportReportToWriter()
throws JRException,
IOException
JRExceptionIOExceptionprotected void exportPage(JRPrintPage page) throws IOException
IOExceptionprotected void exportElements(List<JRPrintElement> elements)
protected void exportText(JRPrintText element)
protected int getHeightInChars(int height)
protected int getWidthInChars(int width)
protected JRStyledText getStyledText(JRPrintText textElement)
getStyledText in class JRAbstractExporterpublic String getExporterKey()
getExporterKey in class JRAbstractExporterCopyright © 2014. All rights reserved.