final Button htmlExample = new Button("HTML example");
htmlExample.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
FancyNotification notif = new FancyNotification(
null,
"Hello <span style=\"text-decoration: underline;\">World</span>",
"Lorem <span style=\"font-size: 80%;\">ipsum.</span>");
notif.getTitleLabel().setContentMode(ContentMode.HTML);
notif.getDescriptionLabel().setContentMode(ContentMode.HTML);
notifications.showNotification(notif);
}
});
buttonLayout.addComponent(htmlExample);