You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TestForApplicationLayoutThatUsesWholeBrosersSpace.java 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package com.vaadin.tests;
  2. import com.vaadin.server.LegacyApplication;
  3. import com.vaadin.ui.HorizontalSplitPanel;
  4. import com.vaadin.ui.Label;
  5. import com.vaadin.ui.LegacyWindow;
  6. import com.vaadin.ui.VerticalLayout;
  7. import com.vaadin.ui.VerticalSplitPanel;
  8. import com.vaadin.v7.ui.Table;
  9. public class TestForApplicationLayoutThatUsesWholeBrosersSpace
  10. extends LegacyApplication {
  11. LegacyWindow main = new LegacyWindow("Windowing test");
  12. VerticalLayout rootLayout;
  13. VerticalSplitPanel firstLevelSplit;
  14. @Override
  15. public void init() {
  16. setMainWindow(main);
  17. rootLayout = new VerticalLayout();
  18. main.setContent(rootLayout);
  19. rootLayout.addComponent(new Label("header"));
  20. firstLevelSplit = new VerticalSplitPanel();
  21. final HorizontalSplitPanel secondSplitPanel = new HorizontalSplitPanel();
  22. secondSplitPanel.setFirstComponent(new Label("left"));
  23. final VerticalLayout topRight = new VerticalLayout();
  24. topRight.addComponent(new Label("topright header"));
  25. final Table t = TestForTablesInitialColumnWidthLogicRendering
  26. .getTestTable(4, 100);
  27. t.setSizeFull();
  28. topRight.addComponent(t);
  29. topRight.setExpandRatio(t, 1);
  30. topRight.addComponent(new Label("topright footer"));
  31. secondSplitPanel.setSecondComponent(topRight);
  32. final VerticalLayout el = new VerticalLayout();
  33. el.addComponent(new Label("B��"));
  34. firstLevelSplit.setFirstComponent(secondSplitPanel);
  35. firstLevelSplit.setSecondComponent(el);
  36. rootLayout.addComponent(firstLevelSplit);
  37. rootLayout.setExpandRatio(firstLevelSplit, 1);
  38. rootLayout.addComponent(new Label("footer"));
  39. }
  40. }