本文整理了Java中org.eclipse.swt.widgets.Canvas.getAdapter()
方法的一些代码示例,展示了Canvas.getAdapter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.getAdapter()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Canvas
类名称:Canvas
方法名:getAdapter
暂无
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
@SuppressWarnings( "unchecked" )
public <T> T getAdapter( Class<T> adapter ) {
if( adapter == WidgetLCA.class ) {
return ( T )CLabelLCA.INSTANCE;
}
return super.getAdapter( adapter );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
@SuppressWarnings("unchecked")
public <T> T getAdapter( Class<T> adapter ) {
if( adapter == IFileUploadAdapter.class ) {
return ( T )fileUploadAdapter;
}
if( adapter == WidgetLCA.class ) {
return ( T )FileUploadLCA.INSTANCE;
}
return super.getAdapter( adapter );
}
代码示例来源:origin: com.eclipsesource.tabris/tabris
@SuppressWarnings({ "unchecked", "deprecation" })
@Override
public <T> T getAdapter( Class<T> adapter ) {
T result = super.getAdapter( adapter );
if( adapter == DrawingsCache.class ) {
result = ( T )cache;
} else if( adapter == WidgetLifeCycleAdapter.class || adapter == org.eclipse.rap.rwt.lifecycle.WidgetLifeCycleAdapter.class ) {
return ( T )CLIENT_CANVAS_LCA;
} else if( adapter == List.class ) {
return ( T )drawListeners;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
@SuppressWarnings("unchecked")
public <T> T getAdapter( Class<T> adapter ) {
if( adapter == MenuHolder.class ) {
if( menuHolder == null ) {
menuHolder = new MenuHolder();
}
return ( T )menuHolder;
}
return super.getAdapter( adapter );
}
代码示例来源:origin: com.eclipsesource.tabris/tabris
@Override
public void run() {
DrawingsCache cache = control.getAdapter( DrawingsCache.class );
JsonValue drawings = properties.get( DRAWINGS_PROPERTY );
if( drawings != null ) {
cache.cache( drawings.asString() );
cache.clearRemoved();
fireDrawEvent( ( ClientCanvas )control );
}
}
} );
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void writeGCOperations( final Canvas canvas )
throws IOException
{
IGCAdapter adapter = ( IGCAdapter )canvas.getAdapter( IGCAdapter.class );
GCOperation[] operations = adapter.getTrimmedGCOperations();
if( operations.length > 0 || adapter.getForceRedraw() ) {
GCOperationWriter operationWriter = new GCOperationWriter( canvas );
operationWriter.initialize();
for( int i = 0; i < operations.length; i++ ) {
operationWriter.write( operations[ i ] );
}
}
adapter.clearGCOperations();
adapter.setForceRedraw( false );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private static void writeGCOperations( Canvas canvas ) {
GCAdapter adapter = canvas.getAdapter( GCAdapter.class );
GCOperation[] operations = adapter.getTrimmedGCOperations();
if( operations.length > 0 || adapter.getForceRedraw() ) {
GCOperationWriter operationWriter = new GCOperationWriter( canvas );
operationWriter.initialize();
for( int i = 0; i < operations.length; i++ ) {
operationWriter.write( operations[ i ] );
}
operationWriter.render();
}
adapter.clearGCOperations();
adapter.setForceRedraw( false );
}
内容来源于网络,如有侵权,请联系作者删除!