diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-29 16:43:25 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-30 14:24:12 +0200 |
commit | 2de9aca9e5f9fe0d637f05c7198a93f93e0689e1 (patch) | |
tree | 1e203674a81608526546d6b100ed231f0f979eef /shared | |
parent | c3ad14183d72ed48088b7a5bb528e896a9797e32 (diff) | |
download | vaadin-framework-2de9aca9e5f9fe0d637f05c7198a93f93e0689e1.tar.gz vaadin-framework-2de9aca9e5f9fe0d637f05c7198a93f93e0689e1.zip |
Add AbstractSelectionModel for Grid
Also adds shared state for grid's selection models.
This is mostly for making it possible later to modify the selection models,
without breaking backwards API compatibility and having to duplicate code.
Change-Id: If93720df282bf5ca3aff17a20b455d60b33f764c
Diffstat (limited to 'shared')
3 files changed, 58 insertions, 5 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/AbstractSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/AbstractSelectionModelState.java new file mode 100644 index 0000000000..9cd29341b1 --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/AbstractSelectionModelState.java @@ -0,0 +1,28 @@ +/* + * 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; + +import com.vaadin.shared.communication.SharedState; + +/** + * Shared state for grid's abstract selection model. + * + * @author Vaadin Ltd + * + * @since 8.0 + */ +public class AbstractSelectionModelState extends SharedState { +} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/MultiSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/MultiSelectionModelState.java index 5d2a1c6094..0f7ccdc102 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/MultiSelectionModelState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/MultiSelectionModelState.java @@ -15,15 +15,14 @@ */ package com.vaadin.shared.ui.grid; -import com.vaadin.shared.communication.SharedState; - /** - * SharedState object for MultiSelectionModel. + * SharedState object for MultiSelectionModelImpl. * - * @since 8.0 * @author Vaadin Ltd + * + * @since 8.0 */ -public class MultiSelectionModelState extends SharedState { +public class MultiSelectionModelState extends AbstractSelectionModelState { /** Is the select all checkbox visible. */ public boolean selectAllCheckBoxVisible; diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/SingleSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/SingleSelectionModelState.java new file mode 100644 index 0000000000..2ad1a30a3d --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/grid/SingleSelectionModelState.java @@ -0,0 +1,26 @@ +/* + * 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; + +/** + * Shared state for grid's single selection model. + * + * @author Vaadin Ltd + * + * @since 8.0 + */ +public class SingleSelectionModelState extends AbstractSelectionModelState { +} |