VerticalLayout leftContainer = new VerticalLayout(); leftContainer.setWidth("100%"); leftContainer.setHeight("100%"); splitPane.setFirstComponent(leftContainer); HorizontalLayout filtroPanel = new HorizontalLayout(); leftContainer.addComponent(filtroPanel); filtroPanel.setSpacing(true); // Filtro TextField filtro = new TextField("FILTRO"); filtro.setWidth("200px"); filtroPanel.addComponent(filtro); // Bar code TextField barCode = new TextField("DA LETTORE"); barCode.setWidth("200px"); filtroPanel.addComponent(barCode); // Bottone ricarica Button ricarica = new Button(); ricarica.setIcon(new ThemeResource("icons/update.png")); ricarica.setDescription("Ricarica elenco clienti"); filtroPanel.addComponent(ricarica); filtroPanel.setComponentAlignment(ricarica, Alignment.BOTTOM_CENTER); // Label Per spazio Label dummy = new Label(); dummy.setWidth("30px"); filtroPanel.addComponent(dummy); // Nuovo Button nuovo = new Button(); nuovo.setIcon(new ThemeResource("icons/archive-user.png")); nuovo.setDescription("Aggiungi un cliente"); filtroPanel.addComponent(nuovo); filtroPanel.setComponentAlignment(nuovo, Alignment.BOTTOM_CENTER); // Tabella clientiContainer = new BeanItemContainer(ClienteDTO.class); tableClienti = new Table(); leftContainer.addComponent(tableClienti); tableClienti.setSizeFull(); tableClienti.setImmediate(true); tableClienti.setSelectable(true); tableClienti.setContainerDataSource(clientiContainer); tableClienti.setVisibleColumns(new Object[] {}); tableClienti.setColumnHeaders(new String[] {}); tableClienti.addGeneratedColumn("des", new Table.ColumnGenerator() { @Override public Object generateCell(Table source, Object itemId, Object columnId) { BeanItem item = clientiContainer.getItem(itemId); ClienteDTO current = item.getBean(); String s = "
" + current.getAnraso() + "
Indirizzo:" + current.getAnindi() + "
Citta\':" + current.getAncitt() + "
"; Label lab = new Label(s, ContentMode.HTML); lab.setHeight("50px"); return lab; } }); tableClienti.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);