當前位置: 首頁>>代碼示例>>Java>>正文


Java PaintEvent.getSource方法代碼示例

本文整理匯總了Java中org.eclipse.swt.events.PaintEvent.getSource方法的典型用法代碼示例。如果您正苦於以下問題:Java PaintEvent.getSource方法的具體用法?Java PaintEvent.getSource怎麽用?Java PaintEvent.getSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.events.PaintEvent的用法示例。


在下文中一共展示了PaintEvent.getSource方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: paintControl

import org.eclipse.swt.events.PaintEvent; //導入方法依賴的package包/類
public void paintControl( PaintEvent e )
{
	idr.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT, e.gc );
	Composite co = (Composite) e.getSource( );
	Rectangle re = co.getClientArea( );
	Bounds bo = BoundsImpl.create( 0, 0, re.width, re.height );
	bo.scale( 72d / idr.getDisplayServer( ).getDpiResolution( ) );
	
	Generator gr = Generator.instance( );
	try
	{
		gr.render( idr, gr.build( idr.getDisplayServer( ),
				cm,
				bo,
				null,
				null,
				StyleProcessor.instance( ) ) );
	}
	catch ( ChartException ce )
	{
		ce.printStackTrace( );
	}
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:24,代碼來源:StyleChartViewer.java

示例2: paintControl

import org.eclipse.swt.events.PaintEvent; //導入方法依賴的package包/類
public void paintControl(PaintEvent e) {
	Canvas can= (Canvas) e.getSource();
	Annotation a= ((Item) can.getData()).fAnnotation;
	if (a != null) {
		Rectangle rect= new Rectangle(fLayouter.getBorderWidth(), fLayouter.getBorderWidth(), fLayouter.getAnnotationSize(), fLayouter.getAnnotationSize());
		if (fAnnotationAccessExtension != null)
			fAnnotationAccessExtension.paint(a, e.gc, can, rect);
	}
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:10,代碼來源:AnnotationExpansionControl.java

示例3: paintControl

import org.eclipse.swt.events.PaintEvent; //導入方法依賴的package包/類
public void paintControl( PaintEvent e )
{
	idr.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT, e.gc );
	Composite co = (Composite) e.getSource( );
	Rectangle re = co.getClientArea( );
	Bounds bo = BoundsImpl.create( 0, 0, re.width, re.height );
	bo.scale( 72d / idr.getDisplayServer( ).getDpiResolution( ) );
	
	RunTimeContext context = new RunTimeContext( );
	context.setULocale( ULocale.getDefault( ) );
	
	String[] set = {
			"Items", "Amounts"};//$NON-NLS-1$ //$NON-NLS-2$
	Object[][] data = {
			{
					"A", "B", "C"//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
			}, {
					Integer.valueOf( 7 ), Integer.valueOf( 2 ), Integer.valueOf( 5 )
			}
	};
	dree = new SimpleDataRowExpressionEvaluator( set, data );
	Generator gr = Generator.instance( );
	try
	{
		gr.bindData( dree, cm, context );
		gr.render( idr, gr.build( idr.getDisplayServer( ),
				cm,
				bo,
				null,
				context,
				null ) );
	}
	catch ( ChartException ce )
	{
		ce.printStackTrace( );
	}
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:38,代碼來源:AutoDataBindingViewer.java


注:本文中的org.eclipse.swt.events.PaintEvent.getSource方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。