java类org.eclipse.swt.graphics.Resource的实例源码

TextPropertiesViewPart.java 文件源码 项目:xtext-gef 阅读 32 收藏 0 点赞 0 评论 0
@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();
}
ShortcutPopup.java 文件源码 项目:show-shortcuts 阅读 29 收藏 0 点赞 0 评论 0
@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;
}
SWTHelper.java 文件源码 项目:Mailster 阅读 31 收藏 0 点赞 0 评论 0
/**
 * Dispose all registered OS resources.
 */
public static void disposeAll()
{
    if (imageToDecoratorMap != null)
    {
        Iterator<HashMap<Image, Image>> baseImages = imageToDecoratorMap.values().iterator();
        while (baseImages.hasNext())
        {
            Iterator<Image> decorators = baseImages.next().values().iterator();
            while (decorators.hasNext())
                decorators.next().dispose();
        }
    }

    Iterator<Resource> it = resourceTracker.values().iterator();
    while (it.hasNext())
        it.next().dispose();
}
TestProgressBar.java 文件源码 项目:n4js 阅读 32 收藏 0 点赞 0 评论 0
private void dispose(final Resource... rs) {
    for (final Resource r : rs) {
        if (null != r && !r.isDisposed()) {
            r.dispose();
        }
    }
}
SWTGraphics2D.java 文件源码 项目:ccu-historian 阅读 29 收藏 0 点赞 0 评论 0
/**
 * 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();
}
SWTGraphics2D.java 文件源码 项目:aya-lang 阅读 26 收藏 0 点赞 0 评论 0
/**
 * 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();
}
TGMatrixConfig.java 文件源码 项目:TuxGuitar-1.3.1-fork 阅读 27 收藏 0 点赞 0 评论 0
protected void dispose(Resource[] resources){
    if(resources != null){
        for(int i = 0; i < resources.length; i ++){
            dispose(resources[i]);
        }
    }
}
TGMatrixEditor.java 文件源码 项目:TuxGuitar-1.3.1-fork 阅读 29 收藏 0 点赞 0 评论 0
protected void dispose(Resource[] resources){
    if(resources != null){
        for(int i = 0; i < resources.length; i ++){
            dispose(resources[i]);
        }
    }
}
ResourceManager.java 文件源码 项目:EasySnap 阅读 36 收藏 0 点赞 0 评论 0
public void disposeAll() {
    for (Resource resource : list) {
        if (!resource.isDisposed()) {
            resource.dispose();
        }
    }
    list.clear();
}
SWTGraphics2D.java 文件源码 项目:ECG-Viewer 阅读 27 收藏 0 点赞 0 评论 0
/**
 * 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();
}
SWTGraphics2D.java 文件源码 项目:astor 阅读 28 收藏 0 点赞 0 评论 0
/**
 * 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();
}
EventWindow.java 文件源码 项目:DroidNavi 阅读 27 收藏 0 点赞 0 评论 0
public void widgetDisposed(DisposeEvent e) {
    for(Resource rs: m_resources) {
        if(!rs.isDisposed()) {
            rs.dispose();
        }
    }
}
SWTGraphics2D.java 文件源码 项目:group-five 阅读 31 收藏 0 点赞 0 评论 0
/**
 * 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();
}
ReferenceLibraryClassifierNameDialog.java 文件源码 项目:NIEM-Modeling-Tool 阅读 26 收藏 0 点赞 0 评论 0
private void dispose(final Resource... resources) {
    for (final Resource r : resources) {
        if (r != null) {
            r.dispose();
        }
    }
}
MatrixConfig.java 文件源码 项目:totallicks-tuxguitar 阅读 23 收藏 0 点赞 0 评论 0
protected void dispose(Resource[] resources){
    if(resources != null){
        for(int i = 0; i < resources.length; i ++){
            dispose(resources[i]);
        }
    }
}
MatrixEditor.java 文件源码 项目:totallicks-tuxguitar 阅读 28 收藏 0 点赞 0 评论 0
protected void dispose(Resource[] resources){
    if(resources != null){
        for(int i = 0; i < resources.length; i ++){
            dispose(resources[i]);
        }
    }
}
TGResources.java 文件源码 项目:totallicks-tuxguitar 阅读 25 收藏 0 点赞 0 评论 0
public void dispose(){
    Iterator it = this.resources.iterator();
    while( it.hasNext() ){
        Resource resource = (Resource)it.next();
        resource.dispose();
    }
    this.resources.clear();
}
IconManager.java 文件源码 项目:totallicks-tuxguitar 阅读 27 收藏 0 点赞 0 评论 0
private List purgeDisposableIcons(){
    List disposableIcons = new ArrayList();
    Iterator it = this.disposableIcons.iterator();
    while( it.hasNext() ){
        Resource resource = (Resource)it.next();
        disposableIcons.add( resource );
    }
    this.disposableIcons.clear();
    return disposableIcons;
}
SWTGraphics2D.java 文件源码 项目:buffer_bci 阅读 27 收藏 0 点赞 0 评论 0
/**
 * 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();
}
SWTGraphics2D.java 文件源码 项目:proyecto-teoria-control-utn-frro 阅读 35 收藏 0 点赞 0 评论 0
/**
 * 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();
}
SWTGraphics2D.java 文件源码 项目:Memetic-Algorithm-for-TSP 阅读 31 收藏 0 点赞 0 评论 0
/**
 * 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();
}
TGMatrixConfig.java 文件源码 项目:TuxGuitar-1.3.1-fork 阅读 29 收藏 0 点赞 0 评论 0
protected void dispose(Resource resource){
    if(resource != null){
        resource.dispose();
    }
}
TGMatrixEditor.java 文件源码 项目:TuxGuitar-1.3.1-fork 阅读 21 收藏 0 点赞 0 评论 0
protected void dispose(Resource resource){
    if(resource != null){
        resource.dispose();
    }
}
ResourceManager.java 文件源码 项目:EasySnap 阅读 32 收藏 0 点赞 0 评论 0
public ResourceManager() {
    this.list = new ArrayList<Resource>();
}
ResourceManager.java 文件源码 项目:EasySnap 阅读 32 收藏 0 点赞 0 评论 0
public void add(Resource resource) {
    list.add(resource);
}
TextPropertiesViewPart.java 文件源码 项目:xtext-gef 阅读 27 收藏 0 点赞 0 评论 0
protected void refresh(final EObject object, final Notification notification) {
  boolean _or = false;
  if (this.refreshing) {
    _or = true;
  } else {
    _or = this.mergingBack;
  }
  if (_or) {
    return;
  }
  this.refreshing = true;
  try {
    if (((object == this.currentViewedObject) && (notification != null))) {
      final EObject mergeResult = this.mergeForward(object, notification);
      if ((mergeResult != null)) {
        org.eclipse.emf.ecore.resource.Resource _eResource = mergeResult.eResource();
        final String uriFragment = _eResource.getURIFragment(mergeResult);
        EObject _eContainer = mergeResult.eContainer();
        SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
        SaveOptions.Builder _format = _newBuilder.format();
        SaveOptions _options = _format.getOptions();
        final String serializedModel = this.serializer.serialize(_eContainer, _options);
        this.modelAccess.updateModel(serializedModel, uriFragment);
        String _editablePart = this.modelAccess.getEditablePart();
        this.lastMergedContent = _editablePart;
        return;
      }
    }
    if ((this.currentViewedObject != null)) {
      final String content = this.modelAccess.getEditablePart();
      boolean _notEquals = (!Objects.equal(content, this.lastMergedContent));
      if (_notEquals) {
        EObject mergeSource = null;
        boolean _and = false;
        if (!(object != this.currentViewedObject)) {
          _and = false;
        } else {
          boolean _isEmpty = this.validationErrors.isEmpty();
          _and = _isEmpty;
        }
        if (_and) {
          EObject _mergeBack = this.mergeBack(this.currentViewedObject, this.editingDomain);
          mergeSource = _mergeBack;
        }
        if ((mergeSource == null)) {
          this.handleDiscardedChanges();
        }
      }
    }
    this.resourceValidator.setOriginalObject(object);
    if ((object == null)) {
      this.lastMergedContent = "";
      this.modelAccess.updateModel(this.lastMergedContent);
    } else {
      org.eclipse.emf.ecore.resource.Resource _eResource_1 = object.eResource();
      final String uriFragment_1 = _eResource_1.getURIFragment(object);
      EObject _eContainer_1 = object.eContainer();
      SaveOptions.Builder _newBuilder_1 = SaveOptions.newBuilder();
      SaveOptions.Builder _format_1 = _newBuilder_1.format();
      SaveOptions _options_1 = _format_1.getOptions();
      final String serializedModel_1 = this.serializer.serialize(_eContainer_1, _options_1);
      this.modelAccess.updateModel(serializedModel_1, uriFragment_1);
      this.viewer.setSelectedRange(0, 0);
      String _editablePart_1 = this.modelAccess.getEditablePart();
      this.lastMergedContent = _editablePart_1;
    }
    this.currentViewedObject = object;
  } finally {
    this.refreshing = false;
  }
}
RangeSlider.java 文件源码 项目:swtrangeslider 阅读 23 收藏 0 点赞 0 评论 0
/**
 * Dispose safely any SWT resource
 * 
 * @param resource the resource to dispose
 */
private void safeDispose(final Resource resource) {
    if (resource != null && !resource.isDisposed()) {
        resource.dispose();
    }
}
Map.java 文件源码 项目:mytourbook 阅读 33 收藏 0 点赞 0 评论 0
private void disposeResource(final Resource resource) {
    if ((resource != null) && !resource.isDisposed()) {
        resource.dispose();
    }
}
Util.java 文件源码 项目:mytourbook 阅读 30 收藏 0 点赞 0 评论 0
public static Resource disposeResource(final Resource resource) {
    if (resource != null && !resource.isDisposed()) {
        resource.dispose();
    }
    return null;
}
Map.java 文件源码 项目:mytourbook 阅读 26 收藏 0 点赞 0 评论 0
private void disposeResource(final Resource resource) {
    if ((resource != null) && !resource.isDisposed()) {
        resource.dispose();
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号