You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TableWithPolling.java 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.server.VaadinRequest;
  3. import com.vaadin.tests.components.AbstractReindeerTestUI;
  4. import com.vaadin.v7.ui.Table;
  5. public class TableWithPolling extends AbstractReindeerTestUI {
  6. @Override
  7. protected String getTestDescription() {
  8. return "Polling shouldn't affect table column resizing in any way.";
  9. }
  10. @Override
  11. protected Integer getTicketNumber() {
  12. return 13432;
  13. }
  14. @Override
  15. protected void setup(VaadinRequest request) {
  16. Table table = new Table("This is my Table");
  17. table.addContainerProperty("First Name", String.class, null);
  18. table.addContainerProperty("Last Name", String.class, null);
  19. table.addContainerProperty("Year", Integer.class, null);
  20. table.addItem(
  21. new Object[] { "Nicolaus", "Copernicus", new Integer(1473) },
  22. new Integer(1));
  23. table.addItem(new Object[] { "Tycho", "Brahe", new Integer(1546) },
  24. new Integer(2));
  25. table.addItem(new Object[] { "Giordano", "Bruno", new Integer(1548) },
  26. new Integer(3));
  27. table.addItem(new Object[] { "Galileo", "Galilei", new Integer(1564) },
  28. new Integer(4));
  29. table.addItem(new Object[] { "Johannes", "Kepler", new Integer(1571) },
  30. new Integer(5));
  31. table.addItem(new Object[] { "Isaac", "Newton", new Integer(1643) },
  32. new Integer(6));
  33. addComponent(table);
  34. setPollInterval(1000);
  35. }
  36. }