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


Java HtmlExporterConfiguration类代码示例

本文整理汇总了Java中net.sf.jasperreports.export.HtmlExporterConfiguration的典型用法代码示例。如果您正苦于以下问题:Java HtmlExporterConfiguration类的具体用法?Java HtmlExporterConfiguration怎么用?Java HtmlExporterConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HtmlExporterConfiguration类属于net.sf.jasperreports.export包,在下文中一共展示了HtmlExporterConfiguration类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createTabPageHB

import net.sf.jasperreports.export.HtmlExporterConfiguration; //导入依赖的package包/类
private void createTabPageHB(CTabFolder tabFolder) {
	CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
	ptab.setText(Messages.HTMLExporterPreferencePage_28);

	Composite sc = new Composite(tabFolder, SWT.NONE);
	sc.setLayout(new GridLayout());

	TextFieldEditor se = new TextFieldEditor(HtmlExporterConfiguration.PROPERTY_HTML_HEADER,
			Messages.HTMLExporterPreferencePage_29, sc);
	se.getTextControl(sc).setLayoutData(new GridData(GridData.FILL_BOTH));
	addField(se);

	TextFieldEditor scf = new TextFieldEditor(HtmlExporterConfiguration.PROPERTY_HTML_FOOTER,
			Messages.HTMLExporterPreferencePage_30, sc);
	scf.getTextControl(sc).setLayoutData(new GridData(GridData.FILL_BOTH));
	addField(scf);

	ptab.setControl(sc);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:HTMLExporterPreferencePage.java

示例2: getDefaults

import net.sf.jasperreports.export.HtmlExporterConfiguration; //导入依赖的package包/类
public static void getDefaults(IPreferenceStore store) {
	store.setDefault(HtmlReportConfiguration.PROPERTY_ACCESSIBLE,
			Misc.nvl(PropertiesHelper.DPROP.getProperty(HtmlReportConfiguration.PROPERTY_ACCESSIBLE), "false")); //$NON-NLS-1$
	store.setDefault(HtmlExporterConfiguration.PROPERTY_FLUSH_OUTPUT,
			PropertiesHelper.DPROP.getProperty(HtmlExporterConfiguration.PROPERTY_FLUSH_OUTPUT));

	store.setDefault(HtmlReportConfiguration.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Misc.nvl(
			PropertiesHelper.DPROP.getProperty(HtmlReportConfiguration.PROPERTY_REMOVE_EMPTY_SPACE_BETWEEN_ROWS), "false")); //$NON-NLS-1$
	store.setDefault(HtmlReportConfiguration.PROPERTY_SIZE_UNIT,
			PropertiesHelper.DPROP.getProperty(HtmlReportConfiguration.PROPERTY_SIZE_UNIT));

	store.setDefault(HtmlReportConfiguration.PROPERTY_WHITE_PAGE_BACKGROUND,
			PropertiesHelper.DPROP.getProperty(HtmlReportConfiguration.PROPERTY_WHITE_PAGE_BACKGROUND));
	store.setDefault(HtmlReportConfiguration.PROPERTY_WRAP_BREAK_WORD,
			PropertiesHelper.DPROP.getProperty(HtmlReportConfiguration.PROPERTY_WRAP_BREAK_WORD));

	store.setDefault(HtmlExporterConfiguration.PROPERTY_HTML_HEADER,
			Misc.nvl(PropertiesHelper.DPROP.getProperty(HtmlExporterConfiguration.PROPERTY_HTML_HEADER), "")); //$NON-NLS-1$
	store.setDefault(HtmlExporterConfiguration.PROPERTY_HTML_FOOTER,
			Misc.nvl(PropertiesHelper.DPROP.getProperty(HtmlExporterConfiguration.PROPERTY_HTML_FOOTER), "")); //$NON-NLS-1$
	store.setDefault(HtmlExporterConfiguration.PROPERTY_BETWEEN_PAGES_HTML,
			Misc.nvl(PropertiesHelper.DPROP.getProperty(HtmlExporterConfiguration.PROPERTY_BETWEEN_PAGES_HTML), "")); //$NON-NLS-1$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:HTMLExporterPreferencePage.java

示例3: createTabPageBP

import net.sf.jasperreports.export.HtmlExporterConfiguration; //导入依赖的package包/类
private void createTabPageBP(CTabFolder tabFolder) {
	CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
	ptab.setText(Messages.HTMLExporterPreferencePage_31);

	Composite sc = new Composite(tabFolder, SWT.NONE);
	sc.setLayout(new GridLayout());

	TextFieldEditor scf = new TextFieldEditor(HtmlExporterConfiguration.PROPERTY_BETWEEN_PAGES_HTML,
			Messages.HTMLExporterPreferencePage_32, sc);
	scf.getTextControl(sc).setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL));
	addField(scf);

	ptab.setControl(sc);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:15,代码来源:HTMLExporterPreferencePage.java

示例4: getConfigurationInterface

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

示例5: getHtmlFragment

import net.sf.jasperreports.export.HtmlExporterConfiguration; //导入依赖的package包/类
@Override
public String getHtmlFragment(JRHtmlExporterContext context, JRGenericPrintElement element)	{
	Boolean showLegend = (Boolean) element.getParameterValue(GeoMapPrintElement.PARAMETER_SHOW_LEGEND);
	GeoMapDataMode dataMode = (GeoMapDataMode) element.getParameterValue(GeoMapPrintElement.PARAMETER_DATA_MODE);
	String region = (String) element.getParameterValue(GeoMapPrintElement.PARAMETER_REGION);
	String valueLabel = (String) element.getParameterValue(GeoMapPrintElement.PARAMETER_VALUE_LABEL);
	if (valueLabel == null) {
		valueLabel = "";
	}
	@SuppressWarnings("unchecked")
	List<Color> colors = (List<Color>) element.getParameterValue(GeoMapPrintElement.PARAMETER_COLORS);
	String stringColors = null;
	if (colors != null && !colors.isEmpty()) {
		stringColors = "";
		for (Color color : colors) {
			stringColors += "," + getColorString(color);
		}
		stringColors = StringUtils.removeStart(stringColors, ",");
	}
	@SuppressWarnings("unchecked")
	Set<GeoMapData> dataset = (Set<GeoMapData>) element.getParameterValue(GeoMapPrintElement.PARAMETER_DATASET);

	VelocityContext velocityContext = new VelocityContext();
	velocityContext.put("showLegend", showLegend);
	if (dataMode != null) {
		switch (dataMode) {
		case REGIONS:
			velocityContext.put("dataMode", "regions");
			break;
		case MARKERS:
			velocityContext.put("dataMode", "markers");
			break;
		default:
			break;
		}
	}
	velocityContext.put("id", "map_" + element.hashCode());
	velocityContext.put("region", region);
	velocityContext.put("valueLabel", valueLabel);
	velocityContext.put("colors", stringColors);
	velocityContext.put("dataset", dataset);
   @SuppressWarnings("unchecked")
	Exporter<ExporterInput, ? extends HtmlReportConfiguration, ? extends HtmlExporterConfiguration, HtmlExporterOutput> exporter = context.getExporterRef();
   HtmlExporter htmlExporter2 = exporter instanceof HtmlExporter ? (HtmlExporter)exporter : null;
	if(htmlExporter2 == null) {
		velocityContext.put("xhtml", "xhtml");
		velocityContext.put("elementX", ((HtmlExporter)context.getExporterRef()).toSizeUnit((float) element.getX()));
		velocityContext.put("elementY", ((HtmlExporter)context.getExporterRef()).toSizeUnit((float) element.getY()));
	}
	else {
		velocityContext.put("elementX", ((HtmlExporter)context.getExporterRef()).toSizeUnit((float) element.getX()));
		velocityContext.put("elementY", ((HtmlExporter)context.getExporterRef()).toSizeUnit((float) element.getY()));
	}
	velocityContext.put("elementWidth", element.getWidth());
	velocityContext.put("elementHeight", element.getHeight());

	if (element.getModeValue() == ModeEnum.OPAQUE) {
		velocityContext.put("backgroundColor", JRColorUtil.getColorHexa(element.getBackcolor()));
	}
	return VelocityUtil.processTemplate(GEOMAP_ELEMENT_HTML_TEMPLATE, velocityContext);
}
 
开发者ID:svn2github,项目名称:dynamicreports-jasper,代码行数:62,代码来源:GeoMapElementHtmlHandler.java


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