public class ShowHourGlass extends FlowPanel {
Button showHourGlass = new Button("Show HourGlass");
protected void onLoad(){
this.add(showHourGlass);
showHourGlass.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
//showWaitCursor();
RootPanel.get().setStyleName("waitCursor");
Timer t = new Timer() {
public void run() {
// do something after a delay
//showDefaultCursor();
RootPanel.get().setStyleName("defaultCursor");
}
};
// delay running for 1 seconds
t.schedule(1000);
}
});
}
}
.waitCursor{
cursor:wait;
}
.defaultCursor{
cursor:default;
}
t.schedule(1000);
--To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gdov4VIG5Q4J.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
3) If the mouse cursor not leave the button, the cursor is still in hand shape and the user can continue click the button many times.