本文整理汇总了Java中org.eclipse.swt.graphics.Resource.isDisposed方法的典型用法代码示例。如果您正苦于以下问题:Java Resource.isDisposed方法的具体用法?Java Resource.isDisposed怎么用?Java Resource.isDisposed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.graphics.Resource
的用法示例。
在下文中一共展示了Resource.isDisposed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
private void dispose(final Resource... rs) {
for (final Resource r : rs) {
if (null != r && !r.isDisposed()) {
r.dispose();
}
}
}
示例2: disposeAll
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void disposeAll() {
for (Resource resource : list) {
if (!resource.isDisposed()) {
resource.dispose();
}
}
list.clear();
}
示例3: widgetDisposed
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void widgetDisposed(DisposeEvent e) {
for(Resource rs: m_resources) {
if(!rs.isDisposed()) {
rs.dispose();
}
}
}
示例4: safeDispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
/**
* Dispose safely any SWT resource
*
* @param resource the resource to dispose
*/
private void safeDispose(final Resource resource) {
if (resource != null && !resource.isDisposed()) {
resource.dispose();
}
}
示例5: disposeResource
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
private void disposeResource(final Resource resource) {
if ((resource != null) && !resource.isDisposed()) {
resource.dispose();
}
}
示例6: disposeResource
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public static Resource disposeResource(final Resource resource) {
if (resource != null && !resource.isDisposed()) {
resource.dispose();
}
return null;
}
示例7: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
/**
* Disposes the resource argument. Has no effect if the resource argument is either {@code null} or already
* {@link Resource#isDisposed() disposed}.
*
* @param resource
* the resource to dispose. Optional, can be {@code null}.
*/
public static void dispose(final Resource resource) {
if (null != resource && !resource.isDisposed()) {
resource.dispose();
}
}