aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2017-11-17 10:46:14 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-11-17 10:46:14 +0200
commit535f259607fa3ee1b4f3da09f4df0b4d40449965 (patch)
tree6ce98558cce19e01e02482851a6c58cfddf36ee8 /server
parentce3efd94b34c77ce470af291c501d679e2872cdd (diff)
downloadvaadin-framework-535f259607fa3ee1b4f3da09f4df0b4d40449965.tar.gz
vaadin-framework-535f259607fa3ee1b4f3da09f4df0b4d40449965.zip
Rename GridDragger to GridRowDragger (#10333)
The old name GridDragger gave an impression that you're dragging the whole grid instead of rows.
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/DropIndexCalculator.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java (renamed from server/src/main/java/com/vaadin/ui/components/grid/GridDragger.java)16
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/SourceDataProviderUpdater.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/TargetDataProviderUpdater.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java (renamed from server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerOneGridTest.java)12
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java (renamed from server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerTwoGridsTest.java)12
8 files changed, 25 insertions, 25 deletions
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/DropIndexCalculator.java b/server/src/main/java/com/vaadin/ui/components/grid/DropIndexCalculator.java
index e61b2df8e6..5b2e4ead0d 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/DropIndexCalculator.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/DropIndexCalculator.java
@@ -23,7 +23,7 @@ import java.io.Serializable;
*
* @author Vaadin Ltd
* @since 8.2
- * @see GridDragger
+ * @see GridRowDragger
* @param <T>
* the bean type
*/
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
index e3482a04f2..cb0973d016 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
@@ -43,7 +43,7 @@ import elemental.json.JsonObject;
* The Grid bean type.
* @author Vaadin Ltd.
* @since 8.1
- * @see GridDragger
+ * @see GridRowDragger
*/
public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java b/server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java
index 5073287c52..632a787107 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/GridDropTarget.java
@@ -35,7 +35,7 @@ import com.vaadin.ui.dnd.DropTargetExtension;
* Type of the Grid bean.
* @author Vaadin Ltd
* @since 8.1
- * @see GridDragger
+ * @see GridRowDragger
*/
public class GridDropTarget<T> extends DropTargetExtension<Grid<T>> {
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridDragger.java b/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java
index a181b792ad..960fe3ec39 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/GridDragger.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/GridRowDragger.java
@@ -58,7 +58,7 @@ import com.vaadin.ui.Grid.Column;
* @author Vaadin Ltd
* @since 8.2
*/
-public class GridDragger<T> implements Serializable {
+public class GridRowDragger<T> implements Serializable {
private final GridDropTarget<T> gridDropTarget;
private final GridDragSource<T> gridDragSource;
@@ -95,7 +95,7 @@ public class GridDragger<T> implements Serializable {
* @param grid
* Grid to be extended.
*/
- public GridDragger(Grid<T> grid) {
+ public GridRowDragger(Grid<T> grid) {
this(grid, DropMode.BETWEEN);
}
@@ -122,7 +122,7 @@ public class GridDragger<T> implements Serializable {
* @param dropMode
* DropMode to be used.
*/
- public GridDragger(Grid<T> grid, DropMode dropMode) {
+ public GridRowDragger(Grid<T> grid, DropMode dropMode) {
this(grid, grid, dropMode);
}
@@ -142,7 +142,7 @@ public class GridDragger<T> implements Serializable {
* @param target
* the target grid dropped to.
*/
- public GridDragger(Grid<T> source, Grid<T> target) {
+ public GridRowDragger(Grid<T> source, Grid<T> target) {
this(source, target, DropMode.BETWEEN);
}
@@ -161,7 +161,7 @@ public class GridDragger<T> implements Serializable {
* @param sourceDataProviderUpdater
* handler for updating source grid data provider
*/
- public GridDragger(Grid<T> source, Grid<T> target,
+ public GridRowDragger(Grid<T> source, Grid<T> target,
TargetDataProviderUpdater<T> targetDataProviderUpdater,
SourceDataProviderUpdater<T> sourceDataProviderUpdater) {
this(source, target, DropMode.BETWEEN);
@@ -186,7 +186,7 @@ public class GridDragger<T> implements Serializable {
* @param dropMode
* the drop mode to use
*/
- public GridDragger(Grid<T> source, Grid<T> target, DropMode dropMode) {
+ public GridRowDragger(Grid<T> source, Grid<T> target, DropMode dropMode) {
gridDragSource = new GridDragSource<>(source);
gridDropTarget = new GridDropTarget<>(target, dropMode);
@@ -493,7 +493,7 @@ public class GridDragger<T> implements Serializable {
new StringBuilder().append(sourceGrid ? "Source " : "Target ")
.append("grid does not have a ListDataProvider, cannot automatically ")
.append(sourceGrid ? "remove " : "add ")
- .append("items. Use GridDragger.set")
+ .append("items. Use GridRowDragger.set")
.append(sourceGrid ? "Source" : "Target")
.append("DataProviderUpdater(...) ")
.append(sourceGrid ? ""
@@ -508,7 +508,7 @@ public class GridDragger<T> implements Serializable {
.append(sourceGrid ? "Source " : "Target ")
.append("grid's ListDataProvider is not backed by a List-collection, cannot ")
.append(sourceGrid ? "remove " : "add ")
- .append("items. Use a ListDataProvider backed by a List, or use GridDragger.set")
+ .append("items. Use a ListDataProvider backed by a List, or use GridRowDragger.set")
.append(sourceGrid ? "Source" : "Target")
.append("DataProviderUpdater(...) ")
.append(sourceGrid ? "" : "and setDropIndexCalculator(...) ")
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/SourceDataProviderUpdater.java b/server/src/main/java/com/vaadin/ui/components/grid/SourceDataProviderUpdater.java
index f84c2bd5db..8fc1cf2bcc 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/SourceDataProviderUpdater.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/SourceDataProviderUpdater.java
@@ -22,7 +22,7 @@ import com.vaadin.data.provider.DataProvider;
import com.vaadin.shared.ui.dnd.DropEffect;
/**
- * A handler for source grid data provider updater for {@link GridDragger}.
+ * A handler for source grid data provider updater for {@link GridRowDragger}.
*
* Used to handle updates to the source grid's {@link DataProvider} after a
* drop.
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/TargetDataProviderUpdater.java b/server/src/main/java/com/vaadin/ui/components/grid/TargetDataProviderUpdater.java
index 9596eb7a03..dd02b86c17 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/TargetDataProviderUpdater.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/TargetDataProviderUpdater.java
@@ -22,7 +22,7 @@ import com.vaadin.data.provider.DataProvider;
import com.vaadin.shared.ui.dnd.DropEffect;
/**
- * A handler for target grid data provider updater for {@link GridDragger}.
+ * A handler for target grid data provider updater for {@link GridRowDragger}.
*
* Used to handle updates to the target grid's {@link DataProvider} after a
* drop.
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerOneGridTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java
index 24e72566f4..9888f42807 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerOneGridTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerOneGridTest.java
@@ -15,15 +15,15 @@ import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.shared.ui.grid.DropLocation;
import com.vaadin.ui.Grid;
import com.vaadin.ui.components.grid.DropIndexCalculator;
-import com.vaadin.ui.components.grid.GridDragger;
+import com.vaadin.ui.components.grid.GridRowDragger;
import com.vaadin.ui.components.grid.GridDropEvent;
import com.vaadin.ui.components.grid.SourceDataProviderUpdater;
-public class GridDraggerOneGridTest {
+public class GridRowDraggerOneGridTest {
- public class TestGridDragger extends GridDragger<String> {
+ public class TestGridRowDragger extends GridRowDragger<String> {
- public TestGridDragger(Grid<String> grid) {
+ public TestGridRowDragger(Grid<String> grid) {
super(grid);
}
@@ -39,14 +39,14 @@ public class GridDraggerOneGridTest {
}
private Grid<String> source;
- private TestGridDragger dragger;
+ private TestGridRowDragger dragger;
private List<String> draggedItems;
@Before
public void setupListCase() {
source = new Grid<>();
source.addColumn(s -> s).setId("1");
- dragger = new TestGridDragger(source);
+ dragger = new TestGridRowDragger(source);
}
private void drop(String dropIndex, DropLocation dropLocation,
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerTwoGridsTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java
index c73641097d..127365be36 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridDraggerTwoGridsTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridRowDraggerTwoGridsTest.java
@@ -15,15 +15,15 @@ import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.shared.ui.grid.DropLocation;
import com.vaadin.ui.Grid;
import com.vaadin.ui.components.grid.DropIndexCalculator;
-import com.vaadin.ui.components.grid.GridDragger;
+import com.vaadin.ui.components.grid.GridRowDragger;
import com.vaadin.ui.components.grid.GridDropEvent;
import com.vaadin.ui.components.grid.SourceDataProviderUpdater;
-public class GridDraggerTwoGridsTest {
+public class GridRowDraggerTwoGridsTest {
- public class TestGridDragger extends GridDragger<String> {
+ public class TestGridRowDragger extends GridRowDragger<String> {
- public TestGridDragger(Grid<String> source, Grid<String> target) {
+ public TestGridRowDragger(Grid<String> source, Grid<String> target) {
super(source, target);
}
@@ -40,7 +40,7 @@ public class GridDraggerTwoGridsTest {
private Grid<String> source;
private Grid<String> target;
- private TestGridDragger dragger;
+ private TestGridRowDragger dragger;
private List<String> draggedItems;
@Before
@@ -48,7 +48,7 @@ public class GridDraggerTwoGridsTest {
source = new Grid<>();
target = new Grid<>();
target.addColumn(s -> s).setId("1");
- dragger = new TestGridDragger(source, target);
+ dragger = new TestGridRowDragger(source, target);
target.setItems(); // setup to use list data provider
}