NC按钮增加风车加载页面

1、如果此节点已有按钮由此功能,找到他含有IProgressMonitor属性的父类,继承就行,但注意,model属性不要再提供getset方法,否则父类model属性会为空。
2、自己写,通过TPAProgressUtil 获取带风车的幕布组件,而且要另起线程(比如SwingWorker),但一定要记得finally里关掉,
if (monitor != null) {
monitor.done();
monitor = null;
}
private void showMonitor() {
if ((monitor != null) && (!monitor.isDone())) {
return;
}

	monitor = getTpaProgressUtil().getTPAProgressMonitor();
	monitor.beginTask("", -1);
	monitor.setProcessInfo("");

}

public TPAProgressUtil getTpaProgressUtil() {
	if (tpaProgressUtil == null) {
		tpaProgressUtil = new TPAProgressUtil();
		tpaProgressUtil.setContext(getModel().getContext());
	}

	return tpaProgressUtil;
}

猜你喜欢

转载自blog.csdn.net/guaizang/article/details/103722918
nc