List of usage examples for com.vaadin.ui VerticalLayout setMargin
@Override public void setMargin(boolean enabled)
From source file:com.saax.gestorweb.view.ChatView.java
/** * Chat Pop-Up//from w w w .j ava2 s .c o m * */ public ChatView() { super(); setCaption(messages.getString("ChatView.titulo")); setModal(true); setWidth("80%"); setHeight("80%"); setResizable(false); VerticalLayout container = new VerticalLayout(); container.setMargin(true); container.setWidth("100%"); container.setHeight("100%"); setContent(container); userLogged = (Usuario) GestorSession.getAttribute(SessionAttributesEnum.USUARIO_LOGADO); HorizontalLayout hlayout = new HorizontalLayout(); // Have a horizontal split panel as its content hsplit = new HorizontalSplitPanel(); hsplit.setSizeFull(); // Put a component in the left panel hsplit.setFirstComponent(containerUserTable()); hsplit.getFirstComponent().setWidth("100%"); // A static variable so that everybody gets the same instance. //accordion container.addComponent(hsplit); accordion = new Accordion(); accordion.setWidth("100%"); accordion.addTab(buildAttachTable(), "Anexos", null); container.addComponent(accordion); //container.addComponent(buildAttachTable()); }
From source file:com.save.area.AddLocationToAreaWindow.java
VerticalLayout getVlayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();/* w w w . j ava 2 s . c o m*/ vlayout.setMargin(true); vlayout.setSpacing(true); area.setInputPrompt("Select Area.."); area.setNullSelectionAllowed(false); vlayout.addComponent(area); province.setInputPrompt("Select Province.."); province.addValueChangeListener(new ProvincePropertyChangeListener(city)); vlayout.addComponent(province); city.setInputPrompt("Select City.."); city.setWidth("100%"); vlayout.addComponent(city); Button addBtn = new Button("ADD LOCATION TO AREA"); addBtn.setWidth("100%"); addBtn.addClickListener(addBtnListener); vlayout.addComponent(addBtn); return vlayout; }
From source file:com.save.area.AddNewCityWindow.java
VerticalLayout getVlayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();// w w w . ja v a 2 s .c o m vlayout.setMargin(true); vlayout.setSpacing(true); province.setInputPrompt("Select Province.."); province.setWidth("100%"); vlayout.addComponent(province); cityField.setWidth("100%"); vlayout.addComponent(cityField); Button addCityBtn = new Button("ADD CITY"); addCityBtn.setWidth("100%"); addCityBtn.addClickListener(addCityBtnListener); vlayout.addComponent(addCityBtn); return vlayout; }
From source file:com.save.area.AddNewProvinceWindow.java
VerticalLayout getVlayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();/* ww w .j ava 2 s . c o m*/ vlayout.setMargin(true); vlayout.setSpacing(true); provinceField.setWidth("100%"); vlayout.addComponent(provinceField); Button provinceBtn = new Button("ADD PROVINCE"); provinceBtn.setWidth("100%"); provinceBtn.addClickListener(addProvinceBtnListener); vlayout.addComponent(provinceBtn); return vlayout; }
From source file:com.save.area.AreaUI.java
ComponentContainer getHlayoutWithBtn() { VerticalLayout buttonsLayout = new VerticalLayout(); buttonsLayout.setMargin(new MarginInfo(true, false, false, false)); Button addBtn = new AreaButton("ADD LOCATION TO AREA"); buttonsLayout.addComponent(addBtn);// ww w . j ava2s .co m addBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(addBtn, Alignment.MIDDLE_LEFT); Button createBtn = new AreaButton("CREATE NEW AREA"); buttonsLayout.addComponent(createBtn); createBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(createBtn, Alignment.MIDDLE_LEFT); Button editBtn = new AreaButton("EDIT AREA"); buttonsLayout.addComponent(editBtn); editBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(editBtn, Alignment.MIDDLE_LEFT); Button deleteBtn = new AreaButton("DELETE AREA"); buttonsLayout.addComponent(deleteBtn); deleteBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(deleteBtn, Alignment.MIDDLE_LEFT); Button addProvinceBtn = new AreaButton("ADD PROVINCE"); buttonsLayout.addComponent(addProvinceBtn); addProvinceBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(addProvinceBtn, Alignment.MIDDLE_LEFT); Button addCityBtn = new AreaButton("ADD CITY"); buttonsLayout.addComponent(addCityBtn); addCityBtn.addClickListener(actionBtnListener); buttonsLayout.setComponentAlignment(addCityBtn, Alignment.MIDDLE_LEFT); return buttonsLayout; }
From source file:com.save.area.CreateNewAreaWindow.java
VerticalLayout getVlayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();/* w ww . jav a 2 s .c om*/ vlayout.setMargin(true); vlayout.setSpacing(true); final TextField areaField = new TextField("Create Area: "); areaField.setWidth("100%"); areaField.setRequired(true); areaField.setRequiredError("*Required Field"); vlayout.addComponent(areaField); Button createBtn = new Button("CREATE NEW AREA"); createBtn.setWidth("100%"); createBtn.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (as.isAreaExist(areaField.getValue().trim().toLowerCase())) { Notification.show("Area already Exist!", Notification.Type.WARNING_MESSAGE); return; } if (areaField.getValue() == null || areaField.getValue().trim().isEmpty()) { Notification.show("Area Field cannot be empty!", Notification.Type.ERROR_MESSAGE); return; } boolean result = as.createNewArea(areaField.getValue().trim().toLowerCase()); if (result) { Notification.show("Done!"); close(); } } }); createBtn.setImmediate(true); vlayout.addComponent(createBtn); return vlayout; }
From source file:com.save.area.DeleteAreaWindow.java
VerticalLayout getLayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();/*from ww w .j av a 2 s . co m*/ vlayout.setMargin(true); vlayout.setSpacing(true); vlayout.addComponent(area); Button deleteBtn = new Button("DELETE", this); deleteBtn.setWidth("100%"); vlayout.addComponent(deleteBtn); return vlayout; }
From source file:com.save.area.EditAreaWindow.java
VerticalLayout getVlayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSizeFull();/* w w w .j ava 2 s . c o m*/ vlayout.setMargin(true); vlayout.setSpacing(true); area.setInputPrompt("Select Area.."); area.addValueChangeListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { areaField.setValue(area.getItemCaption(event.getProperty().getValue())); } }); vlayout.addComponent(area); areaField.setWidth("100%"); vlayout.addComponent(areaField); editAreaBtn.setWidth("100%"); editAreaBtn.addClickListener(editBtnListener); vlayout.addComponent(editAreaBtn); return vlayout; }
From source file:com.save.client.promodeals.PDDataGridProperties.java
Window delete(Object itemId, int promoId) { Window sub = new Window("REMOVE PROMO DEAL"); sub.setWidth("250px"); sub.setModal(true);//from w w w. j a va 2 s . com sub.center(); VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true); Button delBtn = new Button("CONFIRM DELETE?", (Button.ClickEvent event) -> { boolean result = pds.delete(promoId, "removed"); getContainerDataSource().removeItem(itemId); sub.close(); }); delBtn.setWidth("100%"); delBtn.addStyleName(ValoTheme.BUTTON_PRIMARY); delBtn.addStyleName(ValoTheme.BUTTON_SMALL); v.addComponent(delBtn); sub.setContent(v); return sub; }
From source file:com.save.client.RemoveAccountWindow.java
VerticalLayout getVLayout() { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSpacing(true);/*from www. ja v a 2s. c om*/ vlayout.setMargin(true); vlayout.setSizeFull(); final TextArea remarks = new TextArea("Remarks: "); remarks.setRows(2); remarks.setWidth("100%"); vlayout.addComponent(remarks); Button removeBtn = new Button("REMOVE ACCOUNT?"); removeBtn.setWidth("100%"); removeBtn.addClickListener((Button.ClickEvent event) -> { if (remarks.getValue() == null || remarks.getValue().trim().isEmpty()) { Notification.show("Add Remarks!", Notification.Type.ERROR_MESSAGE); return; } boolean result = clientService.removeAccount(getClientId(), remarks.getValue().trim().toLowerCase()); if (result) { close(); } }); vlayout.addComponent(removeBtn); return vlayout; }