1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
...
public void init()
{
Window mainWindow = new Window("Tableau");
Table tab = new Table("Détais des Factures");
tab.setSelectable(true);
tab.setImmediate(true);
tab.addContainerProperty("Article", String.class, null);
tab.addContainerProperty("Désignation", String.class, null);
tab.addContainerProperty("Qté", Integer.class, null);
tab.addContainerProperty("Prix", Integer.class, null);
tab.addContainerProperty("Prix Toral", Integer.class, null);
tab.addItem(new Object[]{"Chemise","Chemise demi-manche",1,130,130},1);
tab.addItem(new Object[] {"Pull","Pull blanc",5,15,75}, 2);
tab.addItem(new Object[]{"Robe","Robe demi-manche",10,250,2500},3);
tab.addItem(new Object[] {"Pantallon","Pantallon bleu",5,110,550}, 4);
tab.addItem(new Object[]{"Ceinture","Ceinture en cuir",3,250,750},5);
tab.addItem(new Object[] {"Casquette","Casquette blanc",8,25,200}, 6);
tab.addListener(new Table.ValueChangeListener()
{
public void valueChange(ValueChangeEvent event)
{
mainWindow.showNotification("Article = " + tab.getValue());
}
});
mainWindow.addComponent(tab);
setMainWindow(mainWindow);
} |
Partager