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


Java JRPrintPage.getElements方法代码示例

本文整理汇总了Java中net.sf.jasperreports.engine.JRPrintPage.getElements方法的典型用法代码示例。如果您正苦于以下问题:Java JRPrintPage.getElements方法的具体用法?Java JRPrintPage.getElements怎么用?Java JRPrintPage.getElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.jasperreports.engine.JRPrintPage的用法示例。


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

示例1: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
protected void exportPage(JRPrintPage page) throws IOException
{
	Collection<JRPrintElement> elements = page.getElements();
	Boolean exportReportComponentsOnly = getCurrentConfiguration().isReportComponentsExportOnly();

	if (exportReportComponentsOnly == null)
	{
		exportReportComponentsOnly = false;
	}

	if (!exportReportComponentsOnly)
	{
		exportElements(elements);
		exportWebFonts();
		exportHyperlinks();
	}

	exportBookmarks();
	exportParts();

	JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JsonExporter.java

示例2: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
/**
 *
 */
protected void exportPage(JRPrintPage page) throws JRException, DocumentException, IOException
{
	tagHelper.startPage();
	
	Collection<JRPrintElement> elements = page.getElements();
	exportElements(elements);
	
	tagHelper.endPage();

	JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:JRPdfExporter.java

示例3: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的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.engine.JRPrintPage; //导入方法依赖的package包/类
protected void exportPage(JRPrintPage page) throws IOException
{
	Collection<JRPrintElement> elements = page.getElements();

	exportElements(elements);

	JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:13,代码来源:JsonMetadataExporter.java

示例5: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
protected void exportPage(JRPrintPage page) throws IOException
{
	Tabulator tabulator = new Tabulator(tableFilter, page.getElements());
	tabulator.tabulate();

	HtmlReportConfiguration configuration = getCurrentItemConfiguration(); 
	
	boolean isIgnorePageMargins = configuration.isIgnorePageMargins();
	if (!isIgnorePageMargins)
	{
		PrintPageFormat pageFormat = jasperPrint.getPageFormat(pageIndex);
		tabulator.addMargins(pageFormat.getPageWidth(), pageFormat.getPageHeight());
	}
	
	Table table = tabulator.getTable();
	
	boolean isWhitePageBackground = configuration.isWhitePageBackground();
	if (isWhitePageBackground)
	{
		setBackcolor(Color.white);
	}
	
	CellElementVisitor elementVisitor = new CellElementVisitor();
	TableVisitor tableVisitor = new TableVisitor(tabulator, elementVisitor);
	
	exportTable(tableVisitor, table, isWhitePageBackground, true);
	
	if (isWhitePageBackground)
	{
		restoreBackcolor();
	}
	
	JRExportProgressMonitor progressMonitor = configuration.getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:39,代码来源:HtmlExporter.java

示例6: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的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

示例7: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
@Override
protected void exportPage(JRPrintPage page) throws IOException
{
	List<JRPrintElement> elements = page.getElements();
	Map<String, String> currentRow = new HashMap<String, String>();
	Map<String, String> repeatedValues = new HashMap<String, String>();
	CsvMetadataReportConfiguration configuration = getCurrentItemConfiguration(); 
	boolean hasDefinedColumns = columnNames != null; // if columns where passed in as property
	
	exportElements(elements, configuration, currentRow, repeatedValues, hasDefinedColumns);
	

	// write last row
	if (columnNames != null && columnNames.size() > 0)
	{
		// write header if it was not yet written
		if (isFirstRow && configuration.isWriteHeader())
		{
			writeReportHeader();
		}
		writeCurrentRow(currentRow, repeatedValues);
	}

	JRExportProgressMonitor progressMonitor  = configuration.getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:30,代码来源:JRCsvMetadataExporter.java

示例8: exportPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
/**
 * Exports a page to the output writer. Only text elements within the page are considered. For each page, the engine
 * creates a matrix of characters and each rendered text element is placed at the appropriate position in the matrix.
 * After all texts are parsed, the character matrix is sent to the output writer.
 */
protected void exportPage(JRPrintPage page) throws IOException
{
	List<JRPrintElement> elements = page.getElements();

	pageData = new char[pageHeightInChars][];
	for (int i = 0; i < pageHeightInChars; i++) {
		pageData[i] = new char[pageWidthInChars];
		Arrays.fill(pageData[i], ' ');
	}

	exportElements(elements);

	for (int i = 0; i < pageHeightInChars; i++) 
	{
		int lineLength = pageWidthInChars;
		if (isTrimLineRight)
		{
			int j = pageWidthInChars - 1;
			while (j >= 0 && pageData[i][j] == ' ')
			{
				j--;
			}
			lineLength = j + 1;
		}

		writer.write(pageData[i], 0, lineLength);
		writer.write(lineSeparator);
	}

	writer.write(pageSeparator);

	JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
	if (progressMonitor != null)
	{
		progressMonitor.afterPageExport();
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:43,代码来源:JRTextExporter.java

示例9: indexPage

import net.sf.jasperreports.engine.JRPrintPage; //导入方法依赖的package包/类
protected void indexPage(JRPrintPage page, int pageNo) throws IOException {
	List<JRPrintElement> elements = page.getElements();
	if (page.getElements().size() > 0) {
		indexElements(pageNo, elements);
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:7,代码来源:LuceneUtil.java


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