本文整理汇总了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);
}
示例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$
}
示例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);
}
示例4: getConfigurationInterface
import net.sf.jasperreports.export.HtmlExporterConfiguration; //导入依赖的package包/类
@Override
protected Class<HtmlExporterConfiguration> getConfigurationInterface()
{
return HtmlExporterConfiguration.class;
}
示例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);
}