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


Java ReportExportConfiguration类代码示例

本文整理汇总了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$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:JRExporterPreferencePage.java

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

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

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

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

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

示例7: getItemConfigurationInterface

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

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


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