aspose file tools*
The moose likes GWT and the fly likes GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit?" Watch "GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit?" New topic
Author

GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit?

Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
Ok, so I'm starting to poke around in GXT.... I'm using 3.0 developer preview 5.

I'm trying to do some basic stuff with the Window class, and I'm sort of happy with it. But using it with a BorderLayoutContainer is a bit . . odd . .

If I take a Window and add a VerticalLayoutContainer to it, then when I show the Window,it sizes to being large enough to show all of the contents - very similar to what I'd expect from Swing's JFrame.pack() method.

If I take a Window and add a BorderLayoutContainer to it, add Widgets to the north, south, east, west and center, then show, well, the behavior is a bit weird. The window starts fairly small, and shows only the north area - if I drag out the bottom corner with the mouse to expand it, other elements show, but at first overlapping, then gradually spreading out as I widen the window enough to fit everything.

I don't want to explicitly set the size since for what I ultimately intend to do, the size required to show all the contents will vary. However, there doesn't appear to be a method similar to JFrame's "pack()" as far as I can tell.

Is there any way to get the window to auto-size to be large enough to fit all the contents without overlapping or hiding anything? I imagine that there will be other Layout Panel classes for which this occurs.. already my experimentation with HorizontalLayoutPanel is behaving oddly - at least, oddly relative to what I'd assume based on Swing-like behavior.

Here's the code, without the import declarations:
abani patra
Ranch Hand

Joined: Oct 11, 2011
Posts: 70
Hi,
I am also trying to use GXT from my eclipse plugin , can you tell how I ll configure I am using GWT 2.* .
Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
I was able to just download it from the Sencha website for Developer Preview 5 (linked to from the Sencha Blog page), unzip it, follow the instructions in the setup.txt, and it worked.

However, I have never had GXT 2.x, so I don't know if there are extra steps when upgrading from 2.x to 3.0.

Also, in the setup.txt, the following line is wrong:
<link rel="stylesheet" type="text/css" href="{module name}/css/reset.css" />

It should read:
<link rel="stylesheet" type="text/css" href="{module name}/reset.css" />

(this may have already been fixed, but it was wrong when I downloaded it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GXT 3.0 and the com.sencha.gxt.widget.core.client.Window class - auto-sizing to fit?
 
Similar Threads
component size
Layout is leaving some pixels on the right
help on reading textfield on 1 class from another class and using it to create a file
sharing Panel between frames
why no border around the button !!