Java Code Examples for org.eclipse.swt.graphics.Resource#isDisposed()
The following examples show how to use
org.eclipse.swt.graphics.Resource#isDisposed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestProgressBar.java From n4js with Eclipse Public License 1.0 | 5 votes |
private void dispose(final Resource... rs) { for (final Resource r : rs) { if (null != r && !r.isDisposed()) { r.dispose(); } } }
Example 2
Source File: SWTGraphicUtil.java From nebula with Eclipse Public License 2.0 | 4 votes |
/** * Dispose safely any SWT resource * * @param resource the resource to dispose */ public static void safeDispose(final Resource resource) { if (resource != null && !resource.isDisposed()) { resource.dispose(); } }
Example 3
Source File: UiUtils.java From xds-ide with Eclipse Public License 1.0 | 4 votes |
public static void dispose(Resource r) { if (null != r && !r.isDisposed()) { r.dispose(); } }
Example 4
Source File: SwtUtils.java From xds-ide with Eclipse Public License 1.0 | 4 votes |
public static void dispose(Resource r) { if (null != r && !r.isDisposed()) { r.dispose(); } }
Example 5
Source File: UIUtils.java From n4js with Eclipse Public License 1.0 | 2 votes |
/** * 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(); } }