Hi gregor,
Thanks soo much for your response.... But it will require code change to all
the popups that use a glass panel. And also in future some developer may
forget to fire a Deffered command when the size changes.... So i dont think
its such a good method....
I am working with pure GWT. Basically I am using the glass panels for modal
popups. I set the size of the glass panel as the current view port size just
before dispalying it. Then the popup is dispalyed. Now on the popup, the
user actions causes the size of the popup to change. If the size becomes
larger than the previous view port size then the view port size will
automatically increase, but the glass panel size remains the same which
causes the bottom region of the viewport to be not covered by glass panel.
Please not that this change of size will not cause a window resize event as
the window size is not changed, only the document size got changed. (BTW i
have a windowresize listener on the glass panel so that part is take care
of.)
Hope this explains my problem.
Thanks,
Litty Preeth
On Thu, Dec 4, 2008 at 4:57 PM, gregor <[EMAIL PROTECTED]> wrote:
>
> 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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---