I'm not sure I understand your situation right, but:

if your panel "knows" at run time that it's size has changed (e.g.
from a method that adds the new widget to it) then it could fire a
change event via DeferrerdCommand. The glass panel could be registered
as a listener with it and obtain new width/height offsets.

On Dec 4, 4:25 am, "Litty Preeth" <[EMAIL PROTECTED]> wrote:
> At run time I add widgets to the page which causes the size of the panel
> (scrollable size) to change.
>
> Regards,
> Litty Preeth
>
> On Wed, Dec 3, 2008 at 7:22 PM, gregor <[EMAIL PROTECTED]> wrote:
>
> > Oh, I see. How is the size of your RootPanel changed then if not by
> > changing the size of the browser window?
>
> > On Dec 3, 1:15 pm, "Litty Preeth" <[EMAIL PROTECTED]> wrote:
> > > WindowResizeListener will listen for window resize events only. It wont
> > be
> > > invoked if ur scrollable page size is changed. It ll be notified only if
> > the
> > > WINDOW itself is mazximized, resized etc.
>
> > > Regards,
> > > Litty Preeth
>
> > > On Wed, Dec 3, 2008 at 4:31 PM, gregor <[EMAIL PROTECTED]>
> > wrote:
>
> > > > Hi Litty,
>
> > > > I use something like this:
>
> > > > public class MdDem implements EntryPoint {
>
> > > >    private MainPage main = new MainPage();
> > > >    private ResizeListener windowListener = new ResizeListener();
>
> > > >    public void onModuleLoad() {
> > > >        RootPanel.get().add(main);
> > > >        Window.addWindowResizeListener(windowListener);
> > > >        // initial sizing call if you need it
> > > >        windowListener.onWindowResized(Window.getClientWidth(),
> > > > Window.getClientHeight());
> > > >    }
>
> > > >    // window resize listener
> > > >    private class ResizeListener implements WindowResizeListener {
>
> > > >        private int width, height;
> > > >        private boolean pending;
> > > >        private Command command;
>
> > > >        ResizeListener() {
> > > >            command = new Command() {
> > > >                public void execute() {
> > > >                    pending = false;
> > > >                    main.adjustSize(width, height);
> > > >                }
> > > >            };
> > > >        }
>
> > > >        public void onWindowResized(int width, int height) {
> > > >            this.width = width;
> > > >            this.height = height;
> > > >            if (pending == false) {
> > > >                pending = true;
> > > >                DeferredCommand.addCommand(command);
> > > >            }
> > > >        }
> > > >    }
>
> > > > }
>
> > > > regards
> > > > gregor
>
> > > > On Dec 3, 7:33 am, "alex.d" <[EMAIL PROTECTED]> wrote:
> > > > > Basically you have to listen to browser "change size" events (not
> > sure
> > > > > how reliable this is in all supported browsers) and forward new size
> > > > > to your widgets. Ext GWT (and probably GWT Ext) for example, already
> > > > > has ViewPort implementation.
>
> > > > > On 3 Dez., 05:11, Litty Preeth <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi friends,
>
> > > > > > Anybody has any ideas on this?
>
> > > > > > Thanks and Regards,
> > > > > > Litty Preeth
>
> > > > > > On Dec 2, 4:42 pm, "Litty Preeth" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi All,
>
> > > > > > > Anybody know how to implement a viewport resize listener?
> > Basically I
> > > > have a
> > > > > > > glass panel (light box effect). I want to notify this glass panel
> > > > whenever
> > > > > > > my RootPanel size gets changed so that I can resize my glass
> > panel to
> > > > fillup
> > > > > > > the area.
>
> > > > > > > Regards,
> > > > > > > Litty Preeth
--~--~---------~--~----~------------~-------~--~----~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to