aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-05-11 08:27:29 +0300
committerHenri Sara <henri.sara@gmail.com>2017-05-16 15:35:17 +0300
commitd9ce1e8fb70e9cd6937a3174eeea3a244e52b770 (patch)
tree23d4a6fbc38dfed098226796580a7fbe3473ec20 /client
parent2e879d11f8b052bd95a84ffbeac47f65afff3a89 (diff)
downloadvaadin-framework-d9ce1e8fb70e9cd6937a3174eeea3a244e52b770.tar.gz
vaadin-framework-d9ce1e8fb70e9cd6937a3174eeea3a244e52b770.zip
Rename TreeGridCommunicationConstants to HierarchicalDataCommunicatorConstants
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java16
-rw-r--r--client/src/main/java/com/vaadin/client/connectors/treegrid/TreeGridConnector.java16
-rw-r--r--client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java12
3 files changed, 22 insertions, 22 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java b/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
index c4a6e75a88..c370d1e2e2 100644
--- a/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/data/HierarchicalDataCommunicatorConnector.java
@@ -17,7 +17,7 @@ package com.vaadin.client.connectors.data;
import com.vaadin.data.provider.HierarchicalDataCommunicator;
import com.vaadin.shared.ui.Connect;
-import com.vaadin.shared.ui.treegrid.TreeGridCommunicationConstants;
+import com.vaadin.shared.ui.treegrid.HierarchicalDataCommunicatorConstants;
import elemental.json.JsonObject;
@@ -35,9 +35,9 @@ public class HierarchicalDataCommunicatorConnector
protected void onRowDataUpdate(JsonObject newRowData,
JsonObject oldRowData) {
assert newRowData.hasKey(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
assert oldRowData.hasKey(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
/*
* Since server side can't know the index of a random item, any
@@ -45,14 +45,14 @@ public class HierarchicalDataCommunicatorConnector
* previous item.
*/
JsonObject hierarchyData = newRowData.getObject(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
- if (!hierarchyData.hasKey(TreeGridCommunicationConstants.ROW_DEPTH)) {
- hierarchyData.put(TreeGridCommunicationConstants.ROW_DEPTH,
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
+ if (!hierarchyData.hasKey(HierarchicalDataCommunicatorConstants.ROW_DEPTH)) {
+ hierarchyData.put(HierarchicalDataCommunicatorConstants.ROW_DEPTH,
oldRowData
.getObject(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION)
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
.getNumber(
- TreeGridCommunicationConstants.ROW_DEPTH));
+ HierarchicalDataCommunicatorConstants.ROW_DEPTH));
}
}
diff --git a/client/src/main/java/com/vaadin/client/connectors/treegrid/TreeGridConnector.java b/client/src/main/java/com/vaadin/client/connectors/treegrid/TreeGridConnector.java
index 11848f69e0..d7267c30cf 100644
--- a/client/src/main/java/com/vaadin/client/connectors/treegrid/TreeGridConnector.java
+++ b/client/src/main/java/com/vaadin/client/connectors/treegrid/TreeGridConnector.java
@@ -43,7 +43,7 @@ import com.vaadin.shared.ui.treegrid.FocusParentRpc;
import com.vaadin.shared.ui.treegrid.FocusRpc;
import com.vaadin.shared.ui.treegrid.NodeCollapseRpc;
import com.vaadin.shared.ui.treegrid.TreeGridClientRpc;
-import com.vaadin.shared.ui.treegrid.TreeGridCommunicationConstants;
+import com.vaadin.shared.ui.treegrid.HierarchicalDataCommunicatorConstants;
import com.vaadin.shared.ui.treegrid.TreeGridState;
import elemental.json.JsonObject;
@@ -356,11 +356,11 @@ public class TreeGridConnector extends GridConnector {
// let's scroll the row into the view
getWidget().scrollToRow(cell.getRowIndex());
} else if (rowData.hasKey(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION)) {
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)) {
JsonObject rowDescription = rowData.getObject(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
boolean leaf = rowDescription.getBoolean(
- TreeGridCommunicationConstants.ROW_LEAF);
+ HierarchicalDataCommunicatorConstants.ROW_LEAF);
boolean collapsed = isCollapsed(rowData);
switch (domEvent.getKeyCode()) {
case KeyCodes.KEY_RIGHT:
@@ -414,12 +414,12 @@ public class TreeGridConnector extends GridConnector {
private static boolean isCollapsed(JsonObject rowData) {
assert rowData
- .hasKey(TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION) : "missing hierarchy data for row "
+ .hasKey(HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION) : "missing hierarchy data for row "
+ rowData.asString();
return rowData
.getObject(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION)
- .getBoolean(TreeGridCommunicationConstants.ROW_COLLAPSED);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION)
+ .getBoolean(HierarchicalDataCommunicatorConstants.ROW_COLLAPSED);
}
/**
@@ -430,6 +430,6 @@ public class TreeGridConnector extends GridConnector {
*/
public static boolean isCollapseAllowed(JsonObject row) {
return row.getBoolean(
- TreeGridCommunicationConstants.ROW_COLLAPSE_ALLOWED);
+ HierarchicalDataCommunicatorConstants.ROW_COLLAPSE_ALLOWED);
}
}
diff --git a/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java b/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java
index 914656244a..d66a86110e 100644
--- a/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java
+++ b/client/src/main/java/com/vaadin/client/renderers/HierarchyRenderer.java
@@ -32,7 +32,7 @@ import com.vaadin.client.WidgetUtil;
import com.vaadin.client.connectors.treegrid.TreeGridConnector;
import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.client.widget.treegrid.HierarchyRendererCellReferenceWrapper;
-import com.vaadin.shared.ui.treegrid.TreeGridCommunicationConstants;
+import com.vaadin.shared.ui.treegrid.HierarchicalDataCommunicatorConstants;
import elemental.json.JsonObject;
@@ -162,30 +162,30 @@ public class HierarchyRenderer extends ClickableRenderer<Object, Widget> {
private int getDepth(JsonObject rowDescription) {
return (int) rowDescription
- .getNumber(TreeGridCommunicationConstants.ROW_DEPTH);
+ .getNumber(HierarchicalDataCommunicatorConstants.ROW_DEPTH);
}
private JsonObject getHierarchyData(JsonObject row) {
return row.getObject(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
}
private boolean hasHierarchyData(JsonObject row) {
return row.hasKey(
- TreeGridCommunicationConstants.ROW_HIERARCHY_DESCRIPTION);
+ HierarchicalDataCommunicatorConstants.ROW_HIERARCHY_DESCRIPTION);
}
private boolean isLeaf(JsonObject rowDescription) {
boolean leaf;
leaf = rowDescription
- .getBoolean(TreeGridCommunicationConstants.ROW_LEAF);
+ .getBoolean(HierarchicalDataCommunicatorConstants.ROW_LEAF);
return leaf;
}
private boolean isCollapsed(JsonObject rowDescription) {
boolean collapsed;
collapsed = rowDescription
- .getBoolean(TreeGridCommunicationConstants.ROW_COLLAPSED);
+ .getBoolean(HierarchicalDataCommunicatorConstants.ROW_COLLAPSED);
return collapsed;
}