List of usage examples for com.vaadin.ui VerticalLayout addLayoutClickListener
@Override
public Registration addLayoutClickListener(LayoutClickListener listener)
From source file:probe.com.view.core.PopupInfoBtn.java
private VerticalLayout initPopupLayout(VerticalLayout popupLayout, String header) { VerticalLayout popupBodyWrapper = new VerticalLayout(); popupBodyWrapper.setWidth("100%"); popupBodyWrapper.setHeight("100%"); VerticalLayout popupBodyLayout = new VerticalLayout(); popupBodyLayout.setWidth((popupLayout.getWidth() + 2) + "px"); popupBodyLayout.setHeightUndefined(); popupBodyLayout.setStyleName("pupupbody"); popupBodyLayout.setSpacing(true);//from ww w.ja v a 2s.co m HorizontalLayout titleLayout = new HorizontalLayout(); titleLayout.setWidthUndefined(); titleLayout.setHeight("40px"); popupBodyLayout.addComponent(titleLayout); popupBodyLayout.addLayoutClickListener(this); Label label = new Label("<b>" + header + "</b>"); label.setStyleName("comparisonHeaders"); label.setContentMode(ContentMode.HTML); label.setWidth((popupLayout.getWidth() - 17) + "px"); titleLayout.addComponent(label); VerticalLayout closeBtn = new VerticalLayout(); closeBtn.setWidth("16px"); closeBtn.setHeight("16px"); closeBtn.setStyleName("closepanelbtn"); closeBtn.addLayoutClickListener(this); titleLayout.addComponent(closeBtn); titleLayout.setComponentAlignment(closeBtn, Alignment.TOP_RIGHT); popupLayout.setMargin(true); popupLayout.setSpacing(true); popupBodyLayout.addComponent(popupLayout); popupBodyWrapper.addComponent(popupBodyLayout); popupBodyWrapper.setComponentAlignment(popupBodyLayout, Alignment.MIDDLE_CENTER); return popupBodyWrapper; }
From source file:probe.com.view.core.SubTreeHideOnClick.java
/** * * @param title/*from w ww . j av a 2s . c om*/ * @param fullBodyLayout * @param miniBodyLayout * @param view */ public SubTreeHideOnClick(String title, Layout fullBodyLayout, VerticalLayout miniBodyLayout, boolean view) { // title= title.toLowerCase(); this.setMargin(new MarginInfo(false, false, false, false)); this.setWidth("100%"); this.fullBodyLayout = fullBodyLayout; this.fullBodyLayout.setVisible(false); this.miniBodyLayout = miniBodyLayout; titleLayout = new HorizontalLayout(); titleLayout.setHeight("20px"); titleLayout.setSpacing(true); show = new ShowMiniLabel(); show.setHeight("20px"); titleLayout.addComponent(show); titleLayout.setComponentAlignment(show, Alignment.BOTTOM_LEFT); titleLayout.setMargin(true); filterstLabel = new Label(title);//"<h4 style='font-family:verdana;font-weight:bold;'><strong aligen='center' style='font-family:verdana;color:#00000;'>Searching Filters</strong></h4>"); filterstLabel.setContentMode(ContentMode.HTML); filterstLabel.setStyleName("treeNodeLabel"); filterstLabel.setHeight("20px"); titleLayout.addComponent(filterstLabel); titleLayout.setComponentAlignment(filterstLabel, Alignment.TOP_RIGHT); titleLayout.addLayoutClickListener(SubTreeHideOnClick.this); this.addComponent(titleLayout); this.addComponent(this.fullBodyLayout); if (miniBodyLayout != null) { titleLayout.addComponent(this.miniBodyLayout); miniBodyLayout.setStyleName("treeValue"); miniBodyLayout.addLayoutClickListener(SubTreeHideOnClick.this); } if (view) { this.showLayout(); } }
From source file:probe.com.view.core.TipGenerator.java
public VerticalLayout generateTipsBtn() { VerticalLayout tipsIcon = new VerticalLayout(); tipsIcon.setWidth("16px"); tipsIcon.setHeight("16px"); tipsIcon.setDescription("Show tips"); tipsIcon.setStyleName("tipbtn"); tipsIcon.addLayoutClickListener(this); return tipsIcon; }