本文整理汇总了Java中net.sf.jasperreports.export.ReportExportConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java ReportExportConfiguration类的具体用法?Java ReportExportConfiguration怎么用?Java ReportExportConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReportExportConfiguration类属于net.sf.jasperreports.export包,在下文中一共展示了ReportExportConfiguration类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaults
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
public static void getDefaults(IPreferenceStore store) {
store.setDefault(WriterExporterOutput.PROPERTY_CHARACTER_ENCODING,
Misc.nvl(PropertiesHelper.DPROP.getProperty(WriterExporterOutput.PROPERTY_CHARACTER_ENCODING), "UTF-8")); //$NON-NLS-1$
store.setDefault(ReportExportConfiguration.PROPERTY_IGNORE_PAGE_MARGINS,
PropertiesHelper.DPROP.getBooleanProperty(ReportExportConfiguration.PROPERTY_IGNORE_PAGE_MARGINS));
store.setDefault(CommonExportConfiguration.PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS,
PropertiesHelper.DPROP
.getBooleanProperty(CommonExportConfiguration.PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS));
store.setDefault(NSF_EXPORT_LEGACY_BORDER_OFFSET,
Misc.nvl(PropertiesHelper.DPROP.getProperty(NSF_EXPORT_LEGACY_BORDER_OFFSET), "DEFAULT")); //$NON-NLS-1$
store.setDefault(EXPPARAM_OFFSET_X, 0);
store.setDefault(EXPPARAM_OFFSET_Y, 0);
store.setDefault(COM_JASPERSOFT_STUDIO_EXPORTER_SHOW_EXCELAPI, false);
store.setDefault(COM_JASPERSOFT_STUDIO_EXPORTER_SHOW_EXCELAPI_METADATA, false);
store.setDefault(COM_JASPERSOFT_STUDIO_EXPORTER_SHOW_XHTML, false);
store.setDefault(EXPPARAM_INDEX_PAGE, "all"); //$NON-NLS-1$
}
示例2: setOffset
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
protected void setOffset(boolean setElementOffsets)
{
if (setElementOffsets)
{
ReportExportConfiguration configuration = getCurrentItemConfiguration();
Integer offsetX = configuration.getOffsetX();
if (offsetX != null)
{
elementOffsetX = offsetX.intValue();
}
else
{
elementOffsetX = 0;
}
Integer offsetY = configuration.getOffsetY();
if (offsetY != null)
{
elementOffsetY = offsetY.intValue();
}
else
{
elementOffsetY = 0;
}
}
}
示例3: exportPage
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
protected void exportPage(JRPrintPage page) throws JRException, IOException
{
startPage = true;
ReportExportConfiguration configuration = getCurrentItemConfiguration();
PrintPageFormat pageFormat = jasperPrint.getPageFormat(pageIndex);
JRGridLayout layout =
new JRGridLayout(
nature,
page.getElements(),
pageFormat.getPageWidth(),
pageFormat.getPageHeight(),
configuration.getOffsetX() == null ? 0 : configuration.getOffsetX(),
configuration.getOffsetY() == null ? 0 : configuration.getOffsetY(),
null //address
);
exportGrid(layout, null);
JRExportProgressMonitor progressMonitor = configuration.getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
示例4: exportPage
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
protected void exportPage(JRPrintPage page) throws JRException
{
startPage = true;
pageAnchor = JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + (pageIndex + 1);
ReportExportConfiguration configuration = getCurrentItemConfiguration();
pageGridLayout =
new JRGridLayout(
nature,
page.getElements(),
pageFormat.getPageWidth(),
pageFormat.getPageHeight(),
configuration.getOffsetX() == null ? 0 : configuration.getOffsetX(),
configuration.getOffsetY() == null ? 0 : configuration.getOffsetY(),
null //address
);
exportGrid(pageGridLayout, null);
JRExportProgressMonitor progressMonitor = configuration.getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
示例5: getPageRange
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
protected PageRange getPageRange()
{
Integer startPageIndex = null;
Integer endPageIndex = null;
int lastPageIndex = -1;
if (jasperPrint.getPages() != null)
{
lastPageIndex = jasperPrint.getPages().size() - 1;
}
ReportExportConfiguration configuration = getCurrentItemConfiguration();
Integer start = configuration.getStartPageIndex();
if (start != null)
{
startPageIndex = start;
if (startPageIndex < 0 || startPageIndex > lastPageIndex)
{
throw
new JRRuntimeException(
EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE,
new Object[]{startPageIndex, lastPageIndex}
);
}
}
Integer end = configuration.getEndPageIndex();
if (end != null)
{
endPageIndex = end;
int startPage = startPageIndex == null ? 0 : startPageIndex;
if (endPageIndex < startPage || endPageIndex > lastPageIndex)
{
throw
new JRRuntimeException(
EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE,
new Object[]{startPage, endPageIndex, lastPageIndex}
);
}
}
Integer pageIndex = configuration.getPageIndex();
if (pageIndex != null)
{
if (pageIndex < 0 || pageIndex > lastPageIndex)
{
throw
new JRRuntimeException(
EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE,
new Object[]{pageIndex, lastPageIndex}
);
}
startPageIndex = pageIndex;
endPageIndex = pageIndex;
}
PageRange pageRange = null;
if (startPageIndex != null || endPageIndex != null)
{
pageRange = new PageRange(startPageIndex, endPageIndex);
}
return pageRange;
}
示例6: exportReportToGraphics2D
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
public void exportReportToGraphics2D(Graphics2D grx) throws JRException
{
grx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
//grx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
grx.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
grx.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
setCurrentExporterInputItem(exporterInput.getItems().get(0));
ReportExportConfiguration configuration = getCurrentItemConfiguration();
AffineTransform atrans = new AffineTransform();
atrans.translate(
configuration.getOffsetX() == null ? 0 : configuration.getOffsetX(),
configuration.getOffsetY() == null ? 0 : configuration.getOffsetY()
);
float zoom = getZoom();
atrans.scale(zoom, zoom);
grx.transform(atrans);
List<JRPrintPage> pages = jasperPrint.getPages();
if (pages != null)
{
PageRange pageRange = getPageRange();
int startPageIndex = (pageRange == null || pageRange.getStartPageIndex() == null) ? 0 : pageRange.getStartPageIndex();
Shape oldClipShape = grx.getClip();
PrintPageFormat pageFormat = jasperPrint.getPageFormat(startPageIndex);
grx.clip(new Rectangle(0, 0, pageFormat.getPageWidth(), pageFormat.getPageHeight()));
try
{
exportPage(grx, startPageIndex);
}
finally
{
grx.setClip(oldClipShape);
}
}
}
示例7: getItemConfigurationInterface
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
@Override
protected Class<ReportExportConfiguration> getItemConfigurationInterface()
{
return ReportExportConfiguration.class;
}
示例8: hasGlobalSheetNames
import net.sf.jasperreports.export.ReportExportConfiguration; //导入依赖的package包/类
/**
*
*/
protected boolean hasGlobalSheetNames()//FIXMEEXPORT check sheet names
{
Boolean globalSheetNames = null;
boolean isOverrideHintsDefault =
propertiesUtil.getBooleanProperty(
ReportExportConfiguration.PROPERTY_EXPORT_CONFIGURATION_OVERRIDE_REPORT_HINTS
);
if (
itemConfiguration != null
&& itemConfiguration.getSheetNames() != null
)
{
boolean isExporterConfigOverrideHints =
itemConfiguration.isOverrideHints() == null
? isOverrideHintsDefault
: itemConfiguration.isOverrideHints();
if (isExporterConfigOverrideHints)
{
globalSheetNames = true;
}
}
if (globalSheetNames == null)
{
XlsReportConfiguration lcItemConfiguration = (XlsReportConfiguration)crtItem.getConfiguration();
if (
lcItemConfiguration != null
&& lcItemConfiguration.getSheetNames() != null
)
{
boolean isItemConfigOverrideHints =
lcItemConfiguration.isOverrideHints() == null
? isOverrideHintsDefault :
lcItemConfiguration.isOverrideHints();
if (isItemConfigOverrideHints)
{
globalSheetNames = false;
}
}
}
if (globalSheetNames == null)
{
List<PropertySuffix> properties =
JRPropertiesUtil.getProperties(
getCurrentJasperPrint(),
XlsReportConfiguration.PROPERTY_SHEET_NAMES_PREFIX
);
globalSheetNames = properties == null || properties.isEmpty();
}
return globalSheetNames;
}