List of usage examples for com.vaadin.ui VerticalLayout VerticalLayout
public VerticalLayout()
From source file:com.abien.vaadin.helloapp.HelloApp.java
License:Apache License
@Override public void init() { VerticalLayout layout = new VerticalLayout(); layout.setMargin(true);//from w w w . j a va 2s. c om Label header = new Label("Vaadin on Java EE"); header.setStyleName("h1"); layout.addComponent(header); final TextField nameField = new TextField("Input something:"); final Label greetingLbl = new Label(); layout.addComponent(nameField); layout.addComponent( new Button("Say slow Hello, clicking this shouldn't stall other users", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { try { Thread.sleep(20 * 1000); } catch (InterruptedException ex) { Logger.getLogger(HelloApp.class.getName()).log(Level.SEVERE, null, ex); } getMainWindow().showNotification("Hello!"); } })); layout.addComponent(new Button("Say Hello", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { greetingLbl.setCaption(greetingService.sayHello(nameField.getValue().toString())); buttonEvents.fire(event); } })); layout.addComponent(greetingLbl); Window mainWindow = new Window("Vaadin 6.8 - Java EE Integration", layout); setMainWindow(mainWindow); }
From source file:com.anothernode.ballkontrolle.BallkontrolleUI.java
License:Open Source License
@Override protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout(); layout.setMargin(true);/* ww w. j a v a 2 s . com*/ setContent(layout); Label team1Player1 = new Label(""); Label team1Player2 = new Label(""); Label team2Player1 = new Label(""); Label team2Player2 = new Label(""); final Button button = new Button("Draw Teams"); button.addClickListener(event -> { final Drawing drawing = new Drawing(Data.summonPlayers()); team1Player1.setValue(drawing.getTeam1().getPlayer1().toString()); team1Player2.setValue(drawing.getTeam1().getPlayer2().toString()); team2Player1.setValue(drawing.getTeam2().getPlayer1().toString()); team2Player2.setValue(drawing.getTeam2().getPlayer2().toString()); }); layout.addComponent(button); layout.addComponent(new Label("Team 1:")); layout.addComponent(team1Player1); layout.addComponent(team1Player2); layout.addComponent(new Label("Team 2:")); layout.addComponent(team2Player1); layout.addComponent(team2Player2); }
From source file:com.anphat.cms.appparams.ui.DialogCreateAppParams.java
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);/*from www. j av a2 s. c om*/ mainLayout.setWidth("100%"); mainLayout.setHeight("-1px"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("100.0%"); setHeight("-1px"); // gridLayout_1 gridLayout_1 = buildGridLayout_1(); mainLayout.addComponent(gridLayout_1); // horizontalLayout_2 // horizontalLayout_2 = buildHorizontalLayout_2(); // mainLayout.addComponent(horizontalLayout_2); GridManyButton gmb = buildHorizontalLayout_2(); mainLayout.addComponent(gmb); return mainLayout; }
From source file:com.anphat.cms.appparams.ui.SearchAppParamsForm.java
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false);//from w ww .j a v a 2 s.c o m mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); mainLayout.setMargin(true); mainLayout.setSpacing(true); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // gridLayout_1 gridLayout_1 = buildGridLayout_1(); mainLayout.addComponent(gridLayout_1); return mainLayout; }
From source file:com.anphat.customer.ui.CustomerContactForm.java
private void buildTabContact() { layoutContact = new VerticalLayout(); tblContact = new CommonTableFilterPanel(); layoutContact.addComponent(tblContact); tabContact.addTab(layoutContact, "Lin h"); }
From source file:com.anphat.customer.ui.CustomerContactForm.java
private void buildTabHistory() { layoutHistory = new VerticalLayout(); tblHistory = new CommonTableFilterPanel(); layoutHistory.addComponent(tblHistory); tabContact.addTab(layoutHistory, BundleUtils.getString("label.history.care.caption")); }
From source file:com.anphat.customer.ui.CustomerContactForm.java
private void buildTabCustomerStatus() { layoutCustomerStatus = new VerticalLayout(); tblCustomerStatus = new CommonTableFilterPanel(); tblCustomerStatus.getToolbar().setVisible(false); layoutCustomerStatus.addComponent(tblCustomerStatus); tabContact.addTab(layoutCustomerStatus, "Trng thi dch v"); }
From source file:com.anphat.customer.ui.CustomerDetailForm.java
private void buildRootLayout() { root = new VerticalLayout(); root.setImmediate(false);/*from www .j a va 2 s .c om*/ root.setWidth("100%"); root.setHeight("100%"); root.setMargin(false); root.setSpacing(false); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); //Khoi tao cac thanh phan gridCustDetail = buildGridDetail(); //Them cac thanh phan vao grid root.addComponent(gridCustDetail); setCompositionRoot(root); }
From source file:com.anphat.customer.ui.CustomerDetailForm.java
private void buildTabTermInformation() { layoutTermInfor = new VerticalLayout(); tblTermInfor = new CommonTableFilterPanel(); tblTermInfor.getToolbar().setVisible(false); root.addComponent(tblTermInfor);//from w ww. j av a 2 s.c o m // layoutTermInfor.addComponent(tblTermInfor); // tabSheet.addTab(layoutTermInfor, "Thng tin hn"); }
From source file:com.anphat.customer.ui.ImportCustomerUploadForm.java
private void buildRootLayout() { root = new VerticalLayout(); root.setImmediate(false);/*from w w w .j a v a 2 s . c o m*/ root.setWidth("100%"); root.setHeight("100%"); root.setMargin(true); root.setSpacing(true); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); //Khoi tao cac thanh phan uploadInfoLayout = buildGridUpload(); buildGridTermInfo(); tblUploadCommon = new CommonTableFilterPanel(); tblUploadTerm = new CommonTableFilterPanel(); GridManyButton gridBtnUpload = new GridManyButton(new String[] { Constants.BUTTON_UPLOAD }); btnUpload = gridBtnUpload.getBtnCommon().get(0); GridManyButton gridBtnSave = new GridManyButton(new String[] { Constants.BUTTON_SAVE }); btnSave = gridBtnSave.getBtnCommon().get(0); //Them cac thanh phan vao grid root.addComponent(uploadInfoLayout); root.addComponent(gridTermInfo); root.addComponent(gridBtnUpload); root.addComponent(tblUploadCommon); root.addComponent(tblUploadTerm); // root.addComponent(gridBtnSave); setCompositionRoot(root); }