]> source.dussan.org Git - vaadin-framework.git/commitdiff
A few small renames and typo fixes for Grid
authorJohannes Dahlström <johannesd@vaadin.com>
Fri, 9 Jan 2015 12:50:01 +0000 (14:50 +0200)
committerVaadin Code Review <review@vaadin.com>
Sun, 11 Jan 2015 14:34:30 +0000 (14:34 +0000)
* SortNotifier.removeSortistener -> removeSortListener
* DisabledGridClientTest now extends GridBasicClientFeatures
* GridServerRpc.selectionChange -> select

Change-Id: Id01b1d51f84c996444de28b262df3db7a6c35a09

client/src/com/vaadin/client/connectors/GridConnector.java
server/src/com/vaadin/event/SortEvent.java
server/src/com/vaadin/ui/Grid.java
shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java
uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java
uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java

index c3d46a4295d6cbdacc706000d6599036d4282b92..450df31b36ab5903fd7312c779acded68bc69758 100644 (file)
@@ -356,7 +356,7 @@ public class GridConnector extends AbstractHasComponentsConnector implements
                     selectedKeys.add(dataSource.getRowKey(row));
                 }
 
-                getRpcProxy(GridServerRpc.class).selectionChange(
+                getRpcProxy(GridServerRpc.class).select(
                         new ArrayList<String>(selectedKeys));
             } else {
                 updatedFromState = false;
index b331f37efa28f971e90bd5e65c3c772bd52699f4..f303e477811cd03e4aa3d7b191ecefef633bfa3a 100644 (file)
@@ -105,6 +105,6 @@ public class SortEvent extends Component.Event {
          * @param listener
          *            the sort order change listener to remove
          */
-        public void removeSortistener(SortListener listener);
+        public void removeSortListener(SortListener listener);
     }
 }
index fa0ec6fb8d601a147de0ee81fbd47a434508c03a..316f7682de7d49e50d044b24267c48a9429bd035 100644 (file)
@@ -2619,7 +2619,7 @@ public class Grid extends AbstractComponent implements SelectionNotifier,
         registerRpc(new GridServerRpc() {
 
             @Override
-            public void selectionChange(List<String> selection) {
+            public void select(List<String> selection) {
                 Collection<Object> receivedSelection = getKeyMapper()
                         .getItemIds(selection);
 
@@ -3763,7 +3763,7 @@ public class Grid extends AbstractComponent implements SelectionNotifier,
      *            the sort order change listener to remove
      */
     @Override
-    public void removeSortistener(SortListener listener) {
+    public void removeSortListener(SortListener listener) {
         removeListener(SortEvent.class, listener, SORT_ORDER_CHANGE_METHOD);
     }
 
index 37cbb295f6da8d314ae3231edf711187d795e18e..77eda7a2f61c0824344dcdaa2a7a1b19ec01ba65 100644 (file)
@@ -27,10 +27,11 @@ import com.vaadin.shared.data.sort.SortDirection;
  * @author Vaadin Ltd
  */
 public interface GridServerRpc extends ServerRpc {
-    void selectionChange(List<String> newSelection);
 
-    void sort(String[] columnIds, SortDirection[] directions,
-            boolean userOriginated);
+    void select(List<String> newSelection);
 
     void selectAll();
+
+    void sort(String[] columnIds, SortDirection[] directions,
+            boolean userOriginated);
 }
index 0038d3dabe9f686d6015a8c9bc344a0254b084b1..63d031bc85578d08a83efbfb8f70e7b6afbc3ee4 100644 (file)
@@ -24,9 +24,9 @@ import org.openqa.selenium.Keys;
 import org.openqa.selenium.interactions.Actions;
 
 import com.vaadin.testbench.elements.GridElement.GridRowElement;
-import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
+import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest;
 
-public class DisabledGridClientTest extends GridBasicFeaturesTest {
+public class DisabledGridClientTest extends GridBasicClientFeaturesTest {
 
     @Before
     public void setUp() {
index b5b416eeb1beb7985e2ccb82e5d025021084c074..64fc60e4881e90a57b00a64c4d85d1da695694d4 100644 (file)
@@ -606,6 +606,14 @@ public class GridBasicClientFeaturesWidget extends
                         }
                     }, "Component", "State", "Frozen column count");
         }
+
+        addMenuCommand("Enabled", new ScheduledCommand() {
+
+            @Override
+            public void execute() {
+                grid.setEnabled(!grid.isEnabled());
+            }
+        }, "Component", "State");
     }
 
     private void createColumnsMenu() {