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();
    }

      

      

  • 相关阅读:
    spring core与context的理解
    maven项目中pom.xml快速生成
    MariaDB常用命令
    MariaDB快速入门指南
    My_plan_51
    Oracle简介及安装
    Oracle单行函数
    oracle多表查询
    单点登录原理与简单实现
    JavaScript 的时间消耗
  • 原文地址:https://www.cnblogs.com/wwssgg/p/14690150.html
Copyright © 2011-2022 走看看