diff options
Diffstat (limited to 'compatibility-shared')
-rw-r--r-- | compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/ColumnResizeMode.java | 36 | ||||
-rw-r--r-- | compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/GridState.java | 9 |
2 files changed, 43 insertions, 2 deletions
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/ColumnResizeMode.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/ColumnResizeMode.java new file mode 100644 index 0000000000..6f3de6a185 --- /dev/null +++ b/compatibility-shared/src/main/java/com/vaadin/v7/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.v7.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 + +}
\ No newline at end of file diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/GridState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/GridState.java index 4befc1fe09..a4c701c64b 100644 --- a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/GridState.java +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/grid/GridState.java @@ -142,14 +142,19 @@ public class GridState extends TabIndexState { } /** + * Column resize mode in grid. + */ + public ColumnResizeMode columnResizeMode = ColumnResizeMode.ANIMATED; + + /** * Columns in grid. */ - public List<GridColumnState> columns = new ArrayList<GridColumnState>(); + public List<GridColumnState> columns = new ArrayList<>(); /** * Column order in grid. */ - public List<String> columnOrder = new ArrayList<String>(); + public List<String> columnOrder = new ArrayList<>(); public GridStaticSectionState header = new GridStaticSectionState(); |