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.

CollapseIndicatorOverlapsColumn.java 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.vaadin.tests.components.table;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.v7.data.Item;
  4. import com.vaadin.v7.ui.Table;
  5. @SuppressWarnings("deprecation")
  6. public class CollapseIndicatorOverlapsColumn extends TestBase {
  7. @Override
  8. protected void setup() {
  9. Table tbl = createTable();
  10. tbl.setWidth("400px");
  11. addComponent(tbl);
  12. }
  13. @SuppressWarnings("unchecked")
  14. private Table createTable() {
  15. Table tbl = new Table();
  16. tbl.addContainerProperty("COL1", String.class, "Column 1");
  17. tbl.addContainerProperty("COL2", String.class, "Column 2");
  18. // Right align last column
  19. tbl.setColumnAlignment("COL2", Table.ALIGN_RIGHT);
  20. // Allow collapsing
  21. tbl.setColumnCollapsingAllowed(true);
  22. for (int i = 0; i < 5; i++) {
  23. Item item = tbl.addItem("Item " + i);
  24. for (int j = 1; j <= 2; j++) {
  25. item.getItemProperty("COL" + j).setValue("Item " + i + "/" + j);
  26. }
  27. }
  28. return tbl;
  29. }
  30. @Override
  31. protected String getDescription() {
  32. return "The rightmost column should not be covered by the collapse indicator";
  33. }
  34. @Override
  35. protected Integer getTicketNumber() {
  36. return 6934;
  37. }
  38. }