本文整理汇总了Java中net.sf.jasperreports.export.DocxReportConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java DocxReportConfiguration类的具体用法?Java DocxReportConfiguration怎么用?Java DocxReportConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocxReportConfiguration类属于net.sf.jasperreports.export包,在下文中一共展示了DocxReportConfiguration类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initReport
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
@Override
protected void initReport()
{
super.initReport();
if (jasperPrint.hasProperties() && jasperPrint.getPropertiesMap().containsProperty(JRXmlExporter.PROPERTY_REPLACE_INVALID_CHARS))
{
// allows null values for the property
invalidCharReplacement = jasperPrint.getProperty(JRXmlExporter.PROPERTY_REPLACE_INVALID_CHARS);
}
else
{
invalidCharReplacement = getPropertiesUtil().getProperty(JRXmlExporter.PROPERTY_REPLACE_INVALID_CHARS, jasperPrint);
}
DocxReportConfiguration configuration = getCurrentItemConfiguration();
nature =
new JRDocxExporterNature(
jasperReportsContext,
filter,
!configuration.isFramesAsNestedTables()
);
renderersCache = new RenderersCache(getJasperReportsContext());
}
示例2: isDeep
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
@Override
public boolean isDeep(JRPrintFrame frame)
{
if (
frame.hasProperties()
&& frame.getPropertiesMap().containsProperty(DocxReportConfiguration.PROPERTY_FRAMES_AS_NESTED_TABLES)
)
{
// we make this test to avoid reaching the global default value of the property directly
// and thus skipping the report level one, if present
return !getPropertiesUtil().getBooleanProperty(frame, DocxReportConfiguration.PROPERTY_FRAMES_AS_NESTED_TABLES, !deepGrid);
}
return deepGrid;
}
示例3: getItemConfigurationInterface
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
@Override
protected Class<DocxReportConfiguration> getItemConfigurationInterface()
{
return DocxReportConfiguration.class;
}
示例4: exportText
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
/**
*
*/
public void exportText(DocxTableHelper tableHelper, JRPrintText text, JRExporterGridCell gridCell)
{
tableHelper.getCellHelper().exportHeader(text, gridCell);
JRStyledText styledText = getStyledText(text);
int textLength = 0;
if (styledText != null)
{
textLength = styledText.length();
}
// if (styleBuffer.length() > 0)
// {
// writer.write(" style=\"");
// writer.write(styleBuffer.toString());
// writer.write("\"");
// }
//
// writer.write(">");
docHelper.write(" <w:p>\n");
tableHelper.getParagraphHelper().exportProps(text);
if (startPage)
{
insertBookmark(pageAnchor, docHelper);
}
if (text.getAnchorName() != null)
{
insertBookmark(text.getAnchorName(), docHelper);
}
boolean startedHyperlink = startHyperlink(text, true);
boolean isNewLineAsParagraph = false;
if (HorizontalTextAlignEnum.JUSTIFIED.equals(text.getHorizontalTextAlign()))
{
if (text.hasProperties() && text.getPropertiesMap().containsProperty(DocxReportConfiguration.PROPERTY_NEW_LINE_AS_PARAGRAPH))
{
isNewLineAsParagraph = getPropertiesUtil().getBooleanProperty(text, DocxReportConfiguration.PROPERTY_NEW_LINE_AS_PARAGRAPH, false);
}
else
{
isNewLineAsParagraph = getCurrentItemConfiguration().isNewLineAsParagraph();
}
}
if (textLength > 0)
{
exportStyledText(
getCurrentJasperPrint().getDefaultStyleProvider().getStyleResolver().getBaseStyle(text),
styledText,
getTextLocale(text),
getPropertiesUtil().getBooleanProperty(text, PROPERTY_HIDDEN_TEXT, false),
startedHyperlink,
isNewLineAsParagraph
);
}
if (startedHyperlink)
{
endHyperlink(true);
}
docHelper.write(" </w:p>\n");
tableHelper.getCellHelper().exportFooter();
}
示例5: getHyperlinkURL
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
protected String getHyperlinkURL(JRPrintHyperlink link)
{
String href = null;
Boolean ignoreHyperlink = HyperlinkUtil.getIgnoreHyperlink(DocxReportConfiguration.PROPERTY_IGNORE_HYPERLINK, link);
if (ignoreHyperlink == null)
{
ignoreHyperlink = getCurrentItemConfiguration().isIgnoreHyperlink();
}
if (!ignoreHyperlink)
{
JRHyperlinkProducer customHandler = getHyperlinkProducer(link);
if (customHandler == null)
{
switch(link.getHyperlinkTypeValue())
{
case REFERENCE :
{
if (link.getHyperlinkReference() != null)
{
href = link.getHyperlinkReference();
}
break;
}
case LOCAL_ANCHOR :
{
if (link.getHyperlinkAnchor() != null)
{
href = link.getHyperlinkAnchor().replaceAll("\\W", "");
}
break;
}
case LOCAL_PAGE :
{
if (link.getHyperlinkPage() != null)
{
href = JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + link.getHyperlinkPage().toString();
}
break;
}
case REMOTE_ANCHOR :
{
if (
link.getHyperlinkReference() != null &&
link.getHyperlinkAnchor() != null
)
{
href = link.getHyperlinkReference() + "#" + link.getHyperlinkAnchor();
}
break;
}
case REMOTE_PAGE :
{
if (
link.getHyperlinkReference() != null &&
link.getHyperlinkPage() != null
)
{
href = link.getHyperlinkReference() + "#" + JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + link.getHyperlinkPage().toString();
}
break;
}
case NONE :
default :
{
break;
}
}
}
else
{
href = customHandler.getHyperlink(link);
}
}
return href;
}
示例6: getDefaults
import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
public static void getDefaults(IPreferenceStore store) {
store.setDefault(DocxReportConfiguration.PROPERTY_FRAMES_AS_NESTED_TABLES,
PropertiesHelper.DPROP.getProperty(DocxReportConfiguration.PROPERTY_FRAMES_AS_NESTED_TABLES));
store.setDefault(DocxReportConfiguration.PROPERTY_FLEXIBLE_ROW_HEIGHT,
PropertiesHelper.DPROP.getProperty(DocxReportConfiguration.PROPERTY_FLEXIBLE_ROW_HEIGHT));
}