0
我創建了一個progressmessagebox,用於跟蹤客戶端加載時的進度。我希望能夠以更新什麼是實時正在進行的用戶,特別是我有這3個「子目標」:跟蹤ProgressMessageBox的進度:GXT 3.0.1
1「正在初始化...」:%0表示完全
2-」檢索實驗室配置...」:30%完成
3- 「啓動客戶端...」:80%完成
4- 「客戶端準備」:%100
這是一個我目前有代碼的框架,但它不起作用,但它不顯示步驟2和3:
final ProgressMessageBox box = new ProgressMessageBox("Please wait", "Loading items...");
box.setProgressText("Initializing...");
box.show();
final Timer t = new Timer() {
float i;
@Override
public void run() {
box.updateProgress(i/100, "{0}% Complete");
i += 5;
if (i > 100) {
cancel();
Info.display("Message", "Client is ready");
}
}
};
t.scheduleRepeating(500);
box.updateProgress(0.3, "Retrieving lab configuration...");
//code to retrieve the lab configuration..
box.updateProgress(0.8, "Starting the client...");
//code to start the client...
謝謝!
此答案與GXT沒有任何關係。 –