package br.eti.conradoqg.client.widgets;

import br.eti.conradoqg.client.communication.WidgetUpdateCommand;
import br.eti.conradoqg.client.uiControl.OpenedWindowUpdater;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.event.WindowListenerAdapter;

public class Window extends com.gwtext.client.widgets.Window {
        private WidgetUpdateCommand updateCommand;

        public Window(final OpenedWindowUpdater openedWindowUpdater) {
                super();
                addListener(new WindowListenerAdapter() {
                        @Override
                        public void onShow(Component component) {
                                super.onShow(component);
openedWindowUpdater.addOpenedWindow((Window)component);
                        }
                        @Override
                        public void onHide(Component component) {
                                super.onHide(component);
                                
openedWindowUpdater.removeOpenedWindow((Window)component);
                        }
                });
        }

        public WidgetUpdateCommand getUpdateCommand() {
                return updateCommand;
        }

        public void setUpdateCommand(WidgetUpdateCommand updateCommand) {
                this.updateCommand = updateCommand;
        }

        public void onUpdate(WidgetUpdateCommand updateCommand) {
                updateCommand.Start();
        }

        public void update() {
                getEl().mask("Loading");
                onUpdate(updateCommand);
                getEl().unmask();
        }
}

The last method, mask the window while the update commands are
executed, and in the end, the mask is removed.

The getEl().mask() command isn't masking the window.

Why?

Thanks

Sorry for my english.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to