我正在使用ProgressMonitorDialog
显示长时间运行进程的进度对话框。
Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();
shell.setText("HTML result loading");
shell.update();
ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
dialog.setCancelable(true);
dialog.run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InterruptedException {
monitor.beginTask(ResourceAssistant.getString(ViewAsHTML.class, "loadingHTMLResults"), //$NON-NLS-1$
IProgressMonitor.UNKNOWN);
while (!thread.getState().equals(Thread.State.TERMINATED)) {
if (monitor.isCanceled()) {
setCanceled(true);
break;
}
}
monitor.done();
}
});
我想更改进度对话框的标题。默认情况下,它显示为“进度信息”。我怎么能改变这个。任何想法。
答案 0 :(得分:6)
标题是在您可以覆盖的configureShell
方法中设置的:
protected void configureShell(final Shell shell)
{
super.configureShell(shell);
shell.setText("your title");
}