Search in sources :

Example 1 with Notification

use of com.vaadin.ui.Notification in project opennms by OpenNMS.

the class SurveillanceViewsConfigUI method notifyMessage.

/**
     * 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
     */
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());
        }
    }
}
Also used : Notification(com.vaadin.ui.Notification)

Example 2 with Notification

use of com.vaadin.ui.Notification in project opennms by OpenNMS.

the class UIHelper method showNotification.

public static void showNotification(String title, String message, Type type, int delayMsec) {
    Notification notification = new Notification(title, message, type, true);
    notification.setDelayMsec(delayMsec);
    notification.show(Page.getCurrent());
}
Also used : Notification(com.vaadin.ui.Notification)

Aggregations

Notification (com.vaadin.ui.Notification)2