summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/event/SelectionEvent.java (renamed from server/src/main/java/com/vaadin/event/SelectionEvent.java)5
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java6
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java4
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/MultiSelectionModelTest.java4
-rw-r--r--compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/SingleSelectionModelTest.java4
-rw-r--r--server/src/main/java/com/vaadin/event/selection/MultiSelectionEvent.java9
-rw-r--r--server/src/main/java/com/vaadin/event/selection/SelectionEvent.java43
-rw-r--r--server/src/main/java/com/vaadin/event/selection/SingleSelectionChange.java12
-rw-r--r--server/src/test/java/com/vaadin/event/selection/SelectionEventTest.java68
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java4
17 files changed, 157 insertions, 30 deletions
diff --git a/server/src/main/java/com/vaadin/event/SelectionEvent.java b/compatibility-server/src/main/java/com/vaadin/v7/event/SelectionEvent.java
index b5a4d587e6..b2378b01f1 100644
--- a/server/src/main/java/com/vaadin/event/SelectionEvent.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/event/SelectionEvent.java
@@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package com.vaadin.event;
+package com.vaadin.v7.event;
import java.io.Serializable;
import java.util.Collection;
@@ -29,6 +29,7 @@ import java.util.Set;
* @since 7.4
* @author Vaadin Ltd
*/
+@Deprecated
public class SelectionEvent extends EventObject {
private LinkedHashSet<Object> oldSelection;
@@ -98,6 +99,7 @@ public class SelectionEvent extends EventObject {
* The listener interface for receiving {@link SelectionEvent
* SelectionEvents}.
*/
+ @Deprecated
public interface SelectionListener extends Serializable {
/**
* Notifies the listener that the selection state has changed.
@@ -112,6 +114,7 @@ public class SelectionEvent extends EventObject {
* The interface for adding and removing listeners for {@link SelectionEvent
* SelectionEvents}.
*/
+ @Deprecated
public interface SelectionNotifier extends Serializable {
/**
* Registers a new selection listener
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
index f7bcd8075f..e213d7d585 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java
@@ -45,9 +45,6 @@ import org.jsoup.select.Elements;
import com.vaadin.data.sort.Sort;
import com.vaadin.data.sort.SortOrder;
import com.vaadin.event.ContextClickEvent;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
-import com.vaadin.event.SelectionEvent.SelectionNotifier;
import com.vaadin.event.SortEvent;
import com.vaadin.event.SortEvent.SortListener;
import com.vaadin.event.SortEvent.SortNotifier;
@@ -92,8 +89,11 @@ import com.vaadin.v7.data.util.IndexedContainer;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.data.util.converter.ConverterUtil;
import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.SelectionEvent;
import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
import com.vaadin.v7.event.ItemClickEvent.ItemClickNotifier;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
+import com.vaadin.v7.event.SelectionEvent.SelectionNotifier;
import com.vaadin.v7.server.communication.data.DataGenerator;
import com.vaadin.v7.server.communication.data.RpcDataProviderExtension;
import com.vaadin.v7.shared.ui.grid.EditorClientRpc;
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java
index e3eb01e273..afc38a4201 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridSelectionTest.java
@@ -24,9 +24,9 @@ import java.util.Collection;
import org.junit.Before;
import org.junit.Test;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
import com.vaadin.v7.ui.Grid.SelectionModel;
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/MultiSelectionModelTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/MultiSelectionModelTest.java
index 7a658fd31f..f30b5ea141 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/MultiSelectionModelTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/MultiSelectionModelTest.java
@@ -24,10 +24,10 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.MultiSelectionModel;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/SingleSelectionModelTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/SingleSelectionModelTest.java
index d81bf62c02..e18c5bbe8b 100644
--- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/SingleSelectionModelTest.java
+++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/SingleSelectionModelTest.java
@@ -20,10 +20,10 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
import com.vaadin.v7.ui.Grid.SingleSelectionModel;
diff --git a/server/src/main/java/com/vaadin/event/selection/MultiSelectionEvent.java b/server/src/main/java/com/vaadin/event/selection/MultiSelectionEvent.java
index 1de911f353..c79b405523 100644
--- a/server/src/main/java/com/vaadin/event/selection/MultiSelectionEvent.java
+++ b/server/src/main/java/com/vaadin/event/selection/MultiSelectionEvent.java
@@ -16,6 +16,7 @@
package com.vaadin.event.selection;
import java.util.Collections;
+import java.util.Optional;
import java.util.Set;
import com.vaadin.data.HasValue.ValueChange;
@@ -33,7 +34,8 @@ import com.vaadin.ui.AbstractListing;
* @param <T>
* the data type of the selection model
*/
-public class MultiSelectionEvent<T> extends ValueChange<Set<T>> {
+public class MultiSelectionEvent<T> extends ValueChange<Set<T>>
+ implements SelectionEvent<T> {
private final Set<T> oldSelection;
@@ -75,4 +77,9 @@ public class MultiSelectionEvent<T> extends ValueChange<Set<T>> {
public Set<T> getOldSelection() {
return Collections.unmodifiableSet(oldSelection);
}
+
+ @Override
+ public Optional<T> getFirstSelected() {
+ return getValue().stream().findFirst();
+ }
}
diff --git a/server/src/main/java/com/vaadin/event/selection/SelectionEvent.java b/server/src/main/java/com/vaadin/event/selection/SelectionEvent.java
new file mode 100644
index 0000000000..28b3fd4461
--- /dev/null
+++ b/server/src/main/java/com/vaadin/event/selection/SelectionEvent.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.event.selection;
+
+import java.io.Serializable;
+import java.util.Optional;
+
+/**
+ * A selection event that unifies the way to access to selection event for multi
+ * selection and single selection components (in case when only one selected
+ * item is required).
+ *
+ * @since 8.0
+ * @author Vaadin Ltd
+ * @param <T>
+ * the data type of the selection model
+ */
+public interface SelectionEvent<T> extends Serializable {
+
+ /**
+ * Get first selected data item.
+ * <p>
+ * This is the same as {@link SingleSelectionChange#getSelectedItem()} in
+ * case of single selection and the first selected item from
+ * {@link MultiSelectionEvent#getNewSelection()} in case of multi selection.
+ *
+ * @return the first selected item.
+ */
+ Optional<T> getFirstSelected();
+}
diff --git a/server/src/main/java/com/vaadin/event/selection/SingleSelectionChange.java b/server/src/main/java/com/vaadin/event/selection/SingleSelectionChange.java
index fe120c1692..3f4323b9ac 100644
--- a/server/src/main/java/com/vaadin/event/selection/SingleSelectionChange.java
+++ b/server/src/main/java/com/vaadin/event/selection/SingleSelectionChange.java
@@ -29,7 +29,8 @@ import com.vaadin.ui.AbstractListing;
* the type of the selected item
* @since 8.0
*/
-public class SingleSelectionChange<T> extends ValueChange<T> {
+public class SingleSelectionChange<T> extends ValueChange<T>
+ implements SelectionEvent<T> {
/**
* Creates a new selection change event.
@@ -42,8 +43,8 @@ public class SingleSelectionChange<T> extends ValueChange<T> {
* {@code true} if this event originates from the client,
* {@code false} otherwise.
*/
- public SingleSelectionChange(AbstractListing<T, ?> source,
- T selectedItem, boolean userOriginated) {
+ public SingleSelectionChange(AbstractListing<T, ?> source, T selectedItem,
+ boolean userOriginated) {
super(source, selectedItem, userOriginated);
}
@@ -64,4 +65,9 @@ public class SingleSelectionChange<T> extends ValueChange<T> {
public AbstractListing<T, ?> getSource() {
return (AbstractListing<T, ?>) super.getSource();
}
+
+ @Override
+ public Optional<T> getFirstSelected() {
+ return getSelectedItem();
+ }
}
diff --git a/server/src/test/java/com/vaadin/event/selection/SelectionEventTest.java b/server/src/test/java/com/vaadin/event/selection/SelectionEventTest.java
new file mode 100644
index 0000000000..8ae15f5ad2
--- /dev/null
+++ b/server/src/test/java/com/vaadin/event/selection/SelectionEventTest.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.event.selection;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Optional;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+/**
+ * @author Vaadin Ltd
+ *
+ */
+public class SelectionEventTest {
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Test
+ public void getFirstSelected_mutliSelectEvent() {
+ MultiSelectionEvent<?> event = Mockito.mock(MultiSelectionEvent.class);
+ Mockito.doCallRealMethod().when(event).getFirstSelected();
+
+ Mockito.when(event.getValue())
+ .thenReturn(new LinkedHashSet(Arrays.asList("foo", "bar")));
+
+ Optional<?> selected = event.getFirstSelected();
+
+ Mockito.verify(event).getValue();
+ Assert.assertEquals("foo", selected.get());
+
+ Mockito.when(event.getValue()).thenReturn(Collections.emptySet());
+ Assert.assertFalse(event.getFirstSelected().isPresent());
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Test
+ public void getFirstSelected_singleSelectEvent() {
+ SingleSelectionChange event = Mockito.mock(SingleSelectionChange.class);
+ Mockito.doCallRealMethod().when(event).getFirstSelected();
+
+ Mockito.when(event.getSelectedItem()).thenReturn(Optional.of("foo"));
+
+ Optional<?> selected = event.getSelectedItem();
+
+ Mockito.verify(event).getSelectedItem();
+ Assert.assertEquals("foo", selected.get());
+
+ Mockito.when(event.getSelectedItem()).thenReturn(Optional.empty());
+ Assert.assertFalse(event.getFirstSelected().isPresent());
+ }
+
+}
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
index 527a9cb1d6..b9c1ea65de 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGrid.java
@@ -15,11 +15,11 @@
*/
package com.vaadin.tests.fieldgroup;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.BeanItem;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
public class BasicCrudGrid extends AbstractBasicCrud {
diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
index 477e18c313..f2919b95ac 100644
--- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
+++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
@@ -18,12 +18,12 @@ package com.vaadin.tests.fieldgroup;
import java.text.DateFormat;
import java.util.Locale;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.BeanItem;
import com.vaadin.v7.data.validator.IntegerRangeValidator;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.renderers.DateRenderer;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
index 3932773f4b..54ddbddf59 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridFastAsyncUpdate.java
@@ -7,8 +7,6 @@ import java.util.concurrent.Executors;
import java.util.logging.Level;
import com.vaadin.annotations.Push;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Button;
@@ -17,6 +15,8 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
index d31bca5901..61b366c66b 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridReplaceContainer.java
@@ -15,14 +15,14 @@
*/
package com.vaadin.v7.tests.components.grid;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.v7.data.Container.Indexed;
import com.vaadin.v7.data.util.BeanItemContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java
index f2a9d10e26..70e3158a7f 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridResizeAndScroll.java
@@ -15,13 +15,13 @@
*/
package com.vaadin.v7.tests.components.grid;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java
index 5889a3d556..0806ced163 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridScrollToLineWhileResizing.java
@@ -15,13 +15,13 @@
*/
package com.vaadin.v7.tests.components.grid;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.VerticalSplitPanel;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.util.IndexedContainer;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeChange.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeChange.java
index 54882067a9..95b7ee55a5 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeChange.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridThemeChange.java
@@ -18,10 +18,10 @@ package com.vaadin.v7.tests.components.grid;
import java.util.Arrays;
import java.util.List;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
+import com.vaadin.v7.event.SelectionEvent;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.ui.Grid;
import com.vaadin.v7.ui.Grid.SelectionMode;
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
index e4db1afd9c..0e8f16889c 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java
@@ -31,8 +31,6 @@ import java.util.Random;
import com.vaadin.annotations.Theme;
import com.vaadin.data.sort.Sort;
import com.vaadin.data.sort.SortOrder;
-import com.vaadin.event.SelectionEvent;
-import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.event.SortEvent;
import com.vaadin.event.SortEvent.SortListener;
import com.vaadin.shared.data.sort.SortDirection;
@@ -53,7 +51,9 @@ import com.vaadin.v7.data.Property.ValueChangeListener;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.v7.data.util.IndexedContainer;
import com.vaadin.v7.event.ItemClickEvent;
+import com.vaadin.v7.event.SelectionEvent;
import com.vaadin.v7.event.ItemClickEvent.ItemClickListener;
+import com.vaadin.v7.event.SelectionEvent.SelectionListener;
import com.vaadin.v7.shared.ui.grid.GridStaticCellType;
import com.vaadin.v7.shared.ui.grid.HeightMode;
import com.vaadin.v7.ui.Field;