diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/grid/ColumnResizeMode.java | 36 | ||||
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java | 5 |
2 files changed, 41 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnResizeMode.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnResizeMode.java new file mode 100644 index 0000000000..a19a2bb9eb --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnResizeMode.java @@ -0,0 +1,36 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.shared.ui.grid; + +/** + * Collection of modes used for resizing columns in the Grid. + */ +public enum ColumnResizeMode { + + /** + * When column resize mode is set to Animated, columns + * are resized as they are dragged. + */ + ANIMATED, + + /** + * When column resize mode is set to Simple, dragging to resize + * a column will show a marker, and the column will resize only + * after the mouse button or touch is released. + */ + SIMPLE + +} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java index a8abf82c75..1074b181d8 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/GridState.java @@ -99,6 +99,11 @@ public class GridState extends AbstractSingleSelectState { primaryStyleName = "v-grid"; } + /** + * Column resize mode in grid. + */ + public ColumnResizeMode columnResizeMode = ColumnResizeMode.ANIMATED; + /** The state of the header section. */ public SectionState header = new SectionState(); |