Reputation: 43
Like Need GWT SplitLayoutPanel to have max size, dragging is very jumpy I am wondering why the right and the southern splitters jump (tested in IE9; both, web and hosted mode) when trying to drag the splitters in the following example:
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);
}
}
Any ideas?
Upvotes: 0
Views: 539
Reputation: 43
So here is one possible solution:
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);
}
}
Upvotes: 0
Reputation: 3380
Take a look at this answer in
Need GWT SplitLayoutPanel to have max size, dragging is very jumpy
I hope this solves your issue as well, good luck
Upvotes: 1