当前位置: 首页>>代码示例>>Java>>正文


Java DocxReportConfiguration类代码示例

本文整理汇总了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());
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JRDocxExporter.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:15,代码来源:JRDocxExporterNature.java

示例3: getItemConfigurationInterface

import net.sf.jasperreports.export.DocxReportConfiguration; //导入依赖的package包/类
@Override
protected Class<DocxReportConfiguration> getItemConfigurationInterface()
{
	return DocxReportConfiguration.class;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:6,代码来源:JRDocxExporter.java

示例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();
	}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:72,代码来源:JRDocxExporter.java

示例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;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:79,代码来源:JRDocxExporter.java

示例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));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:DOCXExporterPreferencePage.java


注:本文中的net.sf.jasperreports.export.DocxReportConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。