本文整理汇总了Java中org.eclipse.swt.graphics.Resource.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java Resource.dispose方法的具体用法?Java Resource.dispose怎么用?Java Resource.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.graphics.Resource
的用法示例。
在下文中一共展示了Resource.dispose方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
@Override
public void dispose() {
if (this.selectionListener!=null) {
this.selectionListener.dispose();
}
final Procedure1<Resource> _function = new Procedure1<Resource>() {
@Override
public void apply(final Resource it) {
it.dispose();
}
};
IterableExtensions.<Resource>forEach(this.swtResources, _function);
this.swtResources.clear();
this.executorService.shutdown();
super.dispose();
}
示例2: close
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
@Override
public boolean close() {
// If already closed, there is nothing to do.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=127505
Shell shell = getShell();
if (shell != null && !shell.isDisposed()) {
saveDialogBounds(shell);
}
boolean closed = super.close();
for (Resource resource : this.resources) {
resource.dispose();
}
this.resources.clear();
return closed;
}
示例3: 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();
}
}
}
示例4: disposeResourcePool
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
/**
* 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();
}
示例5: disposeAll
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void disposeAll() {
for (Resource resource : list) {
if (!resource.isDisposed()) {
resource.dispose();
}
}
list.clear();
}
示例6: widgetDisposed
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void widgetDisposed(DisposeEvent e) {
for(Resource rs: m_resources) {
if(!rs.isDisposed()) {
rs.dispose();
}
}
}
示例7: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
private void dispose(final Resource... resources) {
for (final Resource r : resources) {
if (r != null) {
r.dispose();
}
}
}
开发者ID:info-sharing-environment,项目名称:NIEM-Modeling-Tool,代码行数:8,代码来源:ReferenceLibraryClassifierNameDialog.java
示例8: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void dispose(){
Iterator it = this.resources.iterator();
while( it.hasNext() ){
Resource resource = (Resource)it.next();
resource.dispose();
}
this.resources.clear();
}
示例9: dispose
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
protected void dispose(Resource resource){
if(resource != null){
resource.dispose();
}
}
示例10: 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();
}
}
示例11: disposeResource
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
private void disposeResource(final Resource resource) {
if ((resource != null) && !resource.isDisposed()) {
resource.dispose();
}
}
示例12: disposeResource
import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public static Resource disposeResource(final Resource resource) {
if (resource != null && !resource.isDisposed()) {
resource.dispose();
}
return null;
}
示例13: 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();
}
}