summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorHenrik Paul <henrik@vaadin.com>2014-12-11 20:55:47 +0200
committerHenrik Paul <henrik@vaadin.com>2014-12-12 16:24:32 +0200
commit643ccd9e6a9ca6bb1d4960aa1642fa790edc9ac1 (patch)
tree4ce1f0ad42acec9c4047fa4be1b0e22b192edba2 /shared
parentb7c01560877c3d1006422a84abb59e18ce357fad (diff)
downloadvaadin-framework-643ccd9e6a9ca6bb1d4960aa1642fa790edc9ac1.tar.gz
vaadin-framework-643ccd9e6a9ca6bb1d4960aa1642fa790edc9ac1.zip
Add expand and min/max width for GridColumns (#13334)
Change-Id: I6cb2f4a11d97c3704c1fd8f8571889f1a8d5c4b8
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ui/grid/GridColumnState.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java
index 65a5ed625d..34e6fb4cfd 100644
--- a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java
+++ b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java
@@ -28,6 +28,10 @@ import com.vaadin.shared.Connector;
*/
public class GridColumnState implements Serializable {
+ public static final double DEFAULT_MAX_WIDTH = -1;
+ public static final double DEFAULT_MIN_WIDTH = 10.0d;
+ public static final int DEFAULT_EXPAND_RATIO = -1;
+
public static final double DEFAULT_COLUMN_WIDTH_PX = -1;
/**
@@ -57,4 +61,19 @@ public class GridColumnState implements Serializable {
* Are sorting indicators shown for a column. Default is false.
*/
public boolean sortable = false;
+
+ /** How much of the remaining space this column will reserve. */
+ public int expandRatio = DEFAULT_EXPAND_RATIO;
+
+ /**
+ * The maximum expansion width of this column. -1 for "no maximum". If
+ * maxWidth is less than the calculated width, maxWidth is ignored.
+ */
+ public double maxWidth = DEFAULT_MAX_WIDTH;
+
+ /**
+ * The minimum expansion width of this column. -1 for "no minimum". If
+ * minWidth is less than the calculated width, minWidth will win.
+ */
+ public double minWidth = DEFAULT_MIN_WIDTH;
}