blob: 1faa9667c24f176bf48937aa9513da0513a12b13 (
plain)
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
35
36
|
package com.vaadin.tests.components.table;
import com.vaadin.data.Item;
import com.vaadin.server.ClassResource;
import com.vaadin.server.Resource;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Table;
public class TableItemIcon extends TestBase {
@Override
protected Integer getTicketNumber() {
return 2457;
}
@Override
protected String getDescription() {
return "The items in the Table should have icons in the first column (rowheader).";
}
@Override
protected void setup() {
Table table = new Table();
table.addContainerProperty("icon", Resource.class, null);
table.setItemIconPropertyId("icon");
table.setRowHeaderMode(Table.ROW_HEADER_MODE_ICON_ONLY);
getLayout().addComponent(table);
Item item = table.addItem("FI");
item.getItemProperty("icon").setValue(new ClassResource("fi.gif"));
item = table.addItem("SE");
item.getItemProperty("icon").setValue(new ClassResource("se.gif"));
}
}
|