summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-12-03 10:54:53 +0200
committerJohn Ahlroos <john@vaadin.com>2013-12-04 14:48:59 +0200
commit428c5801da9f2d9248ad35c385b329a2f80c33b9 (patch)
tree0f20d27025679c5333dc70e1684219256d6e27fd /server
parent3e64013806a9e4f06babe33d1f0c66a5ff371798 (diff)
downloadvaadin-framework-428c5801da9f2d9248ad35c385b329a2f80c33b9.tar.gz
vaadin-framework-428c5801da9f2d9248ad35c385b329a2f80c33b9.zip
Support custom column widths in Grid #13024
Change-Id: Ib0c1701346dc6b8b9ef5b5290fc6ffaff68d9f96
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/components/grid/GridColumn.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/components/grid/GridColumn.java b/server/src/com/vaadin/ui/components/grid/GridColumn.java
index 8dae9428e5..852db21275 100644
--- a/server/src/com/vaadin/ui/components/grid/GridColumn.java
+++ b/server/src/com/vaadin/ui/components/grid/GridColumn.java
@@ -134,8 +134,6 @@ public class GridColumn implements Serializable {
/**
* Sets the width (in pixels).
*
- * FIXME Currently not implemented.
- *
* @param pixelWidth
* the new pixel width of the column
* @throws IllegalStateException
@@ -155,6 +153,17 @@ public class GridColumn implements Serializable {
}
/**
+ * Marks the column width as undefined meaning that the grid is free to
+ * resize the column based on the cell contents and available space in the
+ * grid.
+ */
+ public void setWidthUndefined() {
+ checkColumnIsAttached();
+ state.width = -1;
+ grid.markAsDirty();
+ }
+
+ /**
* Is this column visible in the grid. By default all columns are visible.
*
* @return <code>true</code> if the column is visible