diff options
author | John Ahlroos <john@vaadin.com> | 2013-11-06 10:35:03 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-11-22 12:59:10 +0000 |
commit | 4caa2f5b6e26ade52a4fba66a0a020b79f9008ea (patch) | |
tree | 4aa4d2b8d4d0566fda4b336d22a1ebbe7ac9d712 /shared | |
parent | c2d38fa6c2d67457065fd3dce7e0d939ae0a1278 (diff) | |
download | vaadin-framework-4caa2f5b6e26ade52a4fba66a0a020b79f9008ea.tar.gz vaadin-framework-4caa2f5b6e26ade52a4fba66a0a020b79f9008ea.zip |
Multiple headers and footer rows #3153
Change-Id: Iadb0d8b051d0f0ef1303e0d7d740cf476cd81971
Diffstat (limited to 'shared')
4 files changed, 99 insertions, 10 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/ColumnGroupRowState.java b/shared/src/com/vaadin/shared/ui/grid/ColumnGroupRowState.java new file mode 100644 index 0000000000..a8e0f87457 --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/grid/ColumnGroupRowState.java @@ -0,0 +1,46 @@ +/* + * Copyright 2000-2013 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; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * The column group row data shared between the server and client + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class ColumnGroupRowState implements Serializable { + + /** + * The groups that has been added to the row + */ + public List<ColumnGroupState> groups = new ArrayList<ColumnGroupState>(); + + /** + * Is the header shown + */ + public boolean headerVisible = true; + + /** + * Is the footer shown + */ + public boolean footerVisible = false; + +} diff --git a/shared/src/com/vaadin/shared/ui/grid/ColumnGroupState.java b/shared/src/com/vaadin/shared/ui/grid/ColumnGroupState.java new file mode 100644 index 0000000000..3992b6611f --- /dev/null +++ b/shared/src/com/vaadin/shared/ui/grid/ColumnGroupState.java @@ -0,0 +1,45 @@ +/* + * Copyright 2000-2013 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; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * The column group data shared between the server and the client + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class ColumnGroupState implements Serializable { + + /** + * The columns that is included in the group + */ + public List<String> columns = new ArrayList<String>(); + + /** + * The header text of the group + */ + public String header; + + /** + * The footer text of the group + */ + public String footer; +} diff --git a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java index 391eb2a65c..0301c5ead2 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridColumnState.java @@ -34,17 +34,11 @@ public class GridColumnState implements Serializable { /** * Header caption for the column - * - * FIXME Only single header currently supported. Should support many - * headers. */ public String header; /** * Footer caption for the column - * - * FIXME Only single footer currently supported. Should support many - * footers. */ public String footer; diff --git a/shared/src/com/vaadin/shared/ui/grid/GridState.java b/shared/src/com/vaadin/shared/ui/grid/GridState.java index e1e0fff354..d1167f3d4f 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridState.java @@ -40,13 +40,17 @@ public class GridState extends AbstractComponentState { public List<GridColumnState> columns = new ArrayList<GridColumnState>(); /** - * Are the header row(s) visible. By default they are visible. + * Is the column header row visible */ - public boolean headerVisible = true; + public boolean columnHeadersVisible = true; /** - * Are the footer row(s) visible. By default they are visible. + * Is the column footer row visible */ - public boolean footerVisible = true; + public boolean columnFootersVisible = false; + /** + * The column groups added to the grid + */ + public List<ColumnGroupRowState> columnGroupRows = new ArrayList<ColumnGroupRowState>(); } |