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
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
backcolor |
protected java.util.LinkedList<java.awt.Color> |
backcolorStack |
protected long |
bookmarkIndex |
protected DocxDocumentHelper |
docHelper |
protected java.io.Writer |
docWriter |
static java.lang.String |
DOCX_EXPORTER_KEY
The exporter key, as used in
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String) . |
protected static java.lang.String |
DOCX_EXPORTER_PROPERTIES_PREFIX |
protected DocxZip |
docxZip |
protected int |
endPageIndex |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_COLUMN_COUNT_OUT_OF_RANGE |
static java.lang.String |
IMAGE_LINK_PREFIX |
static java.lang.String |
IMAGE_NAME_PREFIX |
protected static int |
IMAGE_NAME_PREFIX_LEGTH |
protected java.lang.String |
invalidCharReplacement |
static java.lang.String |
JR_PAGE_ANCHOR_PREFIX |
protected ExporterNature |
nature |
protected java.lang.String |
pageAnchor |
protected PrintPageFormat |
pageFormat |
protected JRGridLayout |
pageGridLayout |
protected int |
pageIndex |
static java.lang.String |
PROPERTY_HIDDEN_TEXT
This property is used to mark text elements as being hidden either for printing or on-screen display.
|
static java.lang.String |
PROPERTY_IGNORE_HYPERLINK
Deprecated.
Replaced by
DocxReportConfiguration.PROPERTY_IGNORE_HYPERLINK . |
protected DocxRelsHelper |
relsHelper |
protected java.util.Map<java.lang.String,java.lang.String> |
rendererToImagePathMap |
protected int |
reportIndex |
protected DocxRunHelper |
runHelper |
protected boolean |
startPage |
protected int |
startPageIndex |
protected int |
tableIndex |
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, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, 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(java.io.OutputStream os) |
protected void |
exportStyledText(JRStyle style,
JRStyledText styledText,
java.util.Locale locale,
boolean hiddenText,
boolean startedHyperlink,
boolean isNewLineJustified) |
void |
exportText(DocxTableHelper tableHelper,
JRPrintText text,
JRExporterGridCell gridCell) |
protected java.lang.Class<DocxExporterConfiguration> |
getConfigurationInterface() |
protected JRPrintElementIndex |
getElementIndex(JRExporterGridCell gridCell) |
java.lang.String |
getExporterKey() |
java.lang.String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected java.lang.String |
getHyperlinkTarget(JRPrintHyperlink link) |
protected java.lang.String |
getHyperlinkURL(JRPrintHyperlink link) |
protected java.lang.Class<DocxReportConfiguration> |
getItemConfigurationInterface() |
static JRPrintElementIndex |
getPrintElementIndex(java.lang.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)
{
StringBuffer coordsEnum = new StringBuffer(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(java.lang.String bookmark,
BaseHelper helper) |
protected void |
restoreBackcolor() |
protected void |
setBackcolor(java.awt.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, 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 java.lang.String DOCX_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String)
.public static final java.lang.String EXCEPTION_MESSAGE_KEY_COLUMN_COUNT_OUT_OF_RANGE
protected static final java.lang.String DOCX_EXPORTER_PROPERTIES_PREFIX
public static final java.lang.String PROPERTY_IGNORE_HYPERLINK
DocxReportConfiguration.PROPERTY_IGNORE_HYPERLINK
.public static final java.lang.String PROPERTY_HIDDEN_TEXT
JRPropertiesUtil
,
Constant Field Valuespublic static final java.lang.String JR_PAGE_ANCHOR_PREFIX
public static final java.lang.String IMAGE_NAME_PREFIX
protected static final int IMAGE_NAME_PREFIX_LEGTH
public static final java.lang.String IMAGE_LINK_PREFIX
protected DocxZip docxZip
protected DocxDocumentHelper docHelper
protected java.io.Writer docWriter
protected java.util.Map<java.lang.String,java.lang.String> rendererToImagePathMap
protected int reportIndex
protected int pageIndex
protected int startPageIndex
protected int endPageIndex
protected int tableIndex
protected boolean startPage
protected java.lang.String invalidCharReplacement
protected PrintPageFormat pageFormat
protected JRGridLayout pageGridLayout
protected java.util.LinkedList<java.awt.Color> backcolorStack
protected java.awt.Color backcolor
protected DocxRunHelper runHelper
protected ExporterNature nature
protected long bookmarkIndex
protected java.lang.String pageAnchor
protected DocxRelsHelper relsHelper
public JRDocxExporter()
JRDocxExporter(JasperReportsContext)
public JRDocxExporter(JasperReportsContext jasperReportsContext)
protected java.lang.Class<DocxExporterConfiguration> getConfigurationInterface()
protected java.lang.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(java.io.OutputStream os) throws JRException, java.io.IOException
JRException
java.io.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, java.util.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(java.lang.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(java.awt.Color color)
protected void restoreBackcolor()
protected boolean startHyperlink(JRPrintHyperlink link, boolean isText)
protected java.lang.String getHyperlinkTarget(JRPrintHyperlink link)
protected java.lang.String getHyperlinkURL(JRPrintHyperlink link)
protected void endHyperlink(boolean isText)
protected void insertBookmark(java.lang.String bookmark, BaseHelper helper)
protected void ensureInput()
public java.lang.String getExporterKey()
public java.lang.String getExporterPropertiesPrefix()
JRAbstractExporter
getExporterPropertiesPrefix
in class JRAbstractExporter<DocxReportConfiguration,DocxExporterConfiguration,OutputStreamExporterOutput,JRDocxExporterContext>
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com