• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IRenderOption类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.birt.report.engine.api.IRenderOption的典型用法代码示例。如果您正苦于以下问题:Java IRenderOption类的具体用法?Java IRenderOption怎么用?Java IRenderOption使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IRenderOption类属于org.eclipse.birt.report.engine.api包,在下文中一共展示了IRenderOption类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public IRenderOption getPreferredRenderOption( )
{
	EXCELRenderOption renderOption = new EXCELRenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "xls" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption( optionValue.getName( ),
				                        optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:22,代码来源:ExcelEmitterDescriptor.java


示例2: renderPDFReport

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public void renderPDFReport(String reportName,
		Map<String, Object> parameters, OutputStream out)
		throws BirtReportException {
	try {
		IRunAndRenderTask runAndRenderTask = createRunAndRenderTask(
				reportName);

		injectParameters(parameters, runAndRenderTask);

		PDFRenderOption pdfOptions = new PDFRenderOption();
		pdfOptions.setOutputFormat(IRenderOption.OUTPUT_FORMAT_PDF);
		pdfOptions.setOutputStream(out);
		pdfOptions.setEmbededFont(true); // TODO idueppe - should be
		// configurable from cockpit
		pdfOptions.setImageHandler(new HTMLServerImageHandler());

		runAndRenderTask(runAndRenderTask, pdfOptions);

	} catch (EngineException | IOException e) {
		throw new RenderReportException("pdf", reportName, e);
	}
}
 
开发者ID:interseroh,项目名称:report-cockpit-birt-web,代码行数:24,代码来源:BirtReportServiceBean.java


示例3: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public IRenderOption getPreferredRenderOption( )
{
	EXCELRenderOption renderOption = new EXCELRenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "ods" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:OdsEmitterDescriptor.java


示例4: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "postscript" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:PostscriptEmitterDescriptor.java


示例5: retrieveRtLFlag

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
/**
 * Figures out the RTL rendering option.
 *
 * @param htmlOption
 * @author bidi_hcg
 */
private void retrieveRtLFlag( )
{
	// If htmlOption has RTL_FLAG option set (likely adopted from an URL
	// parameter), honor this option, otherwise obtain direction from
	// the report design.
	HTMLRenderOption htmlOption = new HTMLRenderOption( renderOption );
	Object bidiFlag = htmlOption.getOption( IRenderOption.RTL_FLAG );
	if ( Boolean.TRUE.equals( bidiFlag ) )
	{
		htmlRtLFlag = true;
	}
	else if ( bidiFlag == null && report != null)
	{
		ReportDesignHandle handle = report.getDesign( ).getReportDesign( );
		if ( handle != null )
		{
			htmlRtLFlag = handle.isDirectionRTL( );
			htmlOption.setHtmlRtLFlag( htmlRtLFlag ); // not necessary though
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:28,代码来源:HTMLReportEmitter.java


示例6: start

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public void start( IReportContent report ) throws BirtException
{
	super.start( report );
	Object dpi = report
	.getReportContext( ).getRenderOption( ).getOption(
			IRenderOption.RENDER_DPI );
	int renderDpi =0;
	if ( dpi != null && dpi instanceof Integer )
	{
		renderDpi = ( (Integer) dpi ).intValue( );
	}
	int reportDpi = PropertyUtil.getRenderDpi( report, renderDpi );
	context.setReportDpi( reportDpi );
	this.reportContent = report;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:AbstractOdfEmitter.java


示例7: parsePageSize

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
private void parsePageSize( IReportContent report )
{
	Object dpi = report.getReportContext( ).getRenderOption( ).getOption(
			IRenderOption.RENDER_DPI );
	int renderDpi = 0;
	if ( dpi != null && dpi instanceof Integer )
	{
		renderDpi = ( (Integer) dpi ).intValue( );
	}
	reportDpi = PropertyUtil.getRenderDpi( report, renderDpi );
	SimpleMasterPageDesign masterPage = (SimpleMasterPageDesign) report
			.getDesign( ).getPageSetup( ).getMasterPage( 0 );
	this.pageWidth = OdfUtil.convertDimensionType( masterPage
			.getPageWidth( ), 0, reportDpi );
	int leftmargin = OdfUtil.convertDimensionType( masterPage
			.getLeftMargin( ), pageWidth, reportDpi );
	int rightmargin = OdfUtil.convertDimensionType( masterPage
			.getRightMargin( ), pageWidth, reportDpi );
	this.contentwidth = pageWidth - leftmargin - rightmargin;
	this.pageHeight = OdfUtil.convertDimensionType( masterPage
			.getPageHeight( ), 0, reportDpi );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:OdsEmitter.java


示例8: setupRenderOptions

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
private void setupRenderOptions()
{
	IRenderOption renderOptions = service.getRenderOption( );
	Object textWrapping = renderOptions.getOption(IExcelRenderOption.WRAPPING_TEXT);
	if(textWrapping!=null && textWrapping instanceof Boolean)
	{
		context.setWrappingText((Boolean)textWrapping);
	}
	else
	{
		context.setWrappingText( ( Boolean )true);
	}
	
	Object hideGridlines = renderOptions
			.getOption( IExcelRenderOption.HIDE_GRIDLINES );
	if ( hideGridlines != null && hideGridlines instanceof Boolean )
	{
		context.setHideGridlines( (Boolean) hideGridlines );
	}
	else
	{
		context.setHideGridlines( (Boolean) false );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:25,代码来源:OdsEmitter.java


示例9: getResourceRenderURL

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public String getResourceRenderURL( String resourceName )
{
	IRenderOption option = context.getRenderOption( );
	if ( option != null )
	{
		IHTMLImageHandler imageHandler = option.getImageHandler( );
		if ( imageHandler != null )
		{
			URL resourceUrl = context.getResource( resourceName );
			if ( resourceUrl != null )
			{
				Image image = new Image( resourceUrl.toExternalForm( ) );
				if ( image.getSource( ) == Image.FILE_IMAGE )
				{
					return imageHandler.onFileImage( image, this );
				}
				return imageHandler.onURLImage( image, this );
			}
		}
	}
	return resourceName;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:ReportContextImpl.java


示例10: getOutputFormat

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public String getOutputFormat( )
{
	String outputFormat = null;
	if ( renderOption != null )
	{
		outputFormat = renderOption.getOutputFormat( );
	}
	if ( outputFormat == null )
	{
		if ( isFixedLayout( ) )
		{
			outputFormat = IRenderOption.OUTPUT_FORMAT_PDF;
		}
		else
		{
			outputFormat = IRenderOption.OUTPUT_FORMAT_HTML;
		}
	}
	return outputFormat;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:ExecutionContext.java


示例11: PDFLayoutEmitterProxy

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public PDFLayoutEmitterProxy( IReportExecutor executor,
		IContentEmitter emitter, IRenderOption renderOptions,
		Locale locale, long totalPage )
{
	this.executor = executor;
	this.outputEmitter = emitter;

	context = new LayoutEngineContext( );
	setupLayoutOptions( renderOptions );
	if ( renderOptions != null )
	{
		String format = renderOptions.getOutputFormat( );
		context.setFormat( format );
	}
	context.setLocale( locale );
	context.totalPage = totalPage;
	createLayoutEmitterImpl( context );
	context.setEmitter( layoutEmitterImpl );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:20,代码来源:PDFLayoutEmitterProxy.java


示例12: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	PDFRenderOption renderOption = new PDFRenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "odp" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:ODPEmitterDescriptor.java


示例13: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "docx" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:DocxEmitterDescriptor.java


示例14: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	PDFRenderOption renderOption = new PDFRenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "pptx" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:PPTXEmitterDescriptor.java


示例15: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "odt" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:OdtEmitterDescriptor.java


示例16: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	PDFRenderOption renderOption = new PDFRenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "ppt" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:PPTEmitterDescriptor.java


示例17: doRenderAll

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
void doRenderAll( ) throws Exception
{
	IReportDocument document = engine.openReportDocument( REPORT_DOCUMENT );
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	IRenderTask renderTask = engine.createRenderTask( document );
	renderTask.getReportRunnable( ).setDesignHandle( reportHandle );
	IRenderOption option = new HTMLRenderOption( );
	option.setOutputFormat( HTMLRenderOption.OUTPUT_FORMAT_HTML );
	option.setOutputStream( out );
	renderTask.setRenderOption( option );
	renderTask.render( );
	assertTrue( renderTask.getErrors( ).isEmpty( ) );
	renderTask.close( );
	String pageContent = out.toString( "UTF-8" );
	assertTrue( pageContent.indexOf( "reportlet_table" ) != -1 );
	assertTrue( pageContent.indexOf( "SECOND-PAGE" ) != -1 );
	document.close( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:DocumentIRTransferTest.java


示例18: doRenderAll

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
void doRenderAll( ) throws Exception
{
	IReportDocument document = engine.openReportDocument( REPORT_DOCUMENT );
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	IRenderTask renderTask = engine.createRenderTask( document );
	IRenderOption option = new HTMLRenderOption( );
	option.setOutputFormat( HTMLRenderOption.OUTPUT_FORMAT_HTML );
	option.setOutputStream( out );
	renderTask.setRenderOption( option );
	renderTask.render( );
	assertTrue( renderTask.getErrors( ).isEmpty( ) );
	renderTask.close( );
	String pageContent = out.toString( "UTF-8" );
	assertTrue( pageContent.indexOf( "reportlet_table" ) != -1 );
	assertTrue( pageContent.indexOf( "SECOND-PAGE" ) != -1 );
	document.close( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:ReportDocumentTest.java


示例19: test90378

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
public void test90378( ) throws Exception
{
	ByteArrayOutputStream out = new ByteArrayOutputStream( );
	IRenderOption option = new HTMLRenderOption( );
	option.setOutputFormat( "html" );
	option.setOutputStream( out );
	render( "org/eclipse/birt/report/engine/regression/90378.rptdesign",
			option );
	String report = out.toString( );

	Pattern pattern = Pattern.compile( "<div>b1</div>" );
	Matcher matcher = pattern.matcher( report );
	int matches = 0;
	while ( matcher.find( ) )
	{
		matches++;
	}
	assertEquals( 2, matches );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:20,代码来源:Test_90378.java


示例20: getPreferredRenderOption

import org.eclipse.birt.report.engine.api.IRenderOption; //导入依赖的package包/类
@Override
public IRenderOption getPreferredRenderOption( )
{
	RenderOption renderOption = new RenderOption( );

	renderOption.setEmitterID( getID( ) );
	renderOption.setOutputFormat( "doc" ); //$NON-NLS-1$

	if ( values != null && values.length > 0 )
	{
		for ( IOptionValue optionValue : values )
		{
			if ( optionValue != null )
			{
				renderOption.setOption(
						getRenderOptionName( optionValue.getName( ) ),
						optionValue.getValue( ) );
			}
		}
	}

	return renderOption;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:WordEmitterDescriptor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java P类代码示例发布时间:2022-05-22
下一篇:
Java DigestAuthenticator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap