本文整理匯總了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( );
}
}
示例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);
}
}
示例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( );
}
}