日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

Swt/Jface進(jìn)度條

系統(tǒng) 2314 0
普通的進(jìn)度條
import ?java.lang.reflect.InvocationTargetException;

import ?org.eclipse.core.runtime.IProgressMonitor;
import ?org.eclipse.jface.dialogs.ProgressMonitorDialog;
import ?org.eclipse.jface.operation.IRunnableWithProgress;
import ?org.eclipse.swt.widgets.Display;
import ?org.eclipse.swt.widgets.Shell;


public ? class ?TestProgress? {
????
static ? boolean ?stopflg? = ? false ;
????
/**?*/ /**
?????*?Launch?the?application
?????*?
@param ?args
?????
*/

????
public ? static ? void ?main(String[]?args)? throws ?Exception {
????????
final ?Display?display? = ?Display.getDefault();
????????
final ?Shell?shell? = ? new ?Shell();
????????shell.setSize(
500 ,? 375 );
????????shell.setText(
" SWT?Application " );
????????
????????
//
????????IRunnableWithProgress?runnable? = ? new ?IRunnableWithProgress() {
????????????
public ? void ?run(IProgressMonitor?monitor)? throws ?InvocationTargetException,?InterruptedException? {
????????????????monitor.beginTask(
" generate " ,? 30 );
????????????????
for ( int ?i = 0 ;i < 100 ;i ++ ) {
????????????????????
if (monitor.isCanceled()) {
????????????????????????
return ;
????????????????????}

????????????????????monitor.worked(
1 );
????????????????????Thread.sleep(
50 );
????????????????}

????????????????
????????????????monitor.done();
????????????}

????????}
;
????????
new ?ProgressMonitorDialog(shell).run( true ,? true ,?runnable);
????????shell.open();
????????shell.layout();
????????
while ?( ! shell.isDisposed())? {
????????????
if ?( ! display.readAndDispatch())
????????????????display.sleep();
????????}

????}


}

Swt/Jface進(jìn)度條


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 永吉县| 克山县| 黄陵县| 肃宁县| 河北省| 梅河口市| 增城市| 双峰县| 肃南| 饶平县| 新丰县| 鹿邑县| 博兴县| 湾仔区| 济阳县| 含山县| 洛阳市| 湾仔区| 泾川县| 县级市| 裕民县| 广德县| 汾西县| 扎囊县| 洱源县| 镇雄县| 育儿| 广灵县| 达州市| 平顶山市| 睢宁县| 黄梅县| 宁阳县| 固阳县| 望都县| 烟台市| 盐城市| 连平县| 陇南市| 长汀县| 沐川县|