Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
In one of my applications I am ResizeHandler to resize the GUI of my app.
This works fine, but there is one part in my code where I would like to 
manually trigger a Resize.
Does anyone know how I can do that?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
If you want to resize the browser window then use the Window class. If you 
just want to execute the ResizeHandler code without having a ResizeEvent 
then just create a method for it and let the ResizeHandler call that 
method. Then you can call the method from elsewhere too.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
This is a part of my code:

Window.addResizeHandler(new PageResizeHandler());

and 

private class PageResizeHandler implements ResizeHandler {
@Override
public void onResize(ResizeEvent event) {
mainFrame.handleResize(event.getWidth(), event.getHeight());
}
}

This code does the job fine when the browser resizes. However now I would 
like manually trigger the browser resize event to force a WebKit browser to 
redraw.
simply invoking the handleResize method does not do the job.

On Wednesday, August 21, 2013 8:01:34 PM UTC+8, AgitoM wrote:

 In one of my applications I am ResizeHandler to resize the GUI of my app.
 This works fine, but there is one part in my code where I would like to 
 manually trigger a Resize.
 Does anyone know how I can do that?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
GWT's Window class has methods to modify the browser window size which 
should trigger a global repaint. But I am not sure if that is also true for 
tablets/phones as their apps always run in full screen browsers whose size 
you can not change.

To just repaint a widget / html element you could hide and show it again by 
adding and removing display:none but this could cause some flicker effects.


-- J.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
Thank your help so far Jens. Any example on which Window method I can use?
I tried looking for it, but couldn't find it.

On Wednesday, August 21, 2013 8:01:34 pm UTC +8, AgitoM wrote:

 In one of my applications I am ResizeHandler to resize the GUI of my app.
 This works fine, but is there one part in my code YogyakartaT I would like 
 to manually trigger a resizing.
 Does anyone know how I can do that?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
resizeTo() ?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Blaze
This Window resize would be very hard to be done.

You cannot resize window if its not a window opened by your 
application...(just one opend by a opener one can be re-sized, you cannot 
resize a tab)
Why do you need the resize? If its just to force a redraw, relayout because 
you added something in the DOM and this is not sized correct then you can 
try setting a style.display on the MainFrame you have by setting it to 
once to style.display.None and then back again to style.display.block...

This also dosent mean that the relayout will work, maybe the css its just 
not correct for what you want to do...

Note: Window class inside has a check if the new size is diff then the 
previous one, just in this case fires the handler...

 Blaze

Am Mittwoch, 21. August 2013 14:01:34 UTC+2 schrieb AgitoM:

 In one of my applications I am ResizeHandler to resize the GUI of my app.
 This works fine, but there is one part in my code where I would like to 
 manually trigger a Resize.
 Does anyone know how I can do that?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.