summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/connectors/GridConnector.java8
-rw-r--r--client/src/com/vaadin/client/ui/dd/DragHandle.java3
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java13
3 files changed, 18 insertions, 6 deletions
diff --git a/client/src/com/vaadin/client/connectors/GridConnector.java b/client/src/com/vaadin/client/connectors/GridConnector.java
index 82fe3d9279..60a9aacb88 100644
--- a/client/src/com/vaadin/client/connectors/GridConnector.java
+++ b/client/src/com/vaadin/client/connectors/GridConnector.java
@@ -193,6 +193,14 @@ public class GridConnector extends AbstractHasComponentsConnector implements
return null;
}
+ @Override
+ protected void setWidth(double pixels, boolean userOriginated) {
+ super.setWidth(pixels, userOriginated);
+ if (userOriginated) {
+ getRpcProxy(GridServerRpc.class).columnResized(id, pixels);
+ }
+ }
+
private AbstractFieldConnector getEditorConnector() {
return editorConnector;
}
diff --git a/client/src/com/vaadin/client/ui/dd/DragHandle.java b/client/src/com/vaadin/client/ui/dd/DragHandle.java
index c3a0768a72..ef4f94d18f 100644
--- a/client/src/com/vaadin/client/ui/dd/DragHandle.java
+++ b/client/src/com/vaadin/client/ui/dd/DragHandle.java
@@ -127,8 +127,7 @@ public class DragHandle {
@Override
public void onDragEnd() {
- removeDraggingStyle();
- userCallback.onComplete();
+ // NOP, handled in onDrop and onDragCancel
}
@Override
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java
index 1e1c89234b..e01edcddd7 100644
--- a/client/src/com/vaadin/client/widgets/Grid.java
+++ b/client/src/com/vaadin/client/widgets/Grid.java
@@ -2798,6 +2798,7 @@ public class Grid<T> extends ResizeComposite implements
setWidth(-1);
setEditable(false);
+ setResizable(false);
initDone = true;
}
@@ -4759,13 +4760,17 @@ public class Grid<T> extends ResizeComposite implements
* the width in pixels or negative for auto sizing
*/
public Column<C, T> setWidth(double pixels) {
+ setWidth(pixels, false);
+ return this;
+ }
+
+ protected void setWidth(double pixels, boolean userOriginated) {
if (!WidgetUtil.pixelValuesEqual(widthUser, pixels)) {
widthUser = pixels;
if (!isHidden()) {
scheduleColumnWidthRecalculator();
}
}
- return this;
}
void doSetWidth(double pixels) {
@@ -5572,7 +5577,7 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void onUpdate(double deltaX,
double deltaY) {
- col.setWidth(initialWidth + deltaX);
+ col.setWidth(initialWidth + deltaX, false);
}
@Override
@@ -5582,12 +5587,12 @@ public class Grid<T> extends ResizeComposite implements
@Override
public void onComplete() {
- // NOP
+ col.setWidth(col.getWidthActual(), true);
}
@Override
public void onCancel() {
- col.setWidth(initialWidth);
+ col.setWidth(initialWidth, false);
}
});
dragger.addTo(td);