diff options
author | Henrik Paul <henrik@vaadin.com> | 2015-03-16 11:45:22 +0200 |
---|---|---|
committer | Henrik Paul <henrik@vaadin.com> | 2015-03-18 13:58:14 +0200 |
commit | b06b1d68469e49e7784de342f0dcf9de64b35f5a (patch) | |
tree | c4f8314901f80cfc5b9b75048b80878936d7e47b /shared/src | |
parent | 5c2da23e72e17d04e3cafc67ff1166dc313b9712 (diff) | |
download | vaadin-framework-b06b1d68469e49e7784de342f0dcf9de64b35f5a.tar.gz vaadin-framework-b06b1d68469e49e7784de342f0dcf9de64b35f5a.zip |
Adds details generator swap support for Grid (#16644)
Change-Id: I741970a7bcebd27d3aa28d608d767b4b4f063ae8
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/DetailsConnectorChange.java (renamed from shared/src/com/vaadin/shared/ui/grid/ConnectorIndexChange.java) | 14 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridClientRpc.java | 5 |
2 files changed, 12 insertions, 7 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/ConnectorIndexChange.java b/shared/src/com/vaadin/shared/ui/grid/DetailsConnectorChange.java index 16be92007e..40f4541fb1 100644 --- a/shared/src/com/vaadin/shared/ui/grid/ConnectorIndexChange.java +++ b/shared/src/com/vaadin/shared/ui/grid/DetailsConnectorChange.java @@ -26,14 +26,14 @@ import com.vaadin.shared.Connector; * @since * @author Vaadin Ltd */ -public class ConnectorIndexChange implements Serializable { +public class DetailsConnectorChange implements Serializable { private Connector connector; private Integer oldIndex; private Integer newIndex; /** Create a new connector index change */ - public ConnectorIndexChange() { + public DetailsConnectorChange() { } /** @@ -49,7 +49,7 @@ public class ConnectorIndexChange implements Serializable { * @param newIndex * the new index */ - public ConnectorIndexChange(Connector connector, Integer oldIndex, + public DetailsConnectorChange(Connector connector, Integer oldIndex, Integer newIndex) { this.connector = connector; this.oldIndex = oldIndex; @@ -59,8 +59,12 @@ public class ConnectorIndexChange implements Serializable { } private boolean assertStateIsOk() { - assert (connector != null && newIndex != null) - || (connector == null && oldIndex != null && newIndex == null) : "connector: " + boolean connectorAndNewIndexIsNotNull = connector != null + && newIndex != null; + boolean connectorAndNewIndexIsNullThenOldIndexIsSet = connector == null + && newIndex == null && oldIndex != null; + + assert (connectorAndNewIndexIsNotNull || connectorAndNewIndexIsNullThenOldIndexIsSet) : "connector: " + nullityString(connector) + ", oldIndex: " + nullityString(oldIndex) diff --git a/shared/src/com/vaadin/shared/ui/grid/GridClientRpc.java b/shared/src/com/vaadin/shared/ui/grid/GridClientRpc.java index 672c83ff53..98e7fac567 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridClientRpc.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridClientRpc.java @@ -65,9 +65,10 @@ public interface GridClientRpc extends ClientRpc { * @param connectorChanges * the indexing changes of details connectors * @param fetchId - * the id of the request for fetching the changes + * the id of the request for fetching the changes. A negative + * number indicates a push (not requested by the client side) */ public void setDetailsConnectorChanges( - Set<ConnectorIndexChange> connectorChanges, int fetchId); + Set<DetailsConnectorChange> connectorChanges, int fetchId); } |