List of usage examples for com.vaadin.ui PopupView setWidth
@Override public void setWidth(String width)
From source file:eu.fp7.eagle.portal.ui.dashboard.design.impl.ActivitiesDesignImpl.java
License:Apache License
private GridLayout buildResourcesLayout() { gridLayoutResources = new GridLayout(8, 1); gridLayoutResources.setImmediate(false); gridLayoutResources.setWidth("100%"); gridLayoutResources.setHeight("-1px"); gridLayoutResources.setSpacing(true); gridLayoutResources.setCaption("My Resources"); gridLayoutResources.addStyleName("gridLayoutResources"); MarginInfo margin = new MarginInfo(true, false, true, false); gridLayoutResources.setMargin(margin); gridLayoutResources.setSpacing(false); gridLayoutResources.setColumnExpandRatio(7, 1.0f); PopupView popup = new PopupView(null, buildTableActivity("OER", 2, 2)); popup.addStyleName("popupviewActivities"); Button oer = new Button("OER" + " " + "(4)", click -> popup.setPopupVisible(true)); oer.addStyleName("buttonResourcesListAct"); gridLayoutResources.addComponent(oer, 0, 0); //popup.setWidth("100px"); gridLayoutResources.addComponent(popup, 1, 0); PopupView popup2 = new PopupView(null, buildTableActivity("Wiki", 1, 2)); popup2.addStyleName("popupviewActivities"); Button wiki = new Button("Wiki" + " " + "(3)", click -> popup2.setPopupVisible(true)); wiki.addStyleName("buttonResourcesListAct"); gridLayoutResources.addComponent(wiki, 2, 0); popup2.setWidth("100px"); gridLayoutResources.addComponent(popup2, 3, 0); PopupView popup3 = new PopupView(null, buildTableActivity("Blogs", 0, 0)); popup3.addStyleName("popupviewActivities"); Button blogs = new Button("Blogs", click -> popup3.setPopupVisible(false)); blogs.addStyleName("buttonResourcesEmptyAct"); gridLayoutResources.addComponent(blogs, 4, 0); //popup3.setWidth("100px"); gridLayoutResources.addComponent(popup3, 5, 0); PopupView popup4 = new PopupView(null, buildTableActivity("Comments", 5, 5)); popup4.addStyleName("popupviewActivities"); Button comments = new Button("Comments" + " " + "(10)", click -> popup4.setPopupVisible(true)); comments.addStyleName("buttonResourcesListAct"); gridLayoutResources.addComponent(comments, 6, 0); //popup4.setWidth("100px"); gridLayoutResources.addComponent(popup4, 7, 0); return gridLayoutResources; }