summaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/WidgetRenderers.java16
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/WidgetRenderersTest.java6
2 files changed, 17 insertions, 5 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/WidgetRenderers.java b/uitest/src/com/vaadin/tests/components/grid/WidgetRenderers.java
index 534b8a9e4d..ba2fc4455b 100644
--- a/uitest/src/com/vaadin/tests/components/grid/WidgetRenderers.java
+++ b/uitest/src/com/vaadin/tests/components/grid/WidgetRenderers.java
@@ -24,8 +24,8 @@ import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.components.grid.Grid;
import com.vaadin.ui.components.grid.Grid.SelectionMode;
import com.vaadin.ui.components.grid.renderers.ButtonRenderer;
-import com.vaadin.ui.components.grid.renderers.ButtonRenderer.RendererClickEvent;
-import com.vaadin.ui.components.grid.renderers.ButtonRenderer.RendererClickListener;
+import com.vaadin.ui.components.grid.renderers.ClickableRenderer.RendererClickEvent;
+import com.vaadin.ui.components.grid.renderers.ClickableRenderer.RendererClickListener;
import com.vaadin.ui.components.grid.renderers.ImageRenderer;
import com.vaadin.ui.components.grid.renderers.ProgressBarRenderer;
@@ -47,7 +47,7 @@ public class WidgetRenderers extends AbstractTestUI {
item.getItemProperty(ProgressBarRenderer.class).setValue(0.3);
item.getItemProperty(ButtonRenderer.class).setValue("Click");
item.getItemProperty(ImageRenderer.class).setValue(
- new ThemeResource("window/img/resize.png"));
+ new ThemeResource("window/img/close.png"));
Grid grid = new Grid(container);
@@ -66,7 +66,15 @@ public class WidgetRenderers extends AbstractTestUI {
}
}));
- grid.getColumn(ImageRenderer.class).setRenderer(new ImageRenderer());
+ grid.getColumn(ImageRenderer.class).setRenderer(
+ new ImageRenderer(new RendererClickListener() {
+
+ @Override
+ public void click(RendererClickEvent event) {
+ item.getItemProperty(ImageRenderer.class).setValue(
+ new ThemeResource("window/img/maximize.png"));
+ }
+ }));
addComponent(grid);
}
diff --git a/uitest/src/com/vaadin/tests/components/grid/WidgetRenderersTest.java b/uitest/src/com/vaadin/tests/components/grid/WidgetRenderersTest.java
index d18494d277..c6649326c8 100644
--- a/uitest/src/com/vaadin/tests/components/grid/WidgetRenderersTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/WidgetRenderersTest.java
@@ -60,8 +60,12 @@ public class WidgetRenderersTest extends MultiBrowserTest {
WebElement image = getGridCell(0, 2).findElement(
By.className("gwt-Image"));
- assertTrue(image.getAttribute("src").endsWith("window/img/resize.png"));
+ assertTrue(image.getAttribute("src").endsWith("window/img/close.png"));
+ image.click();
+
+ assertTrue(image.getAttribute("src")
+ .endsWith("window/img/maximize.png"));
}
GridCellElement getGridCell(int row, int col) {