aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/tests/components/table/TablePageLengthUpdate.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/tests/components/table/TablePageLengthUpdate.java')
-rw-r--r--src/com/vaadin/tests/components/table/TablePageLengthUpdate.java76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/com/vaadin/tests/components/table/TablePageLengthUpdate.java b/src/com/vaadin/tests/components/table/TablePageLengthUpdate.java
deleted file mode 100644
index 8906b8e835..0000000000
--- a/src/com/vaadin/tests/components/table/TablePageLengthUpdate.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.vaadin.tests.components.table;
-
-import com.vaadin.data.util.MethodProperty;
-import com.vaadin.terminal.Sizeable;
-import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Table;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.Button.ClickListener;
-
-public class TablePageLengthUpdate extends TestBase {
-
- private Label pageLengthLabel;
- private Table table;
-
- @Override
- protected String getDescription() {
- return "When the height is set for a table, the pagelength should be updated according to what is actually displayed. The table pagelength is initially 100 and the height is 100px. After clicking update the pageLength label should display the correct value (?).";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 1623;
- }
-
- @Override
- protected void setup() {
- table = new Table();
- table.setWidth("400px");
- table.setHeight("100px");
- table.setPageLength(100);
- table.addContainerProperty("p1", String.class, null);
- table.addContainerProperty("p2", String.class, null);
- table.addContainerProperty("p3", String.class, null);
-
- for (int i = 0; i < 10; i++) {
- table.addItem(new Object[] { "a" + i, "b" + i, "c" + i }, "" + i);
- }
-
- addComponent(table);
-
- pageLengthLabel = new Label("");
- updatePageLengthLabel();
- addComponent(pageLengthLabel);
-
- Button updateButton = new Button("Update pageLength",
- new ClickListener() {
-
- public void buttonClick(ClickEvent event) {
- updatePageLengthLabel();
- }
- });
- addComponent(updateButton);
-
- TextField tableHeight = new TextField("Table height",
- new MethodProperty(this, "tableHeight"));
- tableHeight.setImmediate(true);
- addComponent(tableHeight);
- }
-
- public String getTableHeight() {
- return "" + (int) table.getHeight()
- + Sizeable.UNIT_SYMBOLS[table.getHeightUnits()];
- }
-
- public void setTableHeight(String height) {
- table.setHeight(height);
- }
-
- protected void updatePageLengthLabel() {
- pageLengthLabel.setValue("Pagelength: " + table.getPageLength());
- }
-
-}