`
qq123zhz
  • 浏览: 524422 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

RCP 为action添加操作进度条

阅读更多

public class StartAction extends BaseAction {

private Shell shell;
private ProgressMonitorDialog pmd;

public StartAction(TableViewer tableViewer, Shell shell) {
}

@Override
public void run() {

shell.getDisplay().asyncExec(new Runnable() {

@Override
public void run() {
try {
// TODO Auto-generated method stub
pmd.run(true, true, new StartRunningOperation(
StartAction.this));
} catch (InvocationTargetException e) {
} catch (InterruptedException e) {
}
}
});

}

}

/**
* @author zhz
*
*/
class StartRunningOperation implements IRunnableWithProgress {
// The increment sleep time
private static final int INCREMENT = 500;
private StartAction startAction;

/**
* 进度控制
*
* @param startAction
*
*/
public StartRunningOperation(StartAction startAction) {
this.startAction = startAction;
startAction.setText("子系统启动中.....");
startAction.setDescription("执行进度");
}

/**
* Runs the long running operation
*
* @param monitor
* the progress monitor
*/
public void run(final IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
monitor.beginTask("启动中...", IProgressMonitor.UNKNOWN);
monitor.subTask("正在远程启动...");
// Thread.sleep(INCREMENT);
monitor.worked(INCREMENT);
//添加操作的内容
monitor.subTask("操作完成!");
monitor.done();
}
}

分享到:
评论

相关推荐

    RCP-1500中文操作手册.pdf

    索尼 sony rcp 1500 中文操作手册,非常好,是中文的,希望大家多多下载 谢谢谢谢,让我多赚些积分

    为RCP程序添加帮助支持

    示例代码 博文链接:https://dollyn.iteye.com/blog/150896

    Eclipse RCP详细教程

    7.3.向VIEW里添加action 40 8.和编辑器一起工作 51 8.1.概述 51 8.2.创建工程 51 8.3.创建并准备domain 模型 51 8.4.在视口中使用domain模型 57 8.5.加入编辑器 58 8.6.调用编辑器 66 8.7.向编辑器...

    RCP中为自定义的Action绑定快捷键(完整-整理版)

    任何优秀的软件都离不开快捷键功能,如Ctrl+C复制,Ctrl+V粘贴,F5刷新,此文讲述了自定义的Action(不是Command),如何绑定快捷键的方法。此方法进本人亲自试验,绝对可行。

    RCP,RCP开发

    RCP&OSGI;

    RCP在线升级,RCP在线升级

    RCP在线升级RCP在线升级RCP在线升级RCP在线升级RCP在线升级

    eclipse 3.6 rcp 开发

    将涉及以下内容:创建第一个RCP程序,创建菜单和工具栏,查看,编辑,对话,外部JAR的用法,向一个RCP应用程序产品中添加标志和帮助。每一章都基本独立于其他章节。欢迎访问我的网站——www.xeclipse.com。

    eclipse rcp 自学教程

    clipse RCP允许开发者使用eclipse结构风格设计...将涉及以下内容:创建第一个RCP程序,创建菜单和工具栏,查看,编辑,对话,外部JAR的用法,向一个RCP应用程序产品中添加标志和帮助。 每一章可能都基本独立于其他章节

    RCP项目导出exe 步骤

    RCP导出EXE 老大难问题。 RCp 程序导出步骤,保证能够导出~

    RCP程序设计自学RCP的教程

    有关rcp的内容 是rcp入门的好帮手,rcp自学的好帮手

    RCP 常见的扩展点指南

    RCP 常见的扩展点指南 RCP最精华的部分之一,详细分析了RCP如何建立扩展点的。

    Eclipse RCP开发教程

    Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT

    RCP项目的登录窗体 RCP项目的登录窗体

    RCP项目的登录窗体RCP项目的登录窗体RCP项目的登录窗体RCP项目的登录窗体

    Eclipse Rcp

    Eclipse RCP富客户端平台,基于Eclipse开发的。

    RCP弹出日期控件

    RCP系统使用的弹出式日期控件,可切换上月下月,前一年后一年,可选择年、月

    RCP中文入门教程.rar

    RCP中文入门教程,RCP中文入门教程,RCP中文入门教程,RCP中文入门教程

    rcp欢迎界面

    转载的,rcp欢迎界面设计,欢迎大家一起用

    RCP源码例子

    RCP源码例子 RCP源码例子 RCP源码例子

    EclipseRcp 例子程序

    EclipseRcp 例子程序

Global site tag (gtag.js) - Google Analytics