summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-09-15 09:02:56 +0300
committerDenis Anisimov <denis@vaadin.com>2016-09-20 13:17:13 +0300
commit8939d3257f2f48ce5525b908c3d3450cee837aaf (patch)
tree92bec14e4b81506067e46ab89b35c0fe79032fb8 /uitest
parentc6e195aa63d1dfd4568453bcb33b40c332f1b953 (diff)
downloadvaadin-framework-8939d3257f2f48ce5525b908c3d3450cee837aaf.tar.gz
vaadin-framework-8939d3257f2f48ce5525b908c3d3450cee837aaf.zip
Move ItemCaptionProvider out of ComboBox (#184).
Change-Id: I7dc98de04127c7495aed81b9e0cd2be8cb12b10c
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsWaiAria.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java2
7 files changed, 9 insertions, 9 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
index df093a2976..1f4d67c1d5 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxDuplicateCaption.java
@@ -33,7 +33,7 @@ public class ComboBoxDuplicateCaption extends TestBase {
log.log("Person = " + p.getFirstName() + " " + p.getLastName());
});
box.setItems(list);
- box.setItemCaptionProvider(Person::getLastName);
+ box.setItemCaptionGenerator(Person::getLastName);
addComponent(log);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java
index 3de97dc46c..1f0ebf2f1c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java
@@ -12,7 +12,7 @@ public class ComboBoxIdenticalItems extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
final ComboBox<String> select = new ComboBox<>("ComboBox");
- select.setItemCaptionProvider(
+ select.setItemCaptionGenerator(
item -> item.startsWith("one") ? "One" : "Two");
select.setItems("one-1", "one-2", "two");
select.setEmptySelectionAllowed(false);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
index 4cc8ca7919..711c20a398 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/Comboboxes.java
@@ -50,7 +50,7 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
"Undefined wide select with 50 items");
s4.setWidth(null);
populate(s4, 50);
- s4.setItemCaptionProvider(StringBean::getValue);
+ s4.setItemCaptionGenerator(StringBean::getValue);
s4.setScrollToSelectedItem(true);
addTestComponent(s4);
@@ -72,14 +72,14 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
"200px wide select with 50 items");
s8.setWidth("200px");
populate(s8, 50);
- s8.setItemCaptionProvider(StringBean::getValue);
+ s8.setItemCaptionGenerator(StringBean::getValue);
addTestComponent(s8);
ComboBox<StringBean> s9 = new PageLength0ComboBox();
s9.setImmediate(true);
s9.setCaption("Pagelength 0");
populate(s9, 15);
- s9.setItemCaptionProvider(StringBean::getValue);
+ s9.setItemCaptionGenerator(StringBean::getValue);
addTestComponent(s9);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
index 6cbfc42ab8..c0607d49ed 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/PopUpWidth.java
@@ -26,7 +26,7 @@ public class PopUpWidth extends TestBase {
cb.setItems(items);
cb.setItemIconProvider(
item -> new ThemeResource("../runo/icons/16/users.png"));
- cb.setItemCaptionProvider(item -> "Item " + item);
+ cb.setItemCaptionGenerator(item -> "Item " + item);
return cb;
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsWaiAria.java b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsWaiAria.java
index c2df9a2cbe..e35304aa74 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsWaiAria.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/notification/NotificationsWaiAria.java
@@ -69,7 +69,7 @@ public class NotificationsWaiAria extends AbstractTestUI {
items.put(Notification.Type.TRAY_NOTIFICATION, "Tray");
items.put(Notification.Type.ASSISTIVE_NOTIFICATION, "Assistive");
- type.setItemCaptionProvider(item -> items.get(item));
+ type.setItemCaptionGenerator(item -> items.get(item));
type.setItems(items.keySet());
type.setValue(items.keySet().iterator().next());
diff --git a/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java b/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
index ad98a4b38a..399913778e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/select/EnumSelect.java
@@ -37,7 +37,7 @@ public class EnumSelect extends AbstractTestUIWithLog {
setLocale(new Locale("fi", "FI"));
ComboBox<Constant> cb = new ComboBox<>(null,
Arrays.asList(Constant.values()));
- cb.setItemCaptionProvider(value -> StringToEnumConverter
+ cb.setItemCaptionGenerator(value -> StringToEnumConverter
.enumToString(value, getLocale()));
addComponent(cb);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
index 0288eafad5..ec735cfa3c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaximizeRestoreTest.java
@@ -29,7 +29,7 @@ public class WindowMaximizeRestoreTest extends AbstractTestUI {
addWindowAgain = new ComboBox<>("Add Window Again");
addWindowAgain
- .setItemCaptionProvider(window -> window.getData().toString());
+ .setItemCaptionGenerator(window -> window.getData().toString());
addWindowAgain.addValueChangeListener(event -> {
Object value = event.getValue();
if (value != null && value instanceof Window) {