From: Teemu Suo-Anttila Date: Tue, 30 Aug 2016 09:44:37 +0000 (+0300) Subject: Clean up unused parts of old shared Grid classes X-Git-Tag: 8.0.0.alpha1~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dcf64cd9365c27dc65c78f14091d3365e0cc7cc8;p=vaadin-framework.git Clean up unused parts of old shared Grid classes Change-Id: I4de92909afd74031647e9166a44362918269e57f --- diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java deleted file mode 100644 index 2c8ab0b536..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/ColumnGroupState.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * The column group data shared between the server and the client - * - * @since 7.4 - * @author Vaadin Ltd - */ -public class ColumnGroupState implements Serializable { - - /** - * The columns that is included in the group - */ - public List columns = new ArrayList(); - - /** - * The header text of the group - */ - public String header; - - /** - * The footer text of the group - */ - public String footer; -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java b/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java deleted file mode 100644 index a99f898249..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/DetailsConnectorChange.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * 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 java.io.Serializable; -import java.util.Comparator; - -import com.vaadin.shared.Connector; - -/** - * A description of an indexing modification for a connector. This is used by - * Grid for internal bookkeeping updates. - * - * @since 7.5.0 - * @author Vaadin Ltd - */ -public class DetailsConnectorChange implements Serializable { - - public static final Comparator REMOVED_FIRST_COMPARATOR = new Comparator() { - @Override - public int compare(DetailsConnectorChange a, DetailsConnectorChange b) { - boolean deleteA = a.getNewIndex() == null; - boolean deleteB = b.getNewIndex() == null; - if (deleteA && !deleteB) { - return -1; - } else if (!deleteA && deleteB) { - return 1; - } else { - return 0; - } - } - }; - - private Connector connector; - private Integer oldIndex; - private Integer newIndex; - private boolean shouldStillBeVisible; - - /** Create a new connector index change */ - public DetailsConnectorChange() { - } - - /** - * Convenience constructor for setting all the fields in one line. - *

- * Calling this constructor will also assert that the state of the pojo is - * consistent by internal assumptions. - * - * @param connector - * the changed connector - * @param oldIndex - * the old index - * @param newIndex - * the new index - * @param shouldStillBeVisible - * details should be visible regardless of {@code connector} - */ - public DetailsConnectorChange(Connector connector, Integer oldIndex, - Integer newIndex, boolean shouldStillBeVisible) { - this.connector = connector; - this.oldIndex = oldIndex; - this.newIndex = newIndex; - this.shouldStillBeVisible = shouldStillBeVisible; - - assert assertStateIsOk(); - } - - private boolean assertStateIsOk() { - boolean connectorAndNewIndexIsNotNull = connector != null - && newIndex != null; - boolean connectorAndNewIndexIsNullThenOldIndexIsSet = connector == null - && newIndex == null && oldIndex != null; - - assert (connectorAndNewIndexIsNotNull - || connectorAndNewIndexIsNullThenOldIndexIsSet) : "connector: " - + nullityString(connector) + ", oldIndex: " - + nullityString(oldIndex) + ", newIndex: " - + nullityString(newIndex); - return true; - } - - private static String nullityString(Object object) { - return object == null ? "null" : "non-null"; - } - - /** - * Gets the old index for the connector. - *

- * If null, the connector is recently added. This means that - * {@link #getConnector()} is expected not to return null. - * - * @return the old index for the connector - */ - public Integer getOldIndex() { - assert assertStateIsOk(); - return oldIndex; - } - - /** - * Gets the new index for the connector. - *

- * If null, the connector should be removed. This means that - * {@link #getConnector()} is expected to return null as well. - * - * @return the new index for the connector - */ - public Integer getNewIndex() { - assert assertStateIsOk(); - return newIndex; - } - - /** - * Gets the changed connector. - * - * @return the changed connector. Might be null - */ - public Connector getConnector() { - assert assertStateIsOk(); - return connector; - } - - /** - * Sets the changed connector. - * - * @param connector - * the changed connector. May be null - */ - public void setConnector(Connector connector) { - this.connector = connector; - } - - /** - * Sets the old index - * - * @param oldIndex - * the old index. May be null if a new connector is - * being inserted - */ - public void setOldIndex(Integer oldIndex) { - this.oldIndex = oldIndex; - } - - /** - * Sets the new index - * - * @param newIndex - * the new index. May be null if a connector is - * being removed - */ - public void setNewIndex(Integer newIndex) { - this.newIndex = newIndex; - } - - /** - * Checks whether whether the details should remain open, even if connector - * might be null. - * - * @return true iff the details should remain open, even if - * connector might be null - */ - public boolean isShouldStillBeVisible() { - return shouldStillBeVisible; - } - - /** - * Sets whether the details should remain open, even if connector might be - * null. - * - * @param shouldStillBeVisible - * true iff the details should remain open, even if - * connector might be null - */ - public void setShouldStillBeVisible(boolean shouldStillBeVisible) { - this.shouldStillBeVisible = shouldStillBeVisible; - } -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java deleted file mode 100644 index 4f22edd1b0..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorClientRpc.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 java.util.List; - -import com.vaadin.shared.communication.ClientRpc; - -/** - * An RPC interface for the grid editor server-to-client communications. - * - * @since 7.4 - * @author Vaadin Ltd - */ -public interface EditorClientRpc extends ClientRpc { - - /** - * Tells the client to open the editor and bind data to it. - * - * @param rowIndex - * the index of the edited row - */ - void bind(int rowIndex); - - /** - * Tells the client to cancel editing and hide the editor. - * - * @param rowIndex - * the index of the edited row - */ - void cancel(int rowIndex); - - /** - * Confirms a pending {@link EditorServerRpc#bind(int) bind request} sent by - * the client. - * - * @param bindSucceeded - * true iff the bind action was successful - */ - void confirmBind(boolean bindSucceeded); - - /** - * Confirms a pending {@link EditorServerRpc#save(int) save request} sent by - * the client. - * - * @param saveSucceeded - * true iff the save action was successful - * @param errorMessage - * the error message to show the user - * @param errorColumnsIds - * a list of column keys that should get error markers, or - * null if there should be no error markers - */ - void confirmSave(boolean saveSucceeded, String errorMessage, - List errorColumnsIds); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java deleted file mode 100644 index bc42559ff5..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/EditorServerRpc.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.ServerRpc; - -/** - * An RPC interface for the grid editor client-to-server communications. - * - * @since 7.4 - * @author Vaadin Ltd - */ -public interface EditorServerRpc extends ServerRpc { - - /** - * Asks the server to open the editor and bind data to it. When a bind - * request is sent, it must be acknowledged with a - * {@link EditorClientRpc#confirmBind() confirm call} before the client can - * open the editor. - * - * @param rowIndex - * the index of the edited row - */ - void bind(int rowIndex); - - /** - * Asks the server to save unsaved changes in the editor to the data source. - * When a save request is sent, it must be acknowledged with a - * {@link EditorClientRpc#confirmSave() confirm call}. - * - * @param rowIndex - * the index of the edited row - */ - void save(int rowIndex); - - /** - * Tells the server to cancel editing. When sending a cancel request, the - * client does not need to wait for confirmation by the server before hiding - * the editor. - * - * @param rowIndex - * the index of the edited row - */ - void cancel(int rowIndex); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java deleted file mode 100644 index aef1807203..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridClientRpc.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.ClientRpc; - -/** - * Server-to-client RPC interface for the Grid component. - * - * @since 7.4 - * @author Vaadin Ltd - */ -public interface GridClientRpc extends ClientRpc { - - /** - * Command client Grid to scroll to a specific data row and its (optional) - * details. - * - * @param row - * zero-based row index. If the row index is below zero or above - * the row count of the client-side data source, a client-side - * exception will be triggered. Since this exception has no - * handling by default, an out-of-bounds value will cause a - * client-side crash. - * @param destination - * desired placement of scrolled-to row. See the documentation - * for {@link ScrollDestination} for more information. - */ - public void scrollToRow(int row, ScrollDestination destination); - - /** - * Command client Grid to scroll to the first row. - */ - public void scrollToStart(); - - /** - * Command client Grid to scroll to the last row. - */ - public void scrollToEnd(); - - /** - * Command client Grid to recalculate column widths. - */ - public void recalculateColumnWidths(); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java deleted file mode 100644 index add9dca35b..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridColumnState.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 java.io.Serializable; - -import com.vaadin.shared.Connector; - -/** - * Column state DTO for transferring column properties from the server to the - * client - * - * @since 7.4 - * @author Vaadin Ltd - */ -public class GridColumnState implements Serializable { - - /** - * Id used by grid connector to map server side column with client side - * column - */ - public String id; - - /** - * Column width in pixels. Default column width is - * {@value GridConstants#DEFAULT_COLUMN_WIDTH_PX}. - */ - public double width = GridConstants.DEFAULT_COLUMN_WIDTH_PX; - - /** - * The connector for the renderer used to render the cells in this column. - */ - public Connector rendererConnector; - - /** - * Whether the values in this column are editable when the editor interface - * is active. - */ - public boolean editable = true; - - /** - * The connector for the field used to edit cells in this column when the - * editor interface is active. - */ - public Connector editorConnector; - - /** - * Whether this column is sortable by the user - */ - public boolean sortable = false; - - /** How much of the remaining space this column will reserve. */ - public int expandRatio = GridConstants.DEFAULT_EXPAND_RATIO; - - /** - * The maximum expansion width of this column. -1 for "no maximum". If - * maxWidth is less than the calculated width, maxWidth is ignored. - */ - public double maxWidth = GridConstants.DEFAULT_MAX_WIDTH; - - /** - * The minimum expansion width of this column. -1 for "no minimum". If - * minWidth is less than the calculated width, minWidth will win. - */ - public double minWidth = GridConstants.DEFAULT_MIN_WIDTH; - - /** Whether this column is currently hidden. */ - public boolean hidden = false; - - /** Whether the column can be hidden by the user. */ - public boolean hidable = false; - - /** The caption for the column hiding toggle. */ - public String hidingToggleCaption; - - /** Column header caption */ - public String headerCaption; - - /** Whether this column is resizable by the user. */ - public boolean resizable = true; -} 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 cdf5c67286..add8eb8938 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 @@ -24,96 +24,58 @@ import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.shared.ui.TabIndexState; /** - * The shared state for the {@link com.vaadin.ui.components.grid.Grid} component + * The shared state for the {@link com.vaadin.ui.Grid} component. * - * @since 7.4 + * @since * @author Vaadin Ltd */ public class GridState extends TabIndexState { - /** - * 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 - * {@link com.vaadin.client.ui.grid.Escalator Escalator} + * {@link com.vaadin.client.widgets.Grid} and + * {@link com.vaadin.client.widgets.Escalator Escalator}. */ public static final double DEFAULT_HEIGHT_BY_ROWS = 10.0d; /** - * The key in which a row's data can be found + * The key in which a row's data can be found. * * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_DATA = "d"; /** - * The key in which a row's own key can be found + * The key in which a row's own key can be found. * * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_ROWKEY = "k"; /** - * The key in which a row's generated style can be found + * The key in which a row's generated style can be found. * * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_ROWSTYLE = "rs"; /** - * The key in which a generated styles for a row's cells can be found + * The key in which a generated styles for a row's cells can be found. * * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_CELLSTYLES = "cs"; /** - * The key in which a row's description can be found + * The key in which a row's description can be found. * - * @since 7.6 * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_ROWDESCRIPTION = "rd"; /** - * The key in which a cell's description can be found + * The key in which a cell's description can be found. * - * @since 7.6 * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, String) */ public static final String JSONKEY_CELLDESCRIPTION = "cd"; @@ -121,8 +83,6 @@ public class GridState extends TabIndexState { /** * The key that tells whether details are visible for the row. * - * @since 7.5.0 - * * @see com.vaadin.ui.Grid#setDetailsGenerator(com.vaadin.ui.Grid.DetailsGenerator) * @see com.vaadin.ui.Grid#setDetailsVisible(Object, boolean) * @see com.vaadin.shared.data.DataProviderRpc#setRowData(int, @@ -131,9 +91,7 @@ public class GridState extends TabIndexState { public static final String JSONKEY_DETAILS_VISIBLE = "dv"; /** - * The key that tells whether row is selected. - * - * @since 7.6 + * The key that tells whether row is selected or not. */ public static final String JSONKEY_SELECTED = "s"; @@ -141,21 +99,13 @@ public class GridState extends TabIndexState { primaryStyleName = "v-grid"; } - /** - * Columns in grid. - */ - public List columns = new ArrayList(); - /** * Column order in grid. */ public List columnOrder = new ArrayList(); - public GridStaticSectionState header = new GridStaticSectionState(); - - public GridStaticSectionState footer = new GridStaticSectionState(); - - /** The number of frozen columns */ + /** The number of frozen columns. */ + @DelegateToWidget public int frozenColumnCount = 0; /** The height of the Grid in terms of body rows. */ @@ -166,39 +116,18 @@ public class GridState extends TabIndexState { @DelegateToWidget public HeightMode heightMode = HeightMode.CSS; - /** Keys of the currently sorted columns */ + /** Keys of the currently sorted columns. */ public String[] sortColumns = new String[0]; - /** Directions for each sorted column */ + /** Directions for each sorted column. */ public SortDirection[] sortDirs = new SortDirection[0]; - /** The enabled state of the editor interface */ - public boolean editorEnabled = false; - - /** - * Buffered editor mode - * - * @since 7.6 - */ - @DelegateToWidget - public boolean editorBuffered = true; - /** - * Whether rows and/or cells have generated descriptions (tooltips) - * - * @since 7.6 + * Whether rows and/or cells have generated descriptions (tooltips). */ public boolean hasDescriptions; - /** The caption for the save button in the editor */ - @DelegateToWidget - public String editorSaveCaption = GridConstants.DEFAULT_SAVE_CAPTION; - - /** The caption for the cancel button in the editor */ - @DelegateToWidget - public String editorCancelCaption = GridConstants.DEFAULT_CANCEL_CAPTION; - - /** Whether the columns can be reordered */ + /** Whether the columns can be reordered. */ @DelegateToWidget public boolean columnReorderingAllowed; diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java deleted file mode 100644 index 4702146613..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/GridStaticSectionState.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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 java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.vaadin.shared.Connector; - -/** - * Shared state for Grid headers and footers. - * - * @since 7.4 - * @author Vaadin Ltd - */ -public class GridStaticSectionState implements Serializable { - - public static class CellState implements Serializable { - public String text = ""; - - public String html = ""; - - public Connector connector = null; - - public GridStaticCellType type = GridStaticCellType.TEXT; - - public String columnId; - - public String styleName = null; - } - - public static class RowState implements Serializable { - public List cells = new ArrayList(); - - public boolean defaultRow = false; - - /** - * Map from column id set to cell state for merged state. - */ - public Map, CellState> cellGroups = new HashMap, CellState>(); - - /** - * The style name for the row. Null if none. - */ - public String styleName = null; - } - - public List rows = new ArrayList(); - - public boolean visible = true; -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java deleted file mode 100644 index 47af47e166..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/renderers/RendererClickRpc.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.renderers; - -import com.vaadin.shared.MouseEventDetails; -import com.vaadin.shared.communication.ServerRpc; - -public interface RendererClickRpc extends ServerRpc { - /** - * Called when a click event has occurred and there are server side - * listeners for the event. - * - * @param mouseDetails - * Details about the mouse when the event took place - */ - public void click(String rowKey, String columnId, - MouseEventDetails mouseDetails); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java deleted file mode 100644 index 889c888601..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelServerRpc.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.selection; - -import java.util.List; - -import com.vaadin.shared.communication.ServerRpc; - -/** - * ServerRpc for MultiSelectionModel. - * - * @since 7.6 - * @author Vaadin Ltd - */ -public interface MultiSelectionModelServerRpc extends ServerRpc { - - /** - * Select a list of rows based on their row keys on the server-side. - * - * @param rowKeys - * list of row keys to select - */ - public void select(List rowKeys); - - /** - * Deselect a list of rows based on their row keys on the server-side. - * - * @param rowKeys - * list of row keys to deselect - */ - public void deselect(List rowKeys); - - /** - * Selects all rows on the server-side. - */ - public void selectAll(); - - /** - * Deselects all rows on the server-side. - */ - public void deselectAll(); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java deleted file mode 100644 index 6bc37c61f3..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/MultiSelectionModelState.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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.selection; - -import com.vaadin.shared.communication.SharedState; - -/** - * SharedState object for MultiSelectionModel. - * - * @since 7.6 - * @author Vaadin Ltd - */ -public class MultiSelectionModelState extends SharedState { - - /* Select All -checkbox status */ - public boolean allSelected; - -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java deleted file mode 100644 index 079a57bc81..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelServerRpc.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.selection; - -import com.vaadin.shared.communication.ServerRpc; - -/** - * ServerRpc for SingleSelectionModel. - * - * @since 7.6 - * @author Vaadin Ltd - */ -public interface SingleSelectionModelServerRpc extends ServerRpc { - - /** - * Selects a row on server-side. - * - * @param rowKey - * row key of selected row; {@code null} if deselect - */ - public void select(String rowKey); -} diff --git a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java b/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java deleted file mode 100644 index 82acd4a938..0000000000 --- a/shared/src/main/java/com/vaadin/shared/ui/grid/selection/SingleSelectionModelState.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.selection; - -import com.vaadin.shared.communication.SharedState; - -/** - * SharedState object for SingleSelectionModel. - * - * @since 7.6 - * @author Vaadin Ltd - */ -public class SingleSelectionModelState extends SharedState { - - /* Allow deselecting rows */ - public boolean deselectAllowed = true; -}