Advertisement
Guest User

Untitled

a guest
Dec 30th, 2014
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. package com.example.so9;
  2.  
  3. import javax.servlet.annotation.WebServlet;
  4.  
  5. import com.vaadin.annotations.Theme;
  6. import com.vaadin.annotations.VaadinServletConfiguration;
  7. import com.vaadin.server.VaadinRequest;
  8. import com.vaadin.server.VaadinServlet;
  9. import com.vaadin.ui.CssLayout;
  10. import com.vaadin.ui.UI;
  11.  
  12. @SuppressWarnings("serial")
  13. @Theme("so9")
  14. public class So9UI extends UI {
  15.  
  16. @WebServlet(value = "/*", asyncSupported = true)
  17. @VaadinServletConfiguration(productionMode = false, ui = So9UI.class)
  18. public static class Servlet extends VaadinServlet {
  19. }
  20.  
  21. @Override
  22. protected void init(VaadinRequest request) {
  23. CssLayout layout = new CssLayout();
  24. setContent(layout);
  25. CssLayout appLayout = new CssLayout();
  26. MyTable table = new MyTable();
  27. Bar bar = new Bar();
  28. appLayout.addComponent(table);
  29. layout.addComponent(bar);
  30. layout.addComponent(appLayout);
  31. }
  32.  
  33. }
  34.  
  35. package com.example.so9;
  36.  
  37. import com.vaadin.ui.Table;
  38.  
  39. public class MyTable extends Table
  40. {
  41. public MyTable()
  42. {
  43. setSizeUndefined();
  44. addContainerProperty("1", Object.class, null);
  45. addContainerProperty("2", Object.class, null);
  46. addContainerProperty("3", Object.class, null);
  47. addContainerProperty("4", Object.class, null);
  48. addContainerProperty("5", Object.class, null);
  49. addContainerProperty("6", Object.class, null);
  50. for (int i = 0; i < 100; i++)
  51. {
  52. addItem(new Object[] { "a", "b", "c", "d", "e", "f" }, new Integer(i));
  53. }
  54. }
  55. }
  56.  
  57. package com.example.so9;
  58.  
  59. import com.vaadin.ui.Button;
  60. import com.vaadin.ui.CssLayout;
  61.  
  62. public class Bar extends CssLayout
  63. {
  64. public Bar()
  65. {
  66. addStyleName("bar");
  67. addComponent(new Button("Click"));
  68. }
  69. }
  70.  
  71.  
  72. //so9.scss
  73.  
  74. @import "../valo/valo.scss";
  75.  
  76. @mixin so9 {
  77. @include valo;
  78.  
  79. .bar
  80. {
  81. position: fixed;
  82. width: 100%;
  83. height: 80px;
  84. bottom: 100px;
  85. z-index: 100;
  86. opacity: 0.7;
  87. background: blueviolet;
  88. }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement