Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mycompany.controller; import com.vaadin.server.Sizeable.Unit; import com.vaadin.ui.Grid; import com.vaadin.ui.Grid.FooterRow; /** * * @author Linda */ public class cartGrid { Grid grid; public cartGrid() { } public Grid getCartGrid() { grid = new Grid("Kosr"); //nv grid.setSelectionMode(Grid.SelectionMode.MULTI); //tbb cella kijellse grid.setStyleName("cart"); //stlus grid.addColumn("Nap", String.class); //oszloptpusok grid.addColumn("tel", String.class); grid.addColumn("?r", Integer.class); grid.addColumn("Mennyisg", Integer.class); grid.getColumn("Nap").setSortable(false); //rendezs tilts grid.setWidth(100, Unit.PERCENTAGE); //mretezs grid.setHeight("645px"); return grid; } public FooterRow getFooter() { FooterRow footer = grid.appendFooterRow(); //lblc hozzads footer.setStyleName("footer"); grid.setFooterVisible(true); footer.getCell("Mennyisg").setText(""); footer.getCell("?r").setText("sszeg:"); return footer; } }