Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.so9;
- import javax.servlet.annotation.WebServlet;
- import com.vaadin.annotations.Theme;
- import com.vaadin.annotations.VaadinServletConfiguration;
- import com.vaadin.server.VaadinRequest;
- import com.vaadin.server.VaadinServlet;
- import com.vaadin.ui.CssLayout;
- import com.vaadin.ui.UI;
- @SuppressWarnings("serial")
- @Theme("so9")
- public class So9UI extends UI {
- @WebServlet(value = "/*", asyncSupported = true)
- @VaadinServletConfiguration(productionMode = false, ui = So9UI.class)
- public static class Servlet extends VaadinServlet {
- }
- @Override
- protected void init(VaadinRequest request) {
- CssLayout layout = new CssLayout();
- setContent(layout);
- CssLayout appLayout = new CssLayout();
- MyTable table = new MyTable();
- Bar bar = new Bar();
- appLayout.addComponent(table);
- layout.addComponent(bar);
- layout.addComponent(appLayout);
- }
- }
- package com.example.so9;
- import com.vaadin.ui.Table;
- public class MyTable extends Table
- {
- public MyTable()
- {
- setSizeUndefined();
- addContainerProperty("1", Object.class, null);
- addContainerProperty("2", Object.class, null);
- addContainerProperty("3", Object.class, null);
- addContainerProperty("4", Object.class, null);
- addContainerProperty("5", Object.class, null);
- addContainerProperty("6", Object.class, null);
- for (int i = 0; i < 100; i++)
- {
- addItem(new Object[] { "a", "b", "c", "d", "e", "f" }, new Integer(i));
- }
- }
- }
- package com.example.so9;
- import com.vaadin.ui.Button;
- import com.vaadin.ui.CssLayout;
- public class Bar extends CssLayout
- {
- public Bar()
- {
- addStyleName("bar");
- addComponent(new Button("Click"));
- }
- }
- //so9.scss
- @import "../valo/valo.scss";
- @mixin so9 {
- @include valo;
- .bar
- {
- position: fixed;
- width: 100%;
- height: 80px;
- bottom: 100px;
- z-index: 100;
- opacity: 0.7;
- background: blueviolet;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement