0

就像需要 GWT SplitLayoutPanel 具有最大尺寸一样,拖动非常跳跃我想知道为什么在以下示例中尝试拖动拆分器时,右侧和南部的拆分器会跳跃(在 IE9 中测试;包括 Web 和托管模式):

public class SplitLayoutPanelTest implements EntryPoint {
    public void onModuleLoad() {
        final SplitLayoutPanel p = new SplitLayoutPanel(5);
        p.setSize(Window.getClientWidth()+"px", Window.getClientHeight()+"px");
        final Frame fWest = new Frame("http://bsd.org");
        fWest.setSize("400px", "200px");
        p.insertWest(fWest, 400, null);
        final Frame fEast = new Frame("http://www.linux.org");
        fEast.setSize("90px", "90px");
        p.insertEast(fEast, 100, null);
        final Frame fNorth = new Frame("http://www.w3c.org");
        fNorth.setSize("80px", "80px");
        p.insertNorth(fNorth, 100, null);
        final Frame fSouth = new Frame("http://www.sqlite.org");
        fSouth.setSize("85px", "85px");
        p.insertSouth(fSouth, 100, null);
        final Frame fCenter = new Frame("http://www.gnu.org");
        fCenter.setSize("75px", "75px");
        p.insert(fCenter, Direction.CENTER, 200, null);
        RootPanel.get().add(p);
    }
}

有任何想法吗?

4

2 回答 2

1

看看这个答案

需要 GWT SplitLayoutPanel 具有最大尺寸,拖动非常跳跃

我希望这也能解决你的问题,祝你好运

于 2012-12-18T18:17:00.793 回答
0

因此,这是一种可能的解决方案:

public class SplitLayoutPanelTest implements EntryPoint {
    public void onModuleLoad() {
        final SplitLayoutPanel p = new SplitLayoutPanel(5);
        p.setSize(Window.getClientWidth()+"px", Window.getClientHeight()+"px");

        final Frame fWest = new Frame("http://bsd.org");
        final VerticalPanel pWest = new VerticalPanel();
        pWest.setSize("100%", "100%");
        pWest.add(fWest);
        p.insertWest(pWest, 400, null);
        fWest.setSize("400px", "200px");

        final Frame fEast = new Frame("http://www.linux.org");
        final VerticalPanel pEast = new VerticalPanel();
        pEast.setSize("100%", "100%");
        pEast.add(fEast);
        p.insertEast(pEast, 100, null);
        fEast.setSize("90px", "90px");

        final Frame fNorth = new Frame("http://www.w3c.org");
        final VerticalPanel pNorth = new VerticalPanel();
        pNorth.setSize("100%", "100%");
        pNorth.add(fNorth);
        p.insertNorth(pNorth, 100, null);
        fNorth.setSize("80px", "80px");

        final Frame fSouth = new Frame("http://www.sqlite.org");
        final VerticalPanel pSouth = new VerticalPanel();
        pSouth.setSize("100%", "100%");
        pSouth.add(fSouth);
        p.insertSouth(pSouth, 100, null);
        fSouth.setSize("85px", "85px");

        final Frame fCenter = new Frame("http://www.gnu.org");
        final VerticalPanel pCenter = new VerticalPanel();
        pCenter.setSize("100%", "100%");
        pCenter.add(fCenter);
        p.insert(pCenter, Direction.CENTER, 200, null);
        fCenter.setSize("75px", "75px");

        RootPanel.get().add(p);
    }
}
于 2012-12-19T17:09:24.300 回答