</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.components.combobox.ComboBoxItemIcon</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxItemIcon?restartApplication</td>
<td></td>
</tr>
<tr>
<tr>
<td>screenCapture</td>
<td></td>
- <td></td>
+ <td>first-combobox-open</td>
</tr>
<tr>
<td>click</td>
<tr>
<td>screenCapture</td>
<td></td>
+ <td>fi-hu-selected</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[2]</td>
+ <td>12,17</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>second-combobox-open</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item2</td>
+ <td>32,10</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
<td></td>
+ <td>fi-au-selected</td>
</tr>
-
</tbody></table>
</body>
</html>
@Override
protected String getDescription() {
- return "The items in the ComboBox should have icons - also when selected.";
+ return "All items in the ComboBoxes should have icons.";
}
@Override
protected void setup() {
- ComboBox cb = new ComboBox();
- cb.addContainerProperty("icon", Resource.class, null);
- cb.setItemIconPropertyId("icon");
- getLayout().addComponent(cb);
-
- Item item = cb.addItem("FI");
- item.getItemProperty("icon").setValue(
- new ThemeResource("../sampler/flags/fi.gif"));
- item = cb.addItem("SE");
- item.getItemProperty("icon").setValue(
- new ThemeResource("../sampler/flags/se.gif"));
-
+ {
+ ComboBox cb = new ComboBox();
+ cb.addContainerProperty("icon", Resource.class, null);
+ cb.setItemIconPropertyId("icon");
+
+ Item item = cb.addItem("FI");
+ item.getItemProperty("icon").setValue(
+ new ThemeResource("../sampler/flags/fi.gif"));
+ item = cb.addItem("SE");
+ item.getItemProperty("icon").setValue(
+ new ThemeResource("../sampler/flags/se.gif"));
+
+ addComponent(cb);
+ }
+ {
+ ComboBox cb = new ComboBox();
+ cb.addContainerProperty("icon", Resource.class, null);
+ cb.setItemIconPropertyId("icon");
+
+ Item item = cb.addItem("Finland");
+ item.getItemProperty("icon").setValue(
+ new ThemeResource("../sampler/flags/fi.gif"));
+ item = cb.addItem("Australia");
+ item.getItemProperty("icon").setValue(
+ new ThemeResource("../sampler/flags/au.gif"));
+ item = cb.addItem("Hungary");
+ item.getItemProperty("icon").setValue(
+ new ThemeResource("../sampler/flags/hu.gif"));
+
+ cb.setValue("Hungary");
+ addComponent(cb);
+ }
}
}