当前位置: 首页>>代码示例>>Java>>正文


Java Resource.dispose方法代码示例

本文整理汇总了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();
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:17,代码来源:TextPropertiesViewPart.java

示例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;
}
 
开发者ID:chgeo,项目名称:show-shortcuts,代码行数:19,代码来源:ShortcutPopup.java

示例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();
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:TestProgressBar.java

示例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();
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:SWTGraphics2D.java

示例5: disposeAll

import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void disposeAll() {
    for (Resource resource : list) {
        if (!resource.isDisposed()) {
            resource.dispose();
        }
    }
    list.clear();
}
 
开发者ID:kamil-karkus,项目名称:EasySnap,代码行数:9,代码来源:ResourceManager.java

示例6: widgetDisposed

import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
public void widgetDisposed(DisposeEvent e) {
	for(Resource rs: m_resources) {
		if(!rs.isDisposed()) {
			rs.dispose();
		}
	}
}
 
开发者ID:Kenishi,项目名称:DroidNavi,代码行数:8,代码来源:EventWindow.java

示例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();
}
 
开发者ID:Totallicks,项目名称:totallicks-tuxguitar,代码行数:9,代码来源:TGResources.java

示例9: dispose

import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
protected void dispose(Resource resource){
	if(resource != null){
		resource.dispose();
	}
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:6,代码来源:TGMatrixConfig.java

示例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();
    }
}
 
开发者ID:prasser,项目名称:swtrangeslider,代码行数:11,代码来源:RangeSlider.java

示例11: disposeResource

import org.eclipse.swt.graphics.Resource; //导入方法依赖的package包/类
private void disposeResource(final Resource resource) {
	if ((resource != null) && !resource.isDisposed()) {
		resource.dispose();
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:6,代码来源:Map.java

示例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;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:7,代码来源:Util.java

示例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();
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:13,代码来源:UIUtils.java


注:本文中的org.eclipse.swt.graphics.Resource.dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。