Progress Bar dialog box (Ext GWT)
/*
* Ext GWT - Ext for GWT
* Copyright(c) 2007-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
package com.google.gwt.sample.hello.client;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Timer;
public class Hello implements EntryPoint {
public void onModuleLoad() {
final MessageBox box = MessageBox
.progress("Please wait", "Loading items...", "Initializing...");
final ProgressBar bar = box.getProgressBar();
final Timer t = new Timer() {
float i;
@Override
public void run() {
bar.updateProgress(i / 100, (int) i + "% Complete");
i += 5;
if (i > 105) {
cancel();
box.close();
Info.display("Message", "Items were loaded", "");
}
}
};
t.scheduleRepeating(500);
}
}
Ext-GWT.zip( 4,297 k)Related examples in the same category