diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-07-24 16:45:35 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-07-24 16:45:35 +0300 |
commit | 906349642fb739f96244196f84e5587fc70c668c (patch) | |
tree | fe3bd0cd8a53bcd30b3b9cbd39a02ff068e46782 /tests/testbench | |
parent | 8e5ba4d6d5b6c53df884f50bd6c03ee718a88f8e (diff) | |
download | vaadin-framework-906349642fb739f96244196f84e5587fc70c668c.tar.gz vaadin-framework-906349642fb739f96244196f84e5587fc70c668c.zip |
Extend Root instead of Application
Diffstat (limited to 'tests/testbench')
-rw-r--r-- | tests/testbench/com/vaadin/tests/tickets/Ticket8291.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java b/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java index 86b5db953b..2f094f0bf8 100644 --- a/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java +++ b/tests/testbench/com/vaadin/tests/tickets/Ticket8291.java @@ -4,33 +4,35 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import com.vaadin.Application; import com.vaadin.data.Container.Filter; import com.vaadin.data.Item; import com.vaadin.data.util.BeanItemContainer; +import com.vaadin.terminal.WrappedRequest; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Root; import com.vaadin.ui.Table; -import com.vaadin.ui.Window; /** * Test for #8291 and #7666: NegativeArraySizeException when Table scrolled to * the end and its size reduced. */ -public class Ticket8291 extends Application { +public class Ticket8291 extends Root { @Override - public void init() { - setMainWindow(new Window("", new TestView())); + public void init(WrappedRequest request) { + setContent(new TestView()); } private static class DecimateFilter implements Filter { + @Override public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException { return ((((TestObject) itemId).property3 % 10) == 0); } + @Override public boolean appliesToProperty(Object propertyId) { return true; } @@ -61,6 +63,7 @@ public class Ticket8291 extends Application { addComponent(table); Button button = new Button("Click"); button.addListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { reduceData = !reduceData; table.refreshRowCache(); @@ -69,6 +72,7 @@ public class Ticket8291 extends Application { addComponent(button); Button button2 = new Button("Filter"); button2.addListener(new Button.ClickListener() { + @Override public void buttonClick(ClickEvent event) { if (filter != null) { container.removeAllContainerFilters(); |