1. #1
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default Issues with Multiple Vertically Stacked Widgets using Border Layout

    Issues with Multiple Vertically Stacked Widgets using Border Layout


    Hello,

    I'm using JDK1.5.x, GWT 1.5.3, GXT 1.2.4.

    I created a custom widget derived from CompositeWidget that has a LayoutContainer with a BorderLayout that contains three (3) Content Panels, one for the West, Center and East region respectively.

    I then multiple instances of my custom widgets in the following manner,

    Viewport viewPort = new Viewport();
    viewPort.setLayout(new FitLayout());

    ContentPanel mainPanel = new ContentPanel();
    mainPanel.setLayout(new RowLayout(Orientation.VERTICAL));
    mainPanel.setBorders(false);
    mainPanel.setHeaderVisible(false);
    mainPanel.setFrame(true);
    mainPanel.setCollapsible(true);

    mainPanel.add(new PositionWidget(), new RowData(1, 150,new Margins(0,4,0,4)));
    mainPanel.add(new PositionWidget(), new RowData(1, 150, new Margins(4)));
    mainPanel.add(new PositionWidget(), new RowData(1, 150, new Margins(0,4,0,4)));


    viewPort.add(mainPanel);
    RootPanel.get().add(viewPort);

    They render for the most part okay, but when I compile and run them in the browser and collapse one of the widgets east panel content and then click the mouse anywhere in the collapsed east region, the "easts content panel" overlaps the center region. I've attached a screen shot for clarity.

    Any ideas?
    Attached Images

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Please post a complete testcase as the forumguidelines tell you.

  3. #3
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default


    I thought that is what I included, the entire content of my onModuleLoad, but here it is again.

    Also, this behavior is reproducible in both hosted and browser mode.

    public void onModuleLoad() {

    Viewport viewPort = new Viewport();
    viewPort.setLayout(new FitLayout());

    ContentPanel mainPanel = new ContentPanel();
    mainPanel.setLayout(new RowLayout(Orientation.VERTICAL));
    mainPanel.setBorders(false);
    mainPanel.setHeaderVisible(false);
    mainPanel.setFrame(true);
    mainPanel.setCollapsible(true);

    mainPanel.add(new PositionWidget(), new RowData(1, 150,new Margins(0,4,0,4)));
    mainPanel.add(new PositionWidget(), new RowData(1, 150, new Margins(4)));
    mainPanel.add(new PositionWidget(), new RowData(1, 150, new Margins(0,4,0,4)));


    viewPort.add(mainPanel);
    RootPanel.get().add(viewPort);
    }

    Here is the definition of my PositionWidget,

    public class PositionWidget extends Composite {

    private static final int DEFAULT_PANEL_SPACING = 1;
    public PositionWidget() {
    LayoutContainer c = new LayoutContainer();
    c.setLayout(new BorderLayout());
    createLeftPanel(c);
    createCenterPanel(c);
    createRightPanel(c);

    initComponent(c);

    }

    private void createLeftPanel(LayoutContainer c) {
    ContentPanel panel = new ContentPanel();
    panel.setBorders(true);
    setShim(true);
    panel.add(new Label("Left Panel"));

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.WEST);
    data.setSplit(true);
    data.setCollapsible(true);
    data.setMargins(new Margins(DEFAULT_PANEL_SPACING));
    c.add(panel, data);
    }

    private void createCenterPanel(LayoutContainer c) {
    ContentPanel panel = new ContentPanel();
    panel.setBorders(true);
    panel.setShim(true);
    panel.add(new Label("Center Panel"));

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(DEFAULT_PANEL_SPACING));
    c.add(panel, data);
    }

    private void createRightPanel(LayoutContainer c) {
    ContentPanel panel = new ContentPanel();
    panel.setBorders(true);
    panel.add(new Label("Right Panel"));
    panel.setShim(true);
    BorderLayoutData data = new BorderLayoutData(LayoutRegion.EAST);
    data.setCollapsible(true);
    data.setSplit(true);
    data.setMargins(new Margins(DEFAULT_PANEL_SPACING));
    c.add(panel, data);
    }



    }

  4. #4
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default


    Sven,

    Any thoughts?

  5. #5
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    That is a feature and not a bug. CLOSED.

    Also please note that there is no reason to bump i thread after a few hours.

  6. #6
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default


    Ummm, its not a feature. If I expand the west region after its collapsed and the panel is visible, the borders around the content for the west region disappears. How is that a feature??

    If you cannot help me then please provide someone else's name that can.

    Thanks,
    J.D.

  7. #7
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    If you want to expand it again, than you have to click the expand tool. Clicking anywhere else will bring up a floating window.

  8. #8
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default


    You are not following me. When I expand it after the floating content window is displayed, the content window disappears, but my borders around the content in the west region (after expansion) no longer renders the borders. Could you please try my code in your local environment and you will see to what I refer.

    J.D.

  9. #9
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is something completly different than your image shows and you are describing in your first post.

  10. #10
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The second reported issue will be fixed with 1.2.5

Thread Participants: 1