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.

ClippedComponentsInTable.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Button;
  4. import com.vaadin.v7.data.Item;
  5. import com.vaadin.v7.ui.Table;
  6. import com.vaadin.v7.ui.TextField;
  7. public class ClippedComponentsInTable extends TestBase {
  8. @Override
  9. protected String getDescription() {
  10. return "The table below should display 3 rows. Each with a textfield containing the row number.";
  11. }
  12. @Override
  13. protected Integer getTicketNumber() {
  14. return null;
  15. }
  16. @Override
  17. protected void setup() {
  18. Table t = new Table();
  19. addComponent(t);
  20. t.addContainerProperty("Name", TextField.class, null);
  21. t.addContainerProperty("Button", Button.class, null);
  22. for (int i = 0; i < 3; i++) {
  23. Item item = t.addItem(i);
  24. TextField tf = new TextField("", String.valueOf(i + 1));
  25. tf.setColumns(10);
  26. item.getItemProperty("Name").setValue(tf);
  27. Button b = new Button("OK");
  28. item.getItemProperty("Button").setValue(b);
  29. }
  30. }
  31. }