Java Code Examples for org.eclipse.swt.graphics.Resource#dispose()
The following examples show how to use
org.eclipse.swt.graphics.Resource#dispose() .
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: SWTGraphics2D.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 2
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 3
Source File: SWTGraphics2D.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 4
Source File: SWTGraphics2D.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 5
Source File: SWTGraphics2D.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 6
Source File: SWTGraphics2D.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 7
Source File: SWTGraphics2D.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 8
Source File: SWTGraphics2D.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Dispose the resource pool. */ private void disposeResourcePool() { for (Iterator it = this.resourcePool.iterator(); it.hasNext();) { Resource resource = (Resource) it.next(); resource.dispose(); } this.fontsPool.clear(); this.colorsPool.clear(); this.transformsPool.clear(); this.resourcePool.clear(); }
Example 9
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 10
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 11
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 12
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(); } }