diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-01-07 14:32:46 +0200 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2015-01-07 16:38:11 +0000 |
commit | 395955d960a716fa8bf2318c3f92e167c93b4f6c (patch) | |
tree | ee953eef3b933980624e119d4a58af5bba20ec95 /shared | |
parent | 20ed8b863d24f48afab5d510f5caf1fbdadeeb19 (diff) | |
download | vaadin-framework-395955d960a716fa8bf2318c3f92e167c93b4f6c.tar.gz vaadin-framework-395955d960a716fa8bf2318c3f92e167c93b4f6c.zip |
Move column constants from state to GridConstants (#15510)
Change-Id: I9dd103d2f9725499823231881c432696f05b80db
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridColumnState.java | 16 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridConstants.java | 22 |
2 files changed, 27 insertions, 11 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java index 11cb133fa5..c69b02231e 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java @@ -28,12 +28,6 @@ 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; - /** * Id used by grid connector to map server side column with client side * column @@ -42,9 +36,9 @@ public class GridColumnState implements Serializable { /** * Column width in pixels. Default column width is - * {@value #DEFAULT_COLUMN_WIDTH_PX}. + * {@value GridConstants#DEFAULT_COLUMN_WIDTH_PX}. */ - public double width = DEFAULT_COLUMN_WIDTH_PX; + public double width = GridConstants.DEFAULT_COLUMN_WIDTH_PX; /** * The connector for the renderer used to render the cells in this column. @@ -63,17 +57,17 @@ public class GridColumnState implements Serializable { public boolean sortable = false; /** How much of the remaining space this column will reserve. */ - public int expandRatio = DEFAULT_EXPAND_RATIO; + public int expandRatio = GridConstants.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; + public double maxWidth = GridConstants.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; + public double minWidth = GridConstants.DEFAULT_MIN_WIDTH; } diff --git a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java index 1ee79a5d37..61cf7f6ef0 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java @@ -41,4 +41,26 @@ public final class GridConstants implements Serializable { * The threshold in pixels a finger can move while long tapping. */ public static final int LONG_TAP_THRESHOLD = 3; + + /* Column constants */ + + /** + * Default maximum width for columns. + */ + public static final double DEFAULT_MAX_WIDTH = -1; + + /** + * Default minimum width for columns. + */ + public static final double DEFAULT_MIN_WIDTH = 10.0d; + + /** + * Default expand ratio for columns. + */ + public static final int DEFAULT_EXPAND_RATIO = -1; + + /** + * Default width for columns. + */ + public static final double DEFAULT_COLUMN_WIDTH_PX = -1; } |