lis.componentChanged(newdesc).addResultListener(new IResultListener<Void>()
public void resultAvailable(IComponentDescription newdesc) { ICMSComponentListener[] alisteners; Set<ICMSComponentListener> slisteners = new HashSet<ICMSComponentListener>(listeners.getCollection(null)); slisteners.addAll(listeners.getCollection(cid)); alisteners = (ICMSComponentListener[])slisteners.toArray(new ICMSComponentListener[slisteners.size()]); // todo: can be called after listener has (concurrently) deregistered // System.out.println("comp changed: "+desc+" "+listeners); // logger.info("Component changed: "+desc+" "+listeners); for(int i=0; i<alisteners.length; i++) { final ICMSComponentListener lis = alisteners[i]; lis.componentChanged(newdesc).addResultListener(createResultListener(new IResultListener<Void>() { public void resultAvailable(Void result) { } public void exceptionOccurred(Exception exception) { // System.out.println("prob: "+exception); removeComponentListener(cid, lis); } })); } } }));
public void resultAvailable(IComponentDescription newdesc) { ICMSComponentListener[] alisteners; Set<ICMSComponentListener> slisteners = new HashSet<ICMSComponentListener>(listeners.getCollection(null)); slisteners.addAll(listeners.getCollection(cid)); alisteners = (ICMSComponentListener[])slisteners.toArray(new ICMSComponentListener[slisteners.size()]); // todo: can be called after listener has (concurrently) deregistered // System.out.println("comp changed: "+desc+" "+listeners); // logger.info("Component changed: "+desc+" "+listeners); for(int i=0; i<alisteners.length; i++) { final ICMSComponentListener lis = alisteners[i]; lis.componentChanged(newdesc).addResultListener(createResultListener(new IResultListener<Void>() { public void resultAvailable(Void result) { } public void exceptionOccurred(Exception exception) { // System.out.println("prob: "+exception); removeComponentListener(cid, lis); } })); } } }));
lis.componentChanged(origdesc).addResultListener(createResultListener(new IResultListener<Void>()
lis.componentChanged((IComponentDescription)event.getValue()) .addResultListener(new SwingDefaultResultListener<Void>()