SplitPanel problems

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

SplitPanel problems

Postby mhdsummers » Thu Jan 31, 2008 3:06 pm

I am trying to create a composite with a VerticalSplitPanel. In the top part of the VerticalSplitPanel I want a HorizontalSplitPanel.
The designer does not render the split panels correctly. When I first add them it looks fine but when I hit the reparse button it pushes the HorizontalSplitPanel all the way to the left. It looks fine when I run the application in hosted mode but not inside the designer. Any suggestions.

Here is the code that is generated.

Code: Select all
package com.mycompany.project.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalSplitPanel;
import com.google.gwt.user.client.ui.VerticalSplitPanel;

public class MyComposite extends Composite {

   public MyComposite() {

      final VerticalSplitPanel verticalSplitPanel = new VerticalSplitPanel();
      initWidget(verticalSplitPanel);
      verticalSplitPanel.setSize("150px", "150px");
      verticalSplitPanel.setSplitPosition("50%");

      final HorizontalSplitPanel horizontalSplitPanel = new HorizontalSplitPanel();
      verticalSplitPanel.setTopWidget(horizontalSplitPanel);
      horizontalSplitPanel.setSize("150px", "150px");
      horizontalSplitPanel.setSplitPosition("50%");
      horizontalSplitPanel.setSize("100%", "100%");
   }

}
Attachments
SplitPanel.jpg
SplitPanel.jpg (63.97 KiB) Viewed 1948 times
mhdsummers
 
Posts: 2
Joined: Thu Jan 31, 2008 2:55 pm

Re: SplitPanel problems

Postby Eric Clayberg » Fri Feb 01, 2008 10:32 am

Try changing the code to this...

Code: Select all
package com.mycompany.project.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalSplitPanel;
import com.google.gwt.user.client.ui.VerticalSplitPanel;

public class MyComposite extends Composite {
   public MyComposite() {
      final VerticalSplitPanel verticalSplitPanel = new VerticalSplitPanel();
      initWidget(verticalSplitPanel);
      //verticalSplitPanel.setSize("150px", "150px");
      verticalSplitPanel.setSplitPosition("50%");
      //
      final HorizontalSplitPanel horizontalSplitPanel = new HorizontalSplitPanel();
      verticalSplitPanel.setTopWidget(horizontalSplitPanel);
      //horizontalSplitPanel.setSize("150px", "150px");
      horizontalSplitPanel.setSplitPosition("50%");
      //horizontalSplitPanel.setSize("100%", "100%");
   }
}

You should also download the latest build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: SplitPanel problems

Postby mhdsummers » Fri Feb 01, 2008 11:43 am

Thanks, that worked. This must be a bug in the version I have. I downloaded the trial version a couple of days ago.
mhdsummers
 
Posts: 2
Joined: Thu Jan 31, 2008 2:55 pm

Re: SplitPanel problems

Postby Eric Clayberg » Sat Feb 02, 2008 5:47 am

This has been fixed in the latest build.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: SplitPanel problems

Postby zdenek » Thu Jul 31, 2008 10:40 am

Hi,

I have the same problem using latest build, Version: 5.0.0.200807042315 on Windows XP. Please advise.

Thank you,
Zdenek

Code: Select all
       
        RootPanel rootPanel = RootPanel.get();

        final TabPanel tabPanel = new TabPanel();
        rootPanel.add(tabPanel);
        tabPanel.setSize("100%", "100%");

        final VerticalPanel verticalPanel = new VerticalPanel();
        tabPanel.add(verticalPanel, "Rules");
        verticalPanel.setBorderWidth(5);

        final HorizontalSplitPanel horizontalSplitPanel = new HorizontalSplitPanel();
        verticalPanel.add(horizontalSplitPanel);
        horizontalSplitPanel.setSize("100%", "100%");
        verticalPanel.setCellHeight(horizontalSplitPanel, "80%");
        verticalPanel.setCellWidth(horizontalSplitPanel, "100%");
        horizontalSplitPanel.setSplitPosition("30%");

        final ScrollPanel scrollPanel = new ScrollPanel();
        verticalPanel.add(scrollPanel);
        scrollPanel.setSize("100%", "100%");
        verticalPanel.setCellHeight(scrollPanel, "20%");
        verticalPanel.setCellWidth(scrollPanel, "100%");

        final Tree rulesTree = new Tree();
        horizontalSplitPanel.setLeftWidget(rulesTree);
        rulesTree.setSize("100%", "100%");

        final FormPanel rulesFormPanel = new FormPanel();
        horizontalSplitPanel.setRightWidget(rulesFormPanel);
        rulesFormPanel.setSize("100%", "100%");
zdenek
 
Posts: 3
Joined: Tue Jul 29, 2008 8:48 am

Re: SplitPanel problems

Postby Eric Clayberg » Fri Aug 01, 2008 5:21 am

I'm not sure what problem you are having from your description.

Please be specific and provide screen shots as needed.

The problem described earlier in the thread was fixed a long time ago.

I would also suggest using GWT Designer v5.1.0 rather than v5.0.0.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: SplitPanel problems

Postby zdenek » Fri Aug 01, 2008 10:15 am

Thank you. It works with GWT Designer v5.1.0. (I got v5.0.0 is from your download page)
zdenek
 
Posts: 3
Joined: Tue Jul 29, 2008 8:48 am

Re: SplitPanel problems

Postby Eric Clayberg » Fri Aug 01, 2008 10:50 am

Good. I'm glad it worked whatever the problem might have been.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests