List of usage examples for com.vaadin.ui Notification setDescription
public void setDescription(String description)
From source file:fr.univlorraine.mondossierweb.controllers.UiController.java
License:Apache License
/** * Permet la saisie et l'envoi d'un message tous les clients connects *///from w w w. j a v a 2 s . c o m public void sendMessage() { InputWindow inputWindow = new InputWindow( applicationContext.getMessage("admin.sendMessage.message", null, UI.getCurrent().getLocale()), applicationContext.getMessage("admin.sendMessage.title", null, UI.getCurrent().getLocale())); inputWindow.addBtnOkListener(text -> { if (text instanceof String && !text.isEmpty()) { Notification notification = new Notification( applicationContext.getMessage("admin.sendMessage.notificationCaption", new Object[] { text }, UI.getCurrent().getLocale()), Type.TRAY_NOTIFICATION); notification.setDelayMsec(-1); notification.setDescription("\n" + applicationContext.getMessage( "admin.sendMessage.notificationDescription", null, UI.getCurrent().getLocale())); notification.setPosition(Position.TOP_CENTER); sendNotification(notification); } }); UI.getCurrent().addWindow(inputWindow); }
From source file:org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI.java
License:Open Source License
private void loginAuthenticationFailedNotification() { final Notification notification = new Notification(i18n.getMessage("notification.login.failed.title")); notification.setDescription(i18n.getMessage("notification.login.failed.description")); notification.setHtmlContentAllowed(true); notification.setStyleName("error closable"); notification.setPosition(Position.BOTTOM_CENTER); notification.setDelayMsec(1_000);/*from w w w.ja v a2 s . c o m*/ notification.show(Page.getCurrent()); }
From source file:org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI.java
License:Open Source License
private void loginCredentialsExpiredNotification() { final Notification notification = new Notification( i18n.getMessage("notification.login.failed.credentialsexpired.title")); notification.setDescription(i18n.getMessage("notification.login.failed.credentialsexpired.description")); notification.setDelayMsec(10_000);//ww w . ja v a2s. com notification.setHtmlContentAllowed(true); notification.setStyleName("error closeable"); notification.setPosition(Position.BOTTOM_CENTER); notification.show(Page.getCurrent()); }
From source file:org.eclipse.hawkbit.ui.login.LoginView.java
License:Open Source License
void loginAuthenticationFailedNotification() { final Notification notification = new Notification(i18n.getMessage("notification.login.failed.title")); notification.setDescription(i18n.getMessage("notification.login.failed.description")); notification.setHtmlContentAllowed(true); notification.setStyleName("error closable"); notification.setPosition(Position.BOTTOM_CENTER); notification.setDelayMsec(1000);/*from w w w .j a v a 2s . c om*/ notification.show(Page.getCurrent()); }
From source file:org.eclipse.hawkbit.ui.login.LoginView.java
License:Open Source License
void loginCredentialsExpiredNotification() { final Notification notification = new Notification( i18n.getMessage("notification.login.failed.credentialsexpired.title")); notification.setDescription(i18n.getMessage("notification.login.failed.credentialsexpired.description")); notification.setDelayMsec(10000);//w w w.jav a2s .co m notification.setHtmlContentAllowed(true); notification.setStyleName("error closeable"); notification.setPosition(Position.BOTTOM_CENTER); notification.show(Page.getCurrent()); }
From source file:org.openeos.services.ui.vaadin.internal.UIApplicationImpl.java
License:Apache License
@Override public void showMessage(MessageType type, String caption, String description) { Notification notif = createNotification(type, caption); notif.setDescription(description); vaadinApplication.getMainWindow().showNotification(notif); }
From source file:org.opennms.features.vaadin.surveillanceviews.ui.SurveillanceViewsConfigUI.java
License:Open Source License
/** * Method for displaying notification for the user. * * @param message the message to be displayed * @param description the description of this message * @param type the type of this notification *//*w ww . j a va 2s . c o m*/ public void notifyMessage(String message, String description, Notification.Type type) { Notification m_notification = new Notification("Message", type); m_notification.setCaption(message); m_notification.setDescription(description); m_notification.setDelayMsec(1000); if (getUI() != null) { if (getPage() != null) { m_notification.show(getUI().getPage()); } } }
From source file:ru.inovus.ui.SignInUI.java
License:Apache License
private void notification() { Notification notification = new Notification("!"); notification.setDescription( "<span> ?? ? <b>User</b> <b>password</b>.</span>"); notification.setHtmlContentAllowed(true); notification.setStyleName("tray dark small closable login-help"); notification.setPosition(Position.BOTTOM_CENTER); notification.setDelayMsec(20000);/*from w w w . ja v a 2 s. c om*/ notification.show(Page.getCurrent()); }