=====================
public void showWait() {
Element element = focusPanel.getElement();
DOM.setStyleAttribute(element,"cursor","wait");
focusPanel.setFocus(true);
DOM.setCapture(element);
}
public void showUnwait() {
Element element = focusPanel.getElement();
DOM.releaseCapture(element);
DOM.setStyleAttribute(element,"cursor","default");
}
(calling code)
public void zoomin() {
showWait();
DeferredCommand.addCommand(new Command() {
public void execute() {
longRunningProcess();
showUnwait();
}
});
}
That being said, i think using "pointer" and "normal" instead of
"wait" and "default" will work as well.
'pointer' is something very very different from wait.
Try setting the cursor directly on the body tag:
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor", "wait");
If that also doesn't work, could be this just can't be done.
On Jul 30, 11:03 pm, abickford <adam.bickf...@gmail.com> wrote:
> You should probably do this by adding/removing CSS classes to the
> elements and styling them as needed.
>
> That being said, i think using "pointer" and "normal" instead of
> "wait" and "default" will work as well.
>
> On Jul 30, 1:02 pm, "L Frohman" <lfroh...@gmail.com> wrote:
>
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor", "wait");
didn't help - still works in IE, not in Firefox/Safari.
"could be this just can't be done" - too bad.
final Button b = new Button("Test");
b.addClickListener(new ClickListener()
{
public void onClick(Widget sender)
{
Timer t = new Timer()
{
public void run()
{
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor",
"wait");
}
};
t.schedule(5000);
t = new Timer()
{
public void run()
{
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor",
"pointer");
}
};
t.schedule(10000);
t = new Timer()
{
public void run()
{
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor",
"wait");
}
};
t.schedule(15000);
t = new Timer()
{
public void run()
{
DOM.setStyleAttribute(RootPanel.get().getElement(), "cursor",
"pointer");
}
};
t.schedule(20000);
}
});
this.add(b);
hth,
regards,
Piotr