zoukankan      html  css  js  c++  java
  • 处理TC的Command问题

    需求:因为TC的Command执行操作是,是另起一个线程,那么该怎么知道它是否结束该线程了?

    解决方法,给Command添加一个监听事件

    isCommandFinish = true;
    if(deleteTcContextList.size()> 0){
      isCommandFinish = false;
      AIFComponentContext[] tcContexts = new AIFComponentContext[deleteTcContextList.size()];
      tcContexts = deleteTcContextList.toArray(tcContexts);
      DeleteCommand deleteCommand = new DeleteCommand(tcContexts,app.getDesktop());
      deleteCommand.addCommandListener(new ICommandListener() {
    							
      @Override
      public void commandStarting(ICommandListenerEvent paramICommandListenerEvent) {
        // TODO Auto-generated method stub
    	System.out.println("command开始!!");
      }
        @Override
       public void commandDone(ICommandListenerEvent paramICommandListenerEvent) {
    	// TODO Auto-generated method stub
    	isCommandFinish = true;
      }
    });
    deleteCommand.executeModeless();
    }

      

      

  • 相关阅读:
    js 脚本学习 索引
    nodejs 学习索引
    oracle 学习 笔记
    githut 的 管理 使用
    sublime text 插件记录
    web 学习 相关索引
    wpf 自定义 无边框 窗体 resize 实现
    vs 效率工具
    ANDROID开发实用小工具
    iOS开发之Core Animation
  • 原文地址:https://www.cnblogs.com/wwssgg/p/14690150.html
Copyright © 2011-2022 走看看