summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2014-12-18 10:17:58 +0200
committerLeif Åstrand <leif@vaadin.com>2014-12-18 10:56:05 +0200
commit12f3e377766e19566aba10b6cc3c5c84b8d3d363 (patch)
tree506b283f8ca64a9919e08d79b6796c4c988c6b6e /uitest
parentcf1c05d0c6f829a2333d4ef744e8f9e1aa6d3dad (diff)
downloadvaadin-framework-12f3e377766e19566aba10b6cc3c5c84b8d3d363.tar.gz
vaadin-framework-12f3e377766e19566aba10b6cc3c5c84b8d3d363.zip
Use CellReference instead of FlyweightCell in Grid APIs (#13334)
Change-Id: I519e433219a028e99678574227ca44d5b66d07bc
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java9
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java12
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java4
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java6
4 files changed, 16 insertions, 15 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
index d6bbedce2f..7baff45a22 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
@@ -43,10 +43,10 @@ import com.vaadin.client.renderers.Renderer;
import com.vaadin.client.renderers.TextRenderer;
import com.vaadin.client.ui.VLabel;
import com.vaadin.client.widget.escalator.Cell;
-import com.vaadin.client.widget.escalator.FlyweightCell;
import com.vaadin.client.widget.grid.CellReference;
import com.vaadin.client.widget.grid.CellStyleGenerator;
import com.vaadin.client.widget.grid.EditorHandler;
+import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.client.widget.grid.RowReference;
import com.vaadin.client.widget.grid.RowStyleGenerator;
import com.vaadin.client.widget.grid.datasources.ListDataSource;
@@ -707,8 +707,9 @@ public class GridBasicClientFeaturesWidget extends
column.setRenderer(new Renderer<Object>() {
@Override
- public void render(FlyweightCell cell, Object data) {
- if (cell.getRow() == cell.getColumn()) {
+ public void render(RendererCellReference cell,
+ Object data) {
+ if (cell.getRowIndex() == cell.getColumnIndex()) {
throw new RuntimeException("I'm broken");
}
originalRenderer.render(cell, data);
@@ -1016,7 +1017,7 @@ public class GridBasicClientFeaturesWidget extends
return new HtmlRenderer() {
@Override
- public void render(FlyweightCell cell, String htmlString) {
+ public void render(RendererCellReference cell, String htmlString) {
super.render(cell, "<b>" + htmlString + "</b>");
}
};
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
index 6c85f2d941..5a653fb2f3 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridClientColumnRendererConnector.java
@@ -39,7 +39,7 @@ import com.vaadin.client.renderers.TextRenderer;
import com.vaadin.client.renderers.WidgetRenderer;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.widget.escalator.Cell;
-import com.vaadin.client.widget.escalator.FlyweightCell;
+import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.client.widget.grid.datasources.ListDataSource;
import com.vaadin.client.widget.grid.datasources.ListSorter;
import com.vaadin.client.widget.grid.sort.Sort;
@@ -289,7 +289,7 @@ public class GridClientColumnRendererConnector extends
}
@Override
- public void render(FlyweightCell cell, String data,
+ public void render(RendererCellReference cell, String data,
Button button) {
button.setHTML(data);
}
@@ -299,7 +299,7 @@ public class GridClientColumnRendererConnector extends
return new HtmlRenderer() {
@Override
- public void render(FlyweightCell cell, String htmlString) {
+ public void render(RendererCellReference cell, String htmlString) {
super.render(cell, "<b>" + htmlString + "</b>");
}
};
@@ -314,17 +314,17 @@ public class GridClientColumnRendererConnector extends
return new ComplexRenderer<String>() {
@Override
- public void init(FlyweightCell cell) {
+ public void init(RendererCellReference cell) {
}
@Override
- public void render(FlyweightCell cell, String data) {
+ public void render(RendererCellReference cell, String data) {
cell.getElement().setInnerHTML("<span>" + data + "</span>");
cell.getElement().getStyle().clearBackgroundColor();
}
@Override
- public void setContentVisible(FlyweightCell cell,
+ public void setContentVisible(RendererCellReference cell,
boolean hasData) {
// Visualize content visible property
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
index 88ccf93479..e89057a148 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/IntArrayRendererConnector.java
@@ -17,7 +17,7 @@ package com.vaadin.tests.widgetset.client.grid;
import com.vaadin.client.connectors.AbstractRendererConnector;
import com.vaadin.client.renderers.Renderer;
-import com.vaadin.client.widget.escalator.FlyweightCell;
+import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.shared.ui.Connect;
@Connect(com.vaadin.tests.components.grid.IntArrayRenderer.class)
@@ -27,7 +27,7 @@ public class IntArrayRendererConnector extends AbstractRendererConnector<int[]>
private static final String JOINER = " :: ";
@Override
- public void render(FlyweightCell cell, int[] data) {
+ public void render(RendererCellReference cell, int[] data) {
String text = "";
for (int i : data) {
text += i + JOINER;
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
index 25a56b2010..98bf4e6935 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java
@@ -26,7 +26,7 @@ import com.vaadin.client.connectors.AbstractRendererConnector;
import com.vaadin.client.renderers.ComplexRenderer;
import com.vaadin.client.renderers.Renderer;
import com.vaadin.client.widget.escalator.Cell;
-import com.vaadin.client.widget.escalator.FlyweightCell;
+import com.vaadin.client.widget.grid.RendererCellReference;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.shared.ui.Connect;
@@ -44,7 +44,7 @@ public class RowAwareRendererConnector extends AbstractRendererConnector<Void> {
}
@Override
- public void init(FlyweightCell cell) {
+ public void init(RendererCellReference cell) {
DivElement div = DivElement.as(DOM.createDiv());
div.setAttribute("style",
"border: 1px solid red; background: pink;");
@@ -53,7 +53,7 @@ public class RowAwareRendererConnector extends AbstractRendererConnector<Void> {
}
@Override
- public void render(FlyweightCell cell, Void data) {
+ public void render(RendererCellReference cell, Void data) {
// NOOP
}