package com.vaadin.tests.components.notification;
+import com.vaadin.server.Page;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Label;
import com.vaadin.ui.Notification;
+import com.vaadin.ui.Notification.Type;
public class SemiTransparentNotification extends TestBase {
Label l = new Label(LoremIpsum.get(10000));
getLayout().setSizeFull();
addComponent(l);
- Notification
- .show(" This should be a <br/><b>SEMI-TRANSPARENT</b><br/> notification",
- Notification.TYPE_WARNING_MESSAGE);
+
+ Notification n = new Notification(
+ " This should be a <br/><b>SEMI-TRANSPARENT</b><br/> notification",
+ Type.WARNING_MESSAGE);
+ n.setHtmlContentAllowed(true);
+ n.show(Page.getCurrent());
}
@Override