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.

NotificationsAndModalWindow.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.vaadin.tests.components.notification;
  2. import com.vaadin.tests.components.TestBase;
  3. import com.vaadin.ui.Button;
  4. import com.vaadin.ui.Notification;
  5. import com.vaadin.ui.Window;
  6. public class NotificationsAndModalWindow extends TestBase {
  7. @Override
  8. protected void setup() {
  9. getMainWindow().showNotification("Notification 1",
  10. Notification.TYPE_WARNING_MESSAGE);
  11. getMainWindow().showNotification("Notification 2",
  12. Notification.TYPE_WARNING_MESSAGE);
  13. Button b = new Button("Button");
  14. b.addClickListener(event -> {
  15. Window w = new Window("This is a window");
  16. w.setModal(true);
  17. getMainWindow().addWindow(w);
  18. });
  19. addComponent(b);
  20. }
  21. @Override
  22. protected String getDescription() {
  23. return "Press the button when both two notifications are visible to add a modal window to the app. When the modal window is visible, the notifications should disappear normally.";
  24. }
  25. @Override
  26. protected Integer getTicketNumber() {
  27. return 7136;
  28. }
  29. }