summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorPatrik Lindström <patrik@vaadin.com>2016-11-02 11:54:49 +0200
committerPekka Hyvönen <pekka@vaadin.com>2016-11-17 10:05:47 +0000
commit9a0b4e9827cdcdb4084fb6b61ab7cd8953ee94fb (patch)
tree4dd3d79b60919eca46eff6fa37de9bb23ce30e53 /server/src
parent9696c66041d9852a97aa553485afcca354d684d3 (diff)
downloadvaadin-framework-9a0b4e9827cdcdb4084fb6b61ab7cd8953ee94fb.tar.gz
vaadin-framework-9a0b4e9827cdcdb4084fb6b61ab7cd8953ee94fb.zip
Add lazy/simple resize mode to Grid (#20108)
Change-Id: I47427efc28c350382dba8c1f50fd332a3f4585e4
Diffstat (limited to 'server/src')
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index b8becd1c33..6bdcd1377b 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -85,6 +85,7 @@ import com.vaadin.server.communication.data.DataGenerator;
import com.vaadin.server.communication.data.RpcDataProviderExtension;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.data.sort.SortDirection;
+import com.vaadin.shared.ui.grid.ColumnResizeMode;
import com.vaadin.shared.ui.grid.EditorClientRpc;
import com.vaadin.shared.ui.grid.EditorServerRpc;
import com.vaadin.shared.ui.grid.GridClientRpc;
@@ -4544,6 +4545,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
private Object editedItemId = null;
private boolean editorActive = false;
+
/**
* True while the editor is storing the field values, i.e. commiting the
* field group.
@@ -4789,7 +4791,6 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
if (column != null && column.isResizable()) {
column.getState().width = pixels;
fireColumnResizeEvent(column, true);
- markAsDirty();
}
}
});
@@ -5261,6 +5262,24 @@ public class Grid extends AbstractFocusable implements SelectionNotifier,
}
/**
+ * Sets the column resize mode to use. The default mode is {@link ColumnResizeMode#ANIMATED}.
+ *
+ * @param mode a ColumnResizeMode value
+ */
+ public void setColumnResizeMode(ColumnResizeMode mode) {
+ getState().columnResizeMode = mode;
+ }
+
+ /**
+ * Returns the current column resize mode. The default mode is {@link ColumnResizeMode#ANIMATED}.
+ *
+ * @return a ColumnResizeMode value
+ */
+ public ColumnResizeMode getColumnResizeMode() {
+ return getState(false).columnResizeMode;
+ }
+
+ /**
* Creates a new column based on a property id and appends it as the last
* column.
*