Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

PopupViewInTable.java 1.2KB

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.ui.Button;
  5. import com.vaadin.ui.Component;
  6. import com.vaadin.ui.Label;
  7. import com.vaadin.ui.PopupView;
  8. import com.vaadin.ui.VerticalLayout;
  9. import com.vaadin.v7.ui.Table;
  10. public class PopupViewInTable extends AbstractReindeerTestUI {
  11. @Override
  12. protected void setup(VaadinRequest request) {
  13. Table t = new Table();
  14. t.addContainerProperty("text", String.class, "");
  15. t.addContainerProperty("pv", Component.class, null);
  16. t.addItem(new Object[] { "Foo", createPopupView() }, "foo");
  17. addComponent(t);
  18. }
  19. private PopupView createPopupView() {
  20. PopupView pv = new PopupView("Click me", createContent());
  21. return pv;
  22. }
  23. private Component createContent() {
  24. VerticalLayout vl = new VerticalLayout(new Label("Hello"),
  25. new Button("World"));
  26. return vl;
  27. }
  28. @Override
  29. protected String getTestDescription() {
  30. // TODO Auto-generated method stub
  31. return null;
  32. }
  33. @Override
  34. protected Integer getTicketNumber() {
  35. // TODO Auto-generated method stub
  36. return null;
  37. }
  38. }