public class JRDocxExporter extends JRAbstractExporter<DocxReportConfiguration,DocxExporterConfiguration,OutputStreamExporterOutput,JRDocxExporterContext>
DocxReportConfiguration
):
isFramesAsNestedTables()
exporter configuration flag or its corresponding exporter hint called
net.sf.jasperreports.export.docx.frames.as.nested.tables
.isFlexibleRowHeight()
exporter configuration flag, or its corresponding exporter hint called
net.sf.jasperreports.export.docx.flexible.row.height
.isIgnoreHyperlink()
exporter configuration flag, or its corresponding exporter hint called
net.sf.jasperreports.export.docx.ignore.hyperlink
DocxReportConfiguration
Modifier and Type | Class and Description |
---|---|
protected class |
JRDocxExporter.ExporterContext |
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange
allSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_MIXED_CALLS_NOT_ALLOWED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses
Constructor and Description |
---|
JRDocxExporter() |
JRDocxExporter(JasperReportsContext jasperReportsContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
endHyperlink(boolean isText) |
protected void |
ensureInput() |
protected void |
ensureOutput() |
protected void |
exportEllipse(DocxTableHelper tableHelper,
JRPrintEllipse ellipse,
JRExporterGridCell gridCell) |
protected void |
exportFrame(DocxTableHelper tableHelper,
JRPrintFrame frame,
JRExporterGridCell gridCell)
In deep grids, this is called only for empty frames.
|
protected void |
exportGenericElement(DocxTableHelper tableHelper,
JRGenericPrintElement element,
JRExporterGridCell gridCell) |
protected void |
exportGrid(JRGridLayout gridLayout,
JRPrintElementIndex frameIndex) |
void |
exportImage(DocxTableHelper tableHelper,
JRPrintImage image,
JRExporterGridCell gridCell) |
protected void |
exportLine(DocxTableHelper tableHelper,
JRPrintLine line,
JRExporterGridCell gridCell) |
protected void |
exportPage(JRPrintPage page) |
protected void |
exportRectangle(DocxTableHelper tableHelper,
JRPrintRectangle rectangle,
JRExporterGridCell gridCell) |
void |
exportReport()
Performs the export.
|
protected void |
exportReportToStream(OutputStream os) |
protected void |
exportStyledText(JRStyle style,
JRStyledText styledText,
Locale locale,
boolean hiddenText,
boolean startedHyperlink,
boolean isNewLineJustified) |
void |
exportText(DocxTableHelper tableHelper,
JRPrintText text,
JRExporterGridCell gridCell) |
protected Class<DocxExporterConfiguration> |
getConfigurationInterface() |
protected JRPrintElementIndex |
getElementIndex(JRExporterGridCell gridCell) |
String |
getExporterKey() |
String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected String |
getHyperlinkTarget(JRPrintHyperlink link) |
protected String |
getHyperlinkURL(JRPrintHyperlink link) |
protected Class<DocxReportConfiguration> |
getItemConfigurationInterface() |
static JRPrintElementIndex |
getPrintElementIndex(String imageName)
protected void writeImageMap(String imageMapName, JRPrintHyperlink mainHyperlink, List imageMapAreas)
{
writer.write("\n");
}
protected void writeImageAreaCoordinates(JRPrintImageArea area)
{
int[] coords = area.getCoordinates();
if (coords != null && coords.length > 0)
{
StringBuilder coordsEnum = new StringBuilder(coords.length * 4);
coordsEnum.append(coords[0]);
for (int i = 1; i < coords.length; i++)
{
coordsEnum.append(',');
coordsEnum.append(coords[i]);
}
writer.write(" coords=\"" + coordsEnum + "\"");
}
}
protected void writeImageAreaHyperlink(JRPrintHyperlink hyperlink)
{
String href = getHyperlinkURL(hyperlink);
if (href == null)
{
writer.write(" nohref=\"nohref\"");
}
else
{
writer.write(" href=\"" + href + "\"");
String target = getHyperlinkTarget(hyperlink);
if (target != null)
{
writer.write(" target=\"");
writer.write(target);
writer.write("\"");
}
}
if (hyperlink.getHyperlinkTooltip() != null)
{
writer.write(" title=\"");
writer.write(JRStringUtil.xmlEncode(hyperlink.getHyperlinkTooltip()));
writer.write("\"");
}
}
/**
|
protected void |
initExport() |
protected void |
initReport() |
protected void |
insertBookmark(String bookmark,
BaseHelper helper) |
protected void |
restoreBackcolor() |
protected void |
setBackcolor(Color color) |
protected boolean |
startHyperlink(JRPrintHyperlink link,
boolean isText) |
createFilter, defaultParseNumber, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getRendererUtil, getReportContext, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContext
public static final String DOCX_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String)
.public static final String EXCEPTION_MESSAGE_KEY_COLUMN_COUNT_OUT_OF_RANGE
protected static final String DOCX_EXPORTER_PROPERTIES_PREFIX
public static final String PROPERTY_IGNORE_HYPERLINK
DocxReportConfiguration.PROPERTY_IGNORE_HYPERLINK
.public static final String PROPERTY_HIDDEN_TEXT
JRPropertiesUtil
,
Constant Field Valuespublic static final String JR_PAGE_ANCHOR_PREFIX
public static final String IMAGE_NAME_PREFIX
protected static final int IMAGE_NAME_PREFIX_LEGTH
public static final String IMAGE_LINK_PREFIX
protected DocxZip docxZip
protected DocxDocumentHelper docHelper
protected Writer docWriter
protected RenderersCache renderersCache
protected int reportIndex
protected int pageIndex
protected int startPageIndex
protected int endPageIndex
protected int tableIndex
protected boolean startPage
protected String invalidCharReplacement
protected PrintPageFormat pageFormat
protected JRGridLayout pageGridLayout
protected LinkedList<Color> backcolorStack
protected Color backcolor
protected DocxRunHelper runHelper
protected ExporterNature nature
protected long bookmarkIndex
protected String pageAnchor
protected DocxRelsHelper relsHelper
public JRDocxExporter()
JRDocxExporter(JasperReportsContext)
public JRDocxExporter(JasperReportsContext jasperReportsContext)
protected Class<DocxExporterConfiguration> getConfigurationInterface()
protected Class<DocxReportConfiguration> getItemConfigurationInterface()
protected void ensureOutput()
public void exportReport() throws JRException
Exporter
exportReport
in interface Exporter<ExporterInput,DocxReportConfiguration,DocxExporterConfiguration,OutputStreamExporterOutput>
exportReport
in class JRAbstractExporter<DocxReportConfiguration,DocxExporterConfiguration,OutputStreamExporterOutput,JRDocxExporterContext>
JRException
protected void initExport()
protected void initReport()
protected void exportReportToStream(OutputStream os) throws JRException, IOException
JRException
IOException
protected void exportPage(JRPrintPage page) throws JRException
JRException
protected void exportGrid(JRGridLayout gridLayout, JRPrintElementIndex frameIndex) throws JRException
JRException
protected void exportLine(DocxTableHelper tableHelper, JRPrintLine line, JRExporterGridCell gridCell)
protected void exportRectangle(DocxTableHelper tableHelper, JRPrintRectangle rectangle, JRExporterGridCell gridCell)
protected void exportEllipse(DocxTableHelper tableHelper, JRPrintEllipse ellipse, JRExporterGridCell gridCell)
public void exportText(DocxTableHelper tableHelper, JRPrintText text, JRExporterGridCell gridCell)
protected void exportStyledText(JRStyle style, JRStyledText styledText, Locale locale, boolean hiddenText, boolean startedHyperlink, boolean isNewLineJustified)
public void exportImage(DocxTableHelper tableHelper, JRPrintImage image, JRExporterGridCell gridCell) throws JRException
JRException
protected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
public static JRPrintElementIndex getPrintElementIndex(String imageName)
protected void exportFrame(DocxTableHelper tableHelper, JRPrintFrame frame, JRExporterGridCell gridCell) throws JRException
JRException
protected void exportGenericElement(DocxTableHelper tableHelper, JRGenericPrintElement element, JRExporterGridCell gridCell)
protected void setBackcolor(Color color)
protected void restoreBackcolor()
protected boolean startHyperlink(JRPrintHyperlink link, boolean isText)
protected String getHyperlinkTarget(JRPrintHyperlink link)
protected String getHyperlinkURL(JRPrintHyperlink link)
protected void endHyperlink(boolean isText)
protected void insertBookmark(String bookmark, BaseHelper helper)
protected void ensureInput()
public String getExporterKey()
public String getExporterPropertiesPrefix()
JRAbstractExporter
getExporterPropertiesPrefix
in class JRAbstractExporter<DocxReportConfiguration,DocxExporterConfiguration,OutputStreamExporterOutput,JRDocxExporterContext>
Copyright © 2016. All rights reserved.