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.

SemiTransparentNotification.java 1.3KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.vaadin.tests.components.notification;
  2. import com.vaadin.server.Page;
  3. import com.vaadin.tests.components.TestBase;
  4. import com.vaadin.tests.util.LoremIpsum;
  5. import com.vaadin.ui.Label;
  6. import com.vaadin.ui.Notification;
  7. import com.vaadin.ui.Notification.Type;
  8. public class SemiTransparentNotification extends TestBase {
  9. @Override
  10. protected void setup() {
  11. Label l = new Label(LoremIpsum.get(10000));
  12. getLayout().setSizeFull();
  13. addComponent(l);
  14. Notification n = new Notification(
  15. "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This should be a <br/><b>SEMI-TRANSPARENT</b><br/> notification",
  16. Type.WARNING_MESSAGE);
  17. n.setHtmlContentAllowed(true);
  18. n.show(Page.getCurrent());
  19. }
  20. @Override
  21. protected String getDescription() {
  22. // TODO Auto-generated method stub
  23. return null;
  24. }
  25. @Override
  26. protected Integer getTicketNumber() {
  27. // TODO Auto-generated method stub
  28. return null;
  29. }
  30. }