From 1f94f03f56182697fda5c79ff42c492f26a8767b Mon Sep 17 00:00:00 2001 From: Henrik Paul Date: Mon, 30 Jun 2014 17:37:51 +0300 Subject: Client now recognizes server-side selection model changes. (#13334) Change-Id: Ic42e0e96871620fde6b9ce17dd5b487b1d6b8370 --- .../src/com/vaadin/shared/ui/grid/GridState.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'shared/src') diff --git a/shared/src/com/vaadin/shared/ui/grid/GridState.java b/shared/src/com/vaadin/shared/ui/grid/GridState.java index 6ca0021817..3dcf7764ac 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridState.java @@ -30,6 +30,42 @@ import com.vaadin.shared.annotations.DelegateToWidget; */ public class GridState extends AbstractComponentState { + /** + * A description of which of the three bundled SelectionModels is currently + * in use. + *

+ * Used as a data transfer object instead of the client/server ones, because + * they don't know about each others classes. + * + * @see com.vaadin.ui.components.grid.Grid.SelectionMode + * @see com.vaadin.client.ui.grid.Grid.SelectionMode + */ + public enum SharedSelectionMode { + /** + * Representation of a single selection mode + * + * @see com.vaadin.ui.components.grid.Grid.SelectionMode#SINGLE + * @see com.vaadin.client.ui.grid.Grid.SelectionMode#SINGLE + */ + SINGLE, + + /** + * Representation of a multiselection mode + * + * @see com.vaadin.ui.components.grid.Grid.SelectionMode#MULTI + * @see com.vaadin.client.ui.grid.Grid.SelectionMode#MULTI + */ + MULTI, + + /** + * Representation of a no-selection mode + * + * @see com.vaadin.ui.components.grid.Grid.SelectionMode#NONE + * @see com.vaadin.client.ui.grid.Grid.SelectionMode#NONE + */ + NONE; + } + /** * The default value for height-by-rows for both GWT widgets * {@link com.vaadin.ui.components.grid Grid} and @@ -95,4 +131,5 @@ public class GridState extends AbstractComponentState { // instantiated just to avoid NPEs public List selectedKeys = new ArrayList(); + public SharedSelectionMode selectionMode; } -- cgit v1.2.3